Description:
I accidentally included single quotations in the "From Host" field when creating a user account. Now I have a user account with the "From Host" field = '%' (notice the literal single quotations). Whenever I attempt to select this user account in the workbench, to delete/change the account, an unhandled exception occurs and the application crashes. Of note, I've attempted to delete this account from the cmd line, but a 1396 error (unable to drop user) occurs. The inner exception I get is:
System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=mforms.wr
StackTrace:
at mforms.TreeView.changed(TreeView* )
at MySQL.Forms.TreeViewImpl.SelectionChanged(Object sender, EventArgs e)
at Aga.Controls.Tree.TreeViewAdv.OnSelectionChanged()
at Aga.Controls.Tree.TreeViewAdv.set_SuspendSelectionEvent(Boolean value)
at Aga.Controls.Tree.NormalInputState.DoMouseOperation(TreeNodeAdvMouseEventArgs args)
at Aga.Controls.Tree.NormalInputState.MouseDown(TreeNodeAdvMouseEventArgs args)
at Aga.Controls.Tree.TreeViewAdv.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.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)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at MySQL.GUI.Workbench.Program.Main(String[] Args)
InnerException:
How to repeat:
Create a user with any username and a "from host" field ='%' . Then select this user account in the Server Access Management Tab.
Suggested fix:
Include validation in the "From Host" field before users can add accounts with illegal/troublesome formats.