How to produce:
1. Open a table in "Structure" view.
2. Click "Propose table structure"
3. Click "Export"
4. Leave default settings ("Data" has to be checked.)
5. Click "Go"
Result:
The DumpData Query are erroneous;
SELECT * FROM `table_name` PROCEDURE ANALYSE() LIMIT 16
Errors:
"LIMIT 16" are misplaced (should not be in the Query).
Question (on the side):
Is not the idea to have the export after "Propose table structure" to be the CREATE TABLE proposed by "PROCEDURE ANALYSE()"`?
Checked versions:
phpMyAdmin - 2.11.1
phpMyAdmin - 2.11.2-dev
On:
-- Server version: 5.0.18
-- PHP Version: 5.1.2
and
-- Server version: 4.1.18
-- PHP Version: 5.1.2
and
-- Server version: 5.0.45
-- PHP Version: 5.2.4-1
Logged In: YES
user_id=210714
Originator: NO
About the bug: the solution would be in libraries/display_export.lib.php to avoid display the dialog containing strDumpXRows, if the query is not allowed to have a limit. To find this, use the same code as in sql.php (see section "Do append a LIMIT clause"). Possibly set $is_analyse (and others) from a function.
About generating a CREATE TABLE: yes, this would be a feature request. There is no intention currently with the execution path you are describing.
Logged In: YES
user_id=210714
Originator: NO
Fixed: removed the Export link (and Create view link) in this case: they don't make sense.