1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00
Files
mariadb/mysql-test/suite/plugins/t/qc_info_priv.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

19 lines
501 B
Plaintext

set @save_query_cache_size=@@global.query_cache_size;
--source include/not_embedded.inc
--source qc_info_init.inc
# try an unprivileged user
create user mysqltest;
grant select on test.* to mysqltest;
connect (conn1,localhost,mysqltest,,);
connection conn1;
select a from t1;
select count(*) from information_schema.query_cache_info;
connection default;
disconnect conn1;
drop user mysqltest;
drop table t1;
set @@global.query_cache_size=@save_query_cache_size;
set global query_cache_type=default;