mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-5238 Server crashes in find_role_grant_pair on SHOW GRANTS for an anonymous user
This commit is contained in:
12
mysql-test/suite/roles/show_grants_anon-5238.result
Normal file
12
mysql-test/suite/roles/show_grants_anon-5238.result
Normal file
@ -0,0 +1,12 @@
|
||||
create user ''@localhost;
|
||||
create role r1;
|
||||
grant r1 to ''@localhost;
|
||||
select current_user;
|
||||
current_user
|
||||
@localhost
|
||||
show grants;
|
||||
Grants for @localhost
|
||||
GRANT r1 TO ''@'localhost'
|
||||
GRANT USAGE ON *.* TO ''@'localhost'
|
||||
drop role r1;
|
||||
drop user ''@localhost;
|
17
mysql-test/suite/roles/show_grants_anon-5238.test
Normal file
17
mysql-test/suite/roles/show_grants_anon-5238.test
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# MDEV-5238 Server crashes in find_role_grant_pair on SHOW GRANTS for an anonymous user
|
||||
#
|
||||
--source include/not_embedded.inc
|
||||
|
||||
create user ''@localhost;
|
||||
create role r1;
|
||||
grant r1 to ''@localhost;
|
||||
|
||||
--connect (con1,localhost,nonexisting_user,,)
|
||||
select current_user;
|
||||
show grants;
|
||||
|
||||
connection default;
|
||||
drop role r1;
|
||||
drop user ''@localhost;
|
||||
|
Reference in New Issue
Block a user