1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

bugfix: mysql_fix_privilege_tables table_schema=database()

fix mysql_fix_privilege_tables to look for the `user` table in the
correct schema when deciding whether to convert it to `global_priv` table

make related tests a bit more verbose
This commit is contained in:
Sergei Golubchik
2019-02-13 18:08:47 +01:00
parent 84cbd69c9e
commit d89cdfc229
7 changed files with 139 additions and 299 deletions

View File

@ -760,7 +760,7 @@ ALTER TABLE column_stats ENGINE=Aria transactional=0;
ALTER TABLE index_stats ENGINE=Aria transactional=0;
DELIMITER //
IF 'BASE TABLE' = (select table_type from information_schema.tables where table_name='user') THEN
IF 'BASE TABLE' = (select table_type from information_schema.tables where table_schema=database() and table_name='user') THEN
CREATE TABLE IF NOT EXISTS global_priv (Host char(60) binary DEFAULT '', User char(80) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY Host (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'
SELECT Host, User, JSON_COMPACT(JSON_OBJECT('access',
1*('Y'=Select_priv)+