MDEV-22884 Assertion `grant_table || grant_table_role' failed on perfschema
when allowing access via perfschema callbacks, update the cached GRANT_INFO to match
This commit is contained in:
parent
574ef38005
commit
9ed08f3576
7
mysql-test/suite/perfschema/r/grant.result
Normal file
7
mysql-test/suite/perfschema/r/grant.result
Normal file
@ -0,0 +1,7 @@
|
||||
create user a@localhost;
|
||||
connect a,localhost,a;
|
||||
select * from performance_schema.global_status where variable_name='b';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
connection default;
|
||||
disconnect a;
|
||||
drop user a@localhost;
|
11
mysql-test/suite/perfschema/t/grant.test
Normal file
11
mysql-test/suite/perfschema/t/grant.test
Normal file
@ -0,0 +1,11 @@
|
||||
--source include/not_embedded.inc
|
||||
#
|
||||
# MDEV-22884 Assertion `grant_table || grant_table_role' failed on perfschema
|
||||
#
|
||||
create user a@localhost;
|
||||
connect a,localhost,a;
|
||||
select * from performance_schema.global_status where variable_name='b';
|
||||
connection default;
|
||||
disconnect a;
|
||||
drop user a@localhost;
|
||||
|
@ -8104,6 +8104,8 @@ bool check_grant(THD *thd, privilege_t want_access, TABLE_LIST *tables,
|
||||
switch(access->check(orig_want_access, &t_ref->grant.privilege))
|
||||
{
|
||||
case ACL_INTERNAL_ACCESS_GRANTED:
|
||||
t_ref->grant.privilege|= orig_want_access;
|
||||
t_ref->grant.want_privilege= NO_ACL;
|
||||
continue;
|
||||
case ACL_INTERNAL_ACCESS_DENIED:
|
||||
goto err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user