[BUG] SHOW GRANTS treats hostname as case sensitive
am 24.09.2002 03:30:25 von Paul DuBoisHostnames are not supposed to be case sensitive in grant table entries.
However, SHOW GRANTS treats hostnames as case sensitive.
How to repeat:
Do something like this:
mysql> show grants for paul@localhost;
+----------------------------------------------------------- ------------------------------------------------------------ +
| Grants for paul@localhost
|
+----------------------------------------------------------- ------------------------------------------------------------ +
| GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO
'paul'@'localhost' IDENTIFIED BY PASSWORD '309e6910634ab429' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES,
INDEX, ALTER ON `dubois`.* TO 'paul'@'localhost' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES,
INDEX, ALTER ON `schedulator`.* TO 'paul'@'localhost' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES,
INDEX, ALTER ON `sampdb`.* TO 'paul'@'localhost' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES,
INDEX, ALTER ON `cookbook`.* TO 'paul'@'localhost' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES,
INDEX, ALTER ON `test`.* TO 'paul'@'localhost' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES,
INDEX, ALTER ON `webdb`.* TO 'paul'@'localhost' |
+----------------------------------------------------------- ------------------------------------------------------------ +
7 rows in set (0.00 sec)
mysql> show grants for paul@LOCALHOST;
ERROR 1141: There is no such grant defined for user 'paul' on host 'LOCALHOST'
mysql>
How to fix:
Change a strcmp() in mysql_show_grants() to strcasecmp()?
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12577@lists.mysql.com
To unsubscribe, e-mail