Bug #49075 UPDATE statement tries to set max_questions ='N' and = '0'
Submitted: 24 Nov 2009 21:23 Modified: 9 Jan 2010 9:54
Reporter: Dan Farfan Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.8 OS:Microsoft Windows (XP)
Assigned to: CPU Architecture:Any
Tags: add user, sql error, UPDATE
Triage: Needs Triage: D2 (Serious)

[24 Nov 2009 21:23] Dan Farfan
I just installed MySQL. While using workbench to add my first new user (besides root) I received an error message while setting the access rights for the account: 

Unhandled exception: Error updating account app1@localhost: Error executing

UPDATE mysql.user SET ...... 

Incorrect integer value 'N' for column max_questions at row 1;

How to repeat:
Upon further testing, it seems not EVERY update generates this error message (go figure). I could get the error on demand when I change the "host" setting. 

Suggested fix:
Fix the code that generates the UPDATE SQL statement string to 

1) NOT duplicate any columns
2) NOT try to set values to improper types
3) ONLY include the columns in the UPDATE statement that are ACTUALLY being changed by the user's current actions. (It appears to me your code is currently setting all known values.)
[24 Nov 2009 21:25] Dan Farfan
changing Severity from S2 to S3.
[25 Nov 2009 21:06] Miguel Solorzano
I got a crash with server administration see bug http://bugs.mysql.com/bug.php?id=49067 for call stack.
[9 Dec 2009 9:54] Susanne Ebrecht
This seems to be fixed in Workbench 5.2.10.

Please try Workbench 5.2.10 here.

If this still occurs on Workbench 5.2.10 then please also let us know your server version.
[10 Jan 2010 0: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".