Bug #58778 Bad allocation error
Submitted: 7 Dec 2010 6:22 Modified: 8 Jun 2011 18:28
Reporter: Sujata Handa Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.2.31 CE OS:Windows
Assigned to: CPU Architecture:Any

[7 Dec 2010 6:22] Sujata Handa
Description:
Big red X across the document window in the top left corner. In an infinite loop trying to report bug. Indicates bad allocation message. Creating several copies of the error message. Workbench is frozen

How to repeat:
No idea
[7 Dec 2010 7:55] Valeriy Kravchuk
What exact Workbench version, 5.2.x, do you use? If it is not latest (5.2.30), please, check if 5.2.30 solves the problem for you.
[6 Jan 2011 11:39] Jurijs Kolomijecs
Hi!

I'm using MySQL WorkBench 5.2.31 and I've got same error: "Error: bad allocation". I've got it after I've opened MySQL WorkBench application, selected database, opened SQL file and clicked "Query -> Execute (All or Selected)".

I have tried to close application and start again but got same error when tried to execute SQL script.
[7 Jan 2011 12:11] Valeriy Kravchuk
How large the sql file is?
[7 Jan 2011 12:14] Jurijs Kolomijecs
The file was about 126 MB.
I've successfully run it for the first time, then removed few thousands of rows, then run again and did it few times. Then I restarted WorkBench and couldn't run again.
[8 Jan 2011 16:51] Valeriy Kravchuk
Please, send the output of Help > System Info menu item.
[10 Jan 2011 7:59] Jurijs Kolomijecs
Hi!

Here is output:

MySQL Workbench CE for Windows version 5.2.31
Configuration Directory: C:\Documents and Settings\jurikolo\Application Data\MySQL\Workbench
Data Directory: C:\jk\MySQL_WB
Cairo Version: 1.8.8
Rendering Mode: OpenGL is available on this system, so OpenGL is used for rendering.
OpenGL Driver Version: 2.1.1
OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)
CPU: AMD Athlon(tm) 64 Processor 3800+, 3.4 GiB RAM
Active video adapter: NVIDIA GeForce 6150 LE
Installed video RAM: 512 MB
Current video mode: 1680 x 1050 x 4294967296 colors
Used bit depth: 32
Driver version: 6.14.11.6002
Installed display drivers: nv4_disp.dll
Current user language: Latvian

MySQL Workbench CE for Windows version 5.2.31
Configuration Directory: C:\Documents and Settings\jurikolo\Application Data\MySQL\Workbench
Data Directory: C:\jk\MySQL_WB
Cairo Version: 1.8.8
Rendering Mode: OpenGL is available on this system, so OpenGL is used for rendering.
OpenGL Driver Version: 2.1.1
OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)
CPU: AMD Athlon(tm) 64 Processor 3800+, 3.4 GiB RAM
Active video adapter: NVIDIA GeForce 6150 LE
Installed video RAM: 512 MB
Current video mode: 1680 x 1050 x 4294967296 colors
Used bit depth: 32
Driver version: 6.14.11.6002
Installed display drivers: nv4_disp.dll
Current user language: Latvian
[11 Mar 2011 17:31] Johannes Taxacher
We cannot reproduce the problem on our systems, please provide a step by step description on how to run into the problem if possible.
thanks in advance
[11 Apr 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[20 Apr 2011 9:38] Erik Bogaert
I know i'm a bit late but this may benefit someone else.

The workbench maintains a history of SQL statements in a history file.
When you "Run a SQL file" those statements get added to that history file.
If the file is very big then the history file may reach a limit resulting in a "Error: bad allocation" because the workbench is unable to add to the history file.

Solution: check the size of the history file.
System Info show the configuration directory like:
Configuration Directory: C:\Users\Erik\AppData\Roaming\MySQL\Workbench
it has an sql_history sub-directory, the files are in there.

I deleted it for the current day and no more "Bad allocation" error.
[28 Apr 2011 22:47] Armando Lopez Valencia
Defect verified and reproduced.

Repro Steps:
1. Generate a big History file (200 MB+).
2. Open a connection (sql Editor).
3. Load a big .sql script (See attachment, "ten_thousand_tables.sql").
4. Execute the script.

Expected Results:
The script is executed without problems.

Actual results:
A "Bad allocation" error appears on the "output" tab (See attachment "Bad_allocation.png" for details.).
[28 Apr 2011 22:48] Armando Lopez Valencia
Error Screen Shot

Attachment: Bad_allocation.png (image/png, text), 96.99 KiB.

[28 Apr 2011 22:49] Armando Lopez Valencia
sql script file

Attachment: ten_thousand_tables.zip (application/octet-stream, text), 102.62 KiB.

[8 Jun 2011 18:28] Paul DuBois
Noted in 5.2.34 changelog.

When the SQL statement history file became large enough, Workbench 
encountered allocation errors attempting to add to it.
[19 Jun 2012 21:00] sandy patel
I am getting the same error..could not allocate the 515 MB space to read file.. but when i started first i was able to open . Sql file (Same size 515 MB)but now i am not able to open the file...