File tree Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,23 @@ delete from mysql.global_priv where user="PUBLIC";
100
100
flush privileges;
101
101
grant execute on procedure mtr.add_suppression to public;
102
102
revoke execute on procedure mtr.add_suppression from public;
103
+ #
104
+ # MDEV-30154: Assertion `strcasecmp(rolename, public_name.str) ||
105
+ # acl_public == role' failed in acl_update_role on GRANT ... TO PUBLIC
106
+ #
107
+ call mtr.add_suppression("Can't open and lock privilege tables");
108
+ USE test;
109
+ GRANT SELECT ON *.* TO PUBLIC;
110
+ LOCK TABLES mysql.time_zone WRITE,mysql.proc WRITE;
111
+ FLUSH PRIVILEGES;
112
+ ERROR HY000: Table 'db' was not locked with LOCK TABLES
113
+ LOCK TABLE nonexisting WRITE;
114
+ ERROR 42S02: Table 'test.nonexisting' doesn't exist
115
+ GRANT SELECT ON *.* TO PUBLIC;
116
+ REVOKE SELECT ON *.* FROM PUBLIC;
117
+ #
118
+ # End of 10.11 test
119
+ #
103
120
# clean up
104
121
delete from mysql.global_priv where user="PUBLIC";
105
122
flush privileges;
Original file line number Diff line number Diff line change @@ -109,6 +109,26 @@ flush privileges;
109
109
grant execute on procedure mtr.add_suppression to public;
110
110
revoke execute on procedure mtr.add_suppression from public;
111
111
112
+ --echo #
113
+ --echo # MDEV-30154: Assertion `strcasecmp(rolename, public_name.str) ||
114
+ --echo # acl_public == role' failed in acl_update_role on GRANT ... TO PUBLIC
115
+ --echo #
116
+ call mtr.add_suppression("Can't open and lock privilege tables");
117
+ USE test;
118
+ GRANT SELECT ON *.* TO PUBLIC;
119
+ LOCK TABLES mysql.time_zone WRITE,mysql.proc WRITE;
120
+ --error 1100
121
+ FLUSH PRIVILEGES;
122
+ --error 1146
123
+ LOCK TABLE nonexisting WRITE;
124
+ GRANT SELECT ON *.* TO PUBLIC;
125
+
126
+ REVOKE SELECT ON *.* FROM PUBLIC;
127
+
128
+ --echo #
129
+ --echo # End of 10.11 test
130
+ --echo #
131
+
112
132
-- echo # clean up
113
133
delete from mysql.global_priv where user="PUBLIC";
114
134
flush privileges;
Original file line number Diff line number Diff line change @@ -2918,7 +2918,6 @@ bool acl_reload(THD *thd)
2918
2918
int result;
2919
2919
DBUG_ENTER (" acl_reload" );
2920
2920
2921
- acl_public= NULL ;
2922
2921
2923
2922
Grant_tables tables;
2924
2923
/*
@@ -2963,6 +2962,7 @@ bool acl_reload(THD *thd)
2963
2962
old_mem= acl_memroot;
2964
2963
delete_dynamic (&acl_wild_hosts);
2965
2964
my_hash_free (&acl_check_hosts);
2965
+ acl_public= NULL ;
2966
2966
2967
2967
if ((result= acl_load (thd, tables)))
2968
2968
{ // Error. Revert to old list
You can’t perform that action at this time.
0 commit comments