Can't export query results if the first named item in the "FROM" clause isn't a table. For example SELECT (stuff) FROM {OJ query} JOIN (tables) &tc.
Since, presumably, the only thing that is reqd for is to make up an export name, this seems a strange fault.
The less extreme, but still a nuisance, related issue is that the export file is automatically named without recourse to the user, and it's named for the first named table in the FROM clause, frequently not correct.
Suggested fix, simply prompt the user for filename, defaulting as is currently the case.
I am unable to recreate your bug.
I tried
SELECT * FROM (SELECT Country.* FROM world.Country JOIN world.CountryLanguage ON Country.Code = CountryLanguage.CountryCode) a JOIN world.City ON a.Code = City.CountryCode
on our demo server at http://demo.phpmyadmin.net/QA_4_3 (uusername:root and no password).
Are you able to give us an example query preferably on world or sakila databases that are in the demo server to recreate this bug?