mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
committed by
Dmitry Shulga
parent
bead24b7f3
commit
e3d9369774
@ -52,6 +52,11 @@ alter sequence s1 restart= 11;
|
||||
select * from s1;
|
||||
ERROR 42000: SELECT command denied to user 'only_alter'@'localhost' for table `mysqltest_1`.`s1`
|
||||
connection default;
|
||||
disconnect normal;
|
||||
disconnect read_only;
|
||||
disconnect read_write;
|
||||
disconnect alter;
|
||||
disconnect only_alter;
|
||||
drop user 'normal'@'%';
|
||||
drop user 'read_only'@'%';
|
||||
drop user 'read_write'@'%';
|
||||
|
@ -60,6 +60,11 @@ select * from s1;
|
||||
#
|
||||
|
||||
connection default;
|
||||
disconnect normal;
|
||||
disconnect read_only;
|
||||
disconnect read_write;
|
||||
disconnect alter;
|
||||
disconnect only_alter;
|
||||
drop user 'normal'@'%';
|
||||
drop user 'read_only'@'%';
|
||||
drop user 'read_write'@'%';
|
||||
|
@ -823,6 +823,9 @@ drop sequence s1;
|
||||
connection master;
|
||||
use s_db;
|
||||
drop database s_db;
|
||||
disconnect m_normal_1;
|
||||
disconnect m_normal_2;
|
||||
disconnect m_normal_3;
|
||||
drop user normal_1@'%';
|
||||
drop user normal_2@'%';
|
||||
drop user normal_3@'%';
|
||||
|
@ -700,6 +700,9 @@ drop sequence s1;
|
||||
connection master;
|
||||
use s_db;
|
||||
drop database s_db;
|
||||
disconnect m_normal_1;
|
||||
disconnect m_normal_2;
|
||||
disconnect m_normal_3;
|
||||
drop user normal_1@'%';
|
||||
drop user normal_2@'%';
|
||||
drop user normal_3@'%';
|
||||
|
@ -1086,6 +1086,8 @@ next_not_cached_value minimum_value maximum_value start_value increment cache_si
|
||||
connection master;
|
||||
drop table t1,s1;
|
||||
connection master;
|
||||
disconnect m_normal_1;
|
||||
disconnect m_normal_2;
|
||||
drop database s_db;
|
||||
drop user normal_1@'%';
|
||||
drop user normal_2@'%';
|
||||
|
@ -876,6 +876,8 @@ drop table t1,s1;
|
||||
#
|
||||
|
||||
connection master;
|
||||
disconnect m_normal_1;
|
||||
disconnect m_normal_2;
|
||||
drop database s_db;
|
||||
drop user normal_1@'%';
|
||||
drop user normal_2@'%';
|
||||
|
Reference in New Issue
Block a user