Bug #51531 Out of memory exception while loading a SQL script file
Submitted: 26 Feb 2010 0:26 Modified: 3 Mar 2010 0:21
Reporter: Mario Hebert Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.16 revision 5249 OS:Microsoft Windows (XP Professional)
Assigned to: CPU Architecture:Any

[26 Feb 2010 0:26] Mario Hebert
Description:
I've tried to use the "Open SQL script..." menu option on a database backup SQL file. The file is 94,6 MB in size and contains all the tables' data.

Exception = System.OutOfMemoryException
Message = Exception of type 'System.OutOfMemoryException' was thrown.
FullText = System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.String.Replace(String oldValue, String newValue)
   at MySQL.?A0x8e6a07a1.CppStringToNative(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* str)
   at MySQL.Grt.Db.Sql.Sql_editor.sql()
   at MySQL.GUI.Workbench.DbSqlEditor.OnPartialRefresh(Int32 what)
   at MySQL.Grt.DelegateSlot1<void\,void\,int\,int>.cpp_callback(Int32* a1)
   at sigc.pointer_functor1<int const &,void>.()(pointer_functor1<int const \&\,void>* , Int32* _A_a1)
   at sigc.adaptor_functor<sigc::pointer_functor1<int const &,void> >.operator()<int const &>(adaptor_functor<sigc::pointer_functor1<int const \&\,void> >* , Int32* _A_arg1)
   at sigc.internal.slot_call1<sigc::pointer_functor1<int const &,void>,void,int>.call_it(slot_rep* rep, Int32* a_1)
   at sigc.slot1<void,int>.()(slot1<void\,int>* , Int32* _A_a1)
   at sigc.adaptor_functor<sigc::slot<void,int,sigc::nil,sigc::nil,sigc::nil,sigc::nil,sigc::nil,sigc::nil> >.operator()<int const &>(adaptor_functor<sigc::slot<void\,int\,sigc::nil\,sigc::nil\,sigc::nil\,sigc::nil\,sigc::nil\,sigc::nil> >* , Int32* _A_arg1)
   at sigc.internal.slot_call1<sigc::slot<void,int,sigc::nil,sigc::nil,sigc::nil,sigc::nil,sigc::nil,sigc::nil>,void,int const >.call_it(slot_rep* rep, Int32* a_1)
   at wb.CommandUI.activate_command(CommandUI* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* )
   at MySQL.Workbench.WbContext.activate_command(String name)
   at MySQL.GUI.Workbench.WorkbenchMenuManager.menuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How to repeat:
- Menu File/Open SQL script
- Select the current script file
- click open

====

out of memory exception error thrown
[26 Feb 2010 0:33] Mario Hebert
SQL script uploaded to FTP:


bug-data-51531.zip
[26 Feb 2010 6:50] Susanne Ebrecht
Many thanks for writing a bug report.

I wasn't able to repeat this.

How much RAM do you have?
[1 Mar 2010 0:13] Mario Hebert
I have 4 gigabytes of RAM.
[3 Mar 2010 0:21] MySQL Verification Team
Duplicate of bug: http://bugs.mysql.com/bug.php?id=51606.