Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5.34, 10.0.6
-
None
-
None
Description
Normally, all values in the mysql.user.host column are lowercase. The parser converts all host names to lowercase in sql_yacc.yy. But mysql_install_db does not, so if the actual local host name is not lowercase it'll end up this way in the mysql.user table.
This user entry becomes impossible to drop:
insert mysql.user (host) values ('Foo'); |
flush privileges; |
select user,host from mysql.user; |
drop user ''@Foo; |
--error ER_CANNOT_USER
|
drop user ''@Foo; |
flush privileges; |
select user,host from mysql.user; |
drop user ''@foo; |
flush privileges; |
select user,host from mysql.user; |
Note flush privileges after every drop user. Because the user is actually deleted from the in-memory structures, but not from the table on disk. That's why the second drop user fails, but if we re-read privilege tables, it reappears.
Attachments
Issue Links
- is part of
-
MDEV-5530 5.5.35 merge
- Closed