mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
39 lines
1.8 KiB
Plaintext
39 lines
1.8 KiB
Plaintext
create user foo@localhost;
|
|
grant create user on *.* to foo@localhost;
|
|
change_user foo,,;
|
|
create user current_user;
|
|
ERROR HY000: Operation CREATE USER failed for CURRENT_USER
|
|
create user current_role;
|
|
ERROR HY000: Operation CREATE USER failed for CURRENT_ROLE
|
|
create role current_user;
|
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'current_user' at line 1
|
|
create role current_role;
|
|
ERROR HY000: Operation CREATE ROLE failed for CURRENT_ROLE
|
|
drop user current_user;
|
|
Warnings:
|
|
Note 4227 Dropped users 'foo'@'localhost' have active connections. Use KILL CONNECTION if they should not be used anymore.
|
|
drop user current_role;
|
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'current_role' at line 1
|
|
drop role current_user;
|
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'current_user' at line 1
|
|
drop role current_role;
|
|
ERROR HY000: Operation DROP ROLE failed for CURRENT_ROLE
|
|
show warnings;
|
|
Level Code Message
|
|
Error 1959 Invalid role specification `NONE`
|
|
Error 1396 Operation DROP ROLE failed for CURRENT_ROLE
|
|
change_user root,,;
|
|
create role r1;
|
|
grant r1 to current_user;
|
|
set role r1;
|
|
select current_role();
|
|
current_role()
|
|
r1
|
|
create user current_role;
|
|
ERROR HY000: Operation CREATE USER failed for CURRENT_ROLE
|
|
create role current_role;
|
|
ERROR HY000: Operation CREATE ROLE failed for CURRENT_ROLE
|
|
drop user current_role;
|
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'current_role' at line 1
|
|
drop role current_role;
|