Bug #26727 2 crashes in add/edit user
Submitted: 28 Feb 2007 19:12 Modified: 12 Mar 2007 13:05
Reporter: Martin Friebe (Gold Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.2.9 OS:Microsoft Windows (Windows XP)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: error, user

[28 Feb 2007 19:12] Martin Friebe
Description:
I have 2 case in which mysql administrator crashes:
(more exactly a dos box like window opens with an error msg, and if you close this, the whole application is gone)

In both cases the administrator is running on windows, and connecting via tcp to a mysql server on a remote box (servers with version 4.1 and 5.0)

The crash happens, if a user with a too long username is save, while a user with the truncated name does already exist.

How to repeat:
1)
# this need to be executed twice, crashes on the 2nd run (if the user from the 1st run still exists and same names are used)
- go to the user administration (start a fresh instance of the administrator)
- click add user
- enter a username, which is 160 char long, or longer
123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_
- click on "apply changes"
- click on continue, for the "too long name" warning
- crash
** Message: save user: error adding new user entry

2)
- go to the user administration (start a fresh instance of the administrator)
- click add user
- enter a username, which is about 20 char long, or longer
x12345678901234567890
- click on "apply changes"
- click on continue, for the "too long name" warning
- add another 4 or 5 "x" to the end of the name
- click on "apply changes"
- click on continue, for the "too long name" warning
there may be a 2nd or 2 delay, a proper erro dialog may pop up aswell, but I always get a crash
** Message: save user: can't retrieve user information

Suggested fix:
-
[28 Feb 2007 19:17] Martin Friebe
You can actually continue working, as long as you don't close the dos box.

But I am sure this is not intended behaviour. It may be a warning printed to the "console" instead of being properly reported?
[1 Mar 2007 16:06] MySQL Verification Team
Thank you for the bug report.
[12 Mar 2007 13:05] Mike Lischke
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

PS: I wonder how you can deliberately violate the rules for users names (http://dev.mysql.com/doc/refman/5.0/en/user-names.html), get a warning for that, ignore it on purpose and report the error you get for that behavior. However there is absolutely no sense to let MA continue if a user name is longer than 16 characters (since the server won't accept it anyway) so I removed the possibility to continue if this condition is met. You have to use a user name which is less or equal than 16 characters long.