3 messages in com.mysql.lists.bugsBug: GRANT fails if user name spelled...
FromSent OnAttachments
Lars-Göran Forsberg04 Dec 2001 00:21 
Sinisa Milivojevic04 Dec 2001 06:30 
Sinisa Milivojevic04 Dec 2001 09:21 
Subject:Bug: GRANT fails if user name spelled with other case exists
From:Lars-Göran Forsberg (lars@incomit.com)
Date:12/04/2001 12:21:15 AM
List:com.mysql.lists.bugs

Description: GRANT fails when granting privileges to a user in a specific database, when the user spelled with other case already exists. It does not seem to produce an error when granting global privileges, but it does not create a new user entry. Since the user name seems case sensitive when logging in to the database, it should be possible to create users of different case. Either way, it should not produce an error.

Output from client:

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 3.23.45-max-debug-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL PRIVILEGES ON test.* TO testuser@localhost IDENTIFIED BY 'testp assword'; Query OK, 0 rows affected (0.14 sec)

mysql> GRANT ALL PRIVILEGES ON test.* TO Testuser@localhost IDENTIFIED BY 'testp assword'; ERROR 1133: Can't find any matching row in the user table mysql> GRANT ALL PRIVILEGES ON *.* TO testuser@localhost IDENTIFIED BY 'testpass word'; Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO Testuser@localhost IDENTIFIED BY 'testpass word'; Query OK, 0 rows affected (0.00 sec)

mysql> SELECT * FROM mysql.user; +-----------+----------+------------------+-------------+-------------+-----

---- ----+-------------+-------------+-----------+-------------+---------------+-

---- ---------+-----------+------------+-----------------+------------+---------- --+ | Host | User | Password | Select_priv | Insert_priv | Update_p riv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Proc ess_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | +-----------+----------+------------------+-------------+-------------+-----

---- ----+-------------+-------------+-----------+-------------+---------------+-

---- ---------+-----------+------------+-----------------+------------+---------- --+ | localhost | testuser | 34464d3918c0793c | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | +-----------+----------+------------------+-------------+-------------+-----

---- ----+-------------+-------------+-----------+-------------+---------------+-

---- ---------+-----------+------------+-----------------+------------+---------- --+ 1 row in set (0.02 sec)

How-To-Repeat: GRANT ALL PRIVILEGES ON test.* TO testuser@localhost IDENTIFIED BY 'testpassword'; GRANT ALL PRIVILEGES ON test.* TO Testuser@localhost IDENTIFIED BY 'testpassword';

GRANT ALL PRIVILEGES ON *.* TO testuser@localhost IDENTIFIED BY 'testpassword'; GRANT ALL PRIVILEGES ON *.* TO Testuser@localhost IDENTIFIED BY 'testpassword'; SELECT * FROM mysql.user WHERE User='testuser';

Fix:

Synopsis: Users of different case can not be created. Submitter-Id: Originator: Organization: MySQL support: none Severity: serious Priority: medium Category: mysqld Class: sw-bug Release: mysql-3.23.45 Exectutable: mysqld-nt Environment: PC System: Win2000 Compiler: VC++ 6.0 Architecture: i