mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 02:46:29 +01:00 
			
		
		
		
	 72ba96a48e
			
		
	
	
	72ba96a48e
	
	
	
		
			
			Tests with checking metadata or that cannot be run with the view-protocol are excluded from --view-protocol. For tests that do not allow the use of an additional connection, the util connection is disabled with "--disable_service_connection". Also cases with bugs for --view-protocol are disabled.
		
			
				
	
	
		
			68 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| --source include/no_view_protocol.inc
 | |
| --source include/not_embedded.inc
 | |
| 
 | |
| CREATE ROLE IF NOT EXISTS role1 WITH ADMIN user1;
 | |
| SELECT * FROM mysql.roles_mapping;
 | |
| DROP ROLE role1;
 | |
| 
 | |
| CREATE OR REPLACE ROLE role1 WITH ADMIN user2;
 | |
| SELECT * FROM mysql.roles_mapping WHERE Role='role1';
 | |
| CREATE OR REPLACE ROLE role1 WITH ADMIN user3;
 | |
| SELECT * FROM mysql.roles_mapping WHERE Role='role1';
 | |
| CREATE ROLE IF NOT EXISTS role1 WITH ADMIN user4;
 | |
| SELECT * FROM mysql.roles_mapping WHERE Role='role1';
 | |
| DROP ROLE IF EXISTS role1;
 | |
| SELECT * FROM mysql.roles_mapping WHERE Role='role1';
 | |
| DROP ROLE IF EXISTS role1;
 | |
| 
 | |
| 
 | |
| CREATE ROLE role_1;
 | |
| 
 | |
| CREATE ROLE IF NOT EXISTS role_1;
 | |
| CREATE OR REPLACE ROLE role_1;
 | |
| 
 | |
| --error ER_WRONG_USAGE
 | |
| CREATE OR REPLACE ROLE IF NOT EXISTS role_1;
 | |
| 
 | |
| --error ER_CANNOT_USER
 | |
| CREATE ROLE role_1;
 | |
| 
 | |
| CREATE USER u1@localhost;
 | |
| REVOKE SHOW DATABASES ON *.* FROM 'u1'@'localhost';
 | |
| GRANT SHOW DATABASES ON *.* TO role_1;
 | |
| GRANT role_1 TO u1@localhost;
 | |
| 
 | |
| connect (user_a, localhost, u1,,);
 | |
| connection user_a;
 | |
| 
 | |
| SELECT CURRENT_USER;
 | |
| 
 | |
| SHOW DATABASES;
 | |
| SELECT CURRENT_ROLE;
 | |
| SET ROLE role_1;
 | |
| SELECT CURRENT_ROLE;
 | |
| SHOW DATABASES;
 | |
| SET ROLE NONE;
 | |
| 
 | |
| connect (user_b, localhost, root,,);
 | |
| connection user_b;
 | |
| 
 | |
| --echo # Clearing up
 | |
| DROP ROLE role_1;
 | |
| DROP ROLE IF EXISTS role_1;
 | |
| 
 | |
| --error ER_CANNOT_USER
 | |
| DROP ROLE role_1;
 | |
| 
 | |
| DROP USER u1@localhost;
 | |
| 
 | |
| # MDEV-17942
 | |
| CREATE ROLE r;
 | |
| GRANT SHOW DATABASES ON *.* TO r;
 | |
| CREATE USER foo;
 | |
| CREATE USER bar;
 | |
| GRANT r TO foo;
 | |
| --error ER_PLUGIN_IS_NOT_LOADED
 | |
| CREATE OR REPLACE USER foo IDENTIFIED WITH non_existing_plugin;
 | |
| DROP ROLE r;
 | |
| DROP USER bar;
 |