Bug #55889 out of memory for export to csv
Submitted: 10 Aug 2010 15:51 Modified: 6 Jan 2011 11:50
Reporter: Brian Withnell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.25ce OS:Windows (7 x64)
Assigned to: Alfredo Kojima CPU Architecture:Any

[10 Aug 2010 15:51] Brian Withnell
Description:
attempting to export to a csv a large result set caused an out of memory exception.

How to repeat:
connect to a large table (million lines or so) select * on the table (set limit to allow over a million lines) then attempt to export to a csv. Each record in the table had a large data size, and I watched the memory allocation grow to about 1.7 GB, at which point it died.

Suggested fix:
If the output size is that large, write the data in chunks so that you don't have to have the entire csv file in memory before writing starts.
[28 Oct 2010 20:47] Alfredo Kojima
Fixed by making export dump a row at a time
[28 Oct 2010 23:11] Alfredo Kojima
set bug #57072 as a duplicate
[8 Dec 2010 20:44] Johannes Taxacher
fix confirmed in repository
[6 Jan 2011 11:50] Tony Bedford
An entry has been added to the 5.2.31 changelog:

In the SQL Editor, when exporting a large recordset in the CSV file format, an out of memory exception occurred.