mariadb/mysql-test/main/password_expiration_unix_socket.test
Dmitry Shulga ce7ab467db 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.
2025-07-16 09:14:33 +07:00

26 lines
621 B
Text

#
# Test password expiration
#
--source include/not_embedded.inc
--source include/have_unix_socket.inc
--echo #
--echo # A password cannot expire, if there is no password
--echo #
--let $replace=create user '$USER'
--replace_result $replace "create user 'USER'"
--eval create user '$USER' identified via unix_socket
--let $replace=alter user '$USER'
--replace_result $replace "alter user 'USER'"
--eval alter user '$USER' password expire
--exec $MYSQL -u $USER -e 'select 1'
--let $replace=drop user '$USER'
--replace_result $replace "drop user 'USER'"
--disable_warnings
--eval drop user '$USER'
--enable_warnings