mariadb/mysql-test/suite/roles/grant_empty.result
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

17 lines
403 B
Text

grant '' to foo@localhost;
ERROR OP000: Invalid role specification ``
create user ''@localhost;
create role r1;
grant r1 to ''@localhost;
connect con1,localhost,nonexisting_user,,;
select current_user;
current_user
@localhost
show grants;
Grants for @localhost
GRANT `r1` TO ``@`localhost`
GRANT USAGE ON *.* TO ``@`localhost`
connection default;
disconnect con1;
drop role r1;
drop user ''@localhost;