Bug #51595 MySQL Workbench Export Results can only export first resultset
Submitted: 1 Mar 2010 4:25 Modified: 21 Apr 2010 14:29
Reporter: Terry Bailey Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.16 rev 5249 OS:Windows (Windows 7)
Assigned to: Sergei Tkachenko CPU Architecture:Any
Tags: data storage format, export, query.export, ResultSet

[1 Mar 2010 4:25] Terry Bailey
Description:
Trying to export any result set higher than the first results in an error stating 

builtin:query.export
Data storage format is not supported: xxx

Where xxx is whatever format you just tried to export.  (XML, CSV, HTML, etc)

The exact same results can be exported if they are the first or only results from the preceding query.

How to repeat:
Run a query in Query Editor that has more than one select statement

SELECT * FROM users;
SELECT * FROM users;

This will return 2 resultset tabs.

You can export the first using The Query | Export Results menu, but not the second.  or any subsequent.  The error reported is not accurate to the problem since the data is the same in the first tab and the second and the first can be exported.

To work around:
Select only the second select statement and use the Query | Execute Current Statement to query only one result and export it separately.  Of course this may not be acceptable for your situation.

Suggested fix:
Optimally make the Query | Export Results function be able to export any existing resultset.

If not possible for some reason, force the selection to Result(1) and note on export function that only first resultset can be exported at this time.
[1 Mar 2010 9:09] Valeriy Kravchuk
Thank you for the bug report. Verified just as described on Windows XP.
[9 Apr 2010 17:37] Johannes Taxacher
fix confirmed in repository
[21 Apr 2010 14:29] Tony Bedford
An entry has been added to the 5.2.18 changelog:

In the SQL Editor, it was not possible to export a result set, if the result set was not the first result set. For example, if there were two result sets, it would be possible to export the first one created, but not the second result set.
[5 Aug 2010 19:53] [ name withheld ]
I'm on 5.2.25 and it still only exports the first result set of 1000.  I saw it put its own "LIMIT 0,1000" there on the Action area of the Output tab so I put my own "LIMIT 0,5000" and then it gave me all the results and they were all exportable.  I think in general you'll want to export the full result without a LIMIT if none was specified.  There should at least be an option when you export to do that.