mariadb/mysql-test/suite/roles/grant_empty.test
Sergei Golubchik e3d9369774 cleanup: disconnect before DROP USER
let's always disconnect a user connection before dropping the said user.
MariaDB is traditionally very tolerant to active connections
of the dropped user, which isn't the case for most other databases.

Let's avoid unintentionally spreading incompatible behavior
and disconnect before drop.

Except in cases when the test specifically tests such a behavior.
2025-07-16 09:14:33 +07:00

23 lines
495 B
Text

--source include/not_embedded.inc
#
# MDEV-5668 Assertion `granted_role->is_role()' fails on granting role with empty name
#
--error ER_INVALID_ROLE
grant '' to foo@localhost;
#
# MDEV-5238 Server crashes in find_role_grant_pair on SHOW GRANTS for an anonymous user
#
create user ''@localhost;
create role r1;
grant r1 to ''@localhost;
--connect (con1,localhost,nonexisting_user,,)
select current_user;
show grants;
connection default;
disconnect con1;
drop role r1;
drop user ''@localhost;