Bug #60796 Workbench error while trying to run query on slave server
Submitted: 7 Apr 2011 16:36 Modified: 7 Apr 2011 17:55
Reporter: Victor Ferrada Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.33 CE revision 7508 OS:Windows (7 enterprise 64 bit)
Assigned to: CPU Architecture:Any

[7 Apr 2011 16:36] Victor Ferrada
Description:
Hello,

Just installed 5.2.33 CE revision 7508 today from the noinstall package. I configure connections to the slave instances that are configured with multiple instances on the same server:
master1:3306 -> slave1:3306
master2:3306 -> slave1:3307
master3:3306 -> slave1:3308

I connect to any of the slave instances with the SQL Editor and any query I try to run, be it a 'show processlist', 'show slave status' or 'select count(*) from mytable' produces the following:

MySQL Workbench has encountered a problem
External component has thrown an exception
We are sorry for the inconvenience....
    | report bug | close |

The same behavior cannot be reproduced on the master servers or slaves running on its own server, they seem to work fine and query results are accurate. Workbench does not crash.

Close app, and restart produces the same errors on the same servers.
Queries work fine to same servers through Toad or SQLyog :)

How to repeat:
Connect to server configured for multiple instances, try to run a query through the editor. ERROR
[7 Apr 2011 17:02] Alfredo Kojima
What are the names of the connections?

When the error dialog appears, right click on the area below the icon in that window, select Copy Stack Trace in the context menu and paste it to this bug report.

Thanks
[7 Apr 2011 17:09] Victor Ferrada
Stack Trace:

Exception = System.Runtime.InteropServices.SEHException
Message = External component has thrown an exception.
FullText = System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
   at Db_sql_editor.exec_sql(Db_sql_editor* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , shared_ptr<Sql_editor>* , Boolean , Boolean , Boolean )
   at MySQL.GUI.Workbench.Db_sql_editor.exec_sql(String sql, Boolean active_editor, Boolean wrap_with_non_std_delimiter)
   at MySQL.GUI.Workbench.DbSqlEditor.DoExecuteSqlScript(Boolean currentStatementOnly)
   at MySQL.GUI.Workbench.DbSqlEditor.ExecuteCurrentSqlStatement()
   at MySQL.Grt.RunWrappedDelegate0<void\,void\,MySQL::Grt::DelegateSlot0<void\,void>::ManagedDelegate>.native_callback()
   at sigc.pointer_functor0<void>.()(pointer_functor0<void>* )
   at sigc.adaptor_functor<sigc::pointer_functor0<void> >.()(adaptor_functor<sigc::pointer_functor0<void> >* )
   at sigc.internal.slot_call0<sigc::pointer_functor0<void>,void>.call_it(slot_rep* rep)
   at mforms.MenuItem.callback(MenuItem* )
   at MySQL.Forms.MenuItemImpl.menuItemClick(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.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
   at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
[7 Apr 2011 17:10] Victor Ferrada
Sorry, stack trace from an error result from a new window to a new connection to the slave server and running "show processlist"
[7 Apr 2011 17:32] Alfredo Kojima
Thanks for the trace, what about the connection names?
[7 Apr 2011 17:52] Victor Ferrada
Hi,

The connection names on the slaves are a slight variation of the host name, port and master host:

master connection names:
  dc.master.vip01
  dc.master.vip02
  dc.master.vip03

Slave connection names:
  dc.slave.vip01: 3306 - master1
  dc.slave.vip01: 3307 - master2
  dc.slave.vip01: 3308 - master3

and from your suggestion, I renamed the slave's conenction name to dc.slave.vip01 (the host name) without the additional info to differentiate the instances and the queries work!

Why would the connection name change have any effect? If it's a limitation due to the execution using the connection name rather than the host name...?
[7 Apr 2011 17:55] Alfredo Kojima
The names of the connections affect the names of the auto-save functionality (ironically), so if they contain characters that can't be used in filenames, the error would occur. This has already been fixed in our development tree.

Marking this as a duplicate of bug #60700