1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-35617: DROP USER should leave no active session for that user

DROP USER looks for sessions by the do-be-dropped user and if found:
* fails with ER_CANNOT_USER in Oracle mode
* continues with ER_ACTIVE_CONNECTIONS_FOR_USER_TO_DROP warning otherwise

Every user being dropped is marked with flag that disallow establishing
a new connections on behalf this user.
This commit is contained in:
Dmitry Shulga
2025-05-28 00:05:05 +07:00
parent e3d9369774
commit ce7ab467db
51 changed files with 410 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
source include/platform.inc;
source include/not_embedded.inc;
source include/count_sessions.inc;
if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'parsec'`)
{
@@ -41,6 +42,7 @@ if ($MTR_COMBINATION_WIN) {
--echo # mysql -utest1 -ppwd --ssl-verify-server-cert -e "select test.have_ssl()"
--exec $MYSQL --protocol tcp $host -utest1 -ppwd --ssl-verify-server-cert -e "select test.have_ssl()" 2>&1
source include/wait_until_count_sessions.inc;
drop function have_ssl;
drop user test1@'%';
@@ -57,4 +59,5 @@ disconnect con4;
--error ER_ACCESS_DENIED_ERROR
connect con5, localhost, test2, "wrong_pwd";
connection default;
source include/wait_until_count_sessions.inc;
drop user test2@'%';