mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-04 04:46:15 +01:00 
			
		
		
		
	On handling the DROP USER statement it is counted a number of sessions established on behalf every user being dropped. In case the DROP USER statement is executed in sql_mode = oracle the error ER_CANNOT_USER if there are active connections for any of the users listed at the DROP USER statement. For sql_mode != oracle the warning ER_ACTIVE_CONNECTIONS_FOR_USER_TO_DROP if there are active connections. Every user being dropped is marked with flag that disallow establishing a new connections on behalf this user.
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			495 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			495 B
		
	
	
	
		
			Text
		
	
	
	
	
	
create user foo@localhost;
 | 
						|
grant create user on *.* to foo@localhost;
 | 
						|
connect  foo,localhost,foo,,;
 | 
						|
drop user foo@localhost;
 | 
						|
Warnings:
 | 
						|
Note	4240	Dropped users 'foo'@'localhost' have active connections. Use KILL CONNECTION if they should not be used anymore.
 | 
						|
select * from information_schema.applicable_roles;
 | 
						|
GRANTEE	ROLE_NAME	IS_GRANTABLE	IS_DEFAULT
 | 
						|
show grants;
 | 
						|
ERROR 42000: There is no such grant defined for user 'foo' on host 'localhost'
 | 
						|
select current_user();
 | 
						|
current_user()
 | 
						|
foo@localhost
 |