Commit 9ed08f35 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-22884 Assertion `grant_table || grant_table_role' failed on perfschema

when allowing access via perfschema callbacks, update
the cached GRANT_INFO to match
parent 574ef380
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;
--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, ...@@ -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)) switch(access->check(orig_want_access, &t_ref->grant.privilege))
{ {
case ACL_INTERNAL_ACCESS_GRANTED: case ACL_INTERNAL_ACCESS_GRANTED:
t_ref->grant.privilege|= orig_want_access;
t_ref->grant.want_privilege= NO_ACL;
continue; continue;
case ACL_INTERNAL_ACCESS_DENIED: case ACL_INTERNAL_ACCESS_DENIED:
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment