Bug #69655 drop user fail when host is Capital
Submitted: 3 Jul 2013 8:17 Modified: 3 Jul 2013 9:56
Reporter: DAvid liu Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S2 (Serious)
Version:all OS:Linux
Assigned to: CPU Architecture:Any

[3 Jul 2013 8:17] DAvid liu
Description:
when mysqld is install ok .the mysqld start and  create privileges tables .while hostname is Capital,the mysql schema table user have store Capital host.and user drop user  and delete from user where host='' can't delete this user

How to repeat:
root@localhost:(none) 04:08:12 >use mysql
Database changed
root@localhost:mysql 04:08:24 >select user,host,password from user where host='5D_tj_s1';
+------+----------+----------+
| user | host     | password |
+------+----------+----------+
|      | 5D_tj_s1 |          |
| root | 5D_tj_s1 |          |
+------+----------+----------+
2 rows in set (0.00 sec)

root@localhost:mysql 04:08:27 >drop user 'root'@'5D_tj_s1';
ERROR 1396 (HY000): Operation DROP USER failed for 'root'@'5d_tj_s1'
root@localhost:mysql 04:09:08 >delete from user where host='5D_tj_s1';
Query OK, 2 rows affected (0.00 sec)

root@localhost:mysql 04:09:15 >select user,host,password from user where host='5D_tj_s1';
Empty set (0.00 sec)

root@localhost:mysql 04:09:18 >

root@localhost:mysql 04:10:04 >grant select on *.* to  'GS'@'LOCALHOST' identified by 'GS';
Query OK, 0 rows affected (0.00 sec)

root@localhost:mysql 04:10:35 >select user,host,password from user where user='GS';
+------+-----------+-------------------------------------------+
| user | host      | password                                  |
+------+-----------+-------------------------------------------+
| GS   | localhost | *761692A9384A9489963FB9EE3C32F277CA37B566 |
+------+-----------+-------------------------------------------+
1 row in set (0.01 sec)

root@localhost:mysql 04:10:48 >drop user 'GS'@'LOCALHOST';
Query OK, 0 rows affected (0.00 sec)

root@localhost:mysql 04:11:01 >select user,host,password from user where user='GS';
Empty set (0.00 sec)

root@localhost:mysql 04:11:03 >
[3 Jul 2013 8:24] MySQL Verification Team
please subscribe to:
 http://bugs.mysql.com/bug.php?id=62255
 http://bugs.mysql.com/bug.php?id=62254
[3 Jul 2013 9:56] DAvid liu
I think the mysql server code not problem,the problem is  mysql_system_tables_data.sql 

now ,I modify mysql_system_tables_data.sql   set 

set @current_hostname= lower@@hostname; to set @current_hostname= lower(@@hostname);

can resolv my problem.why mysql Not solve this problem