mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 18:36:12 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			53 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| --source include/not_embedded.inc
 | |
| 
 | |
| 
 | |
| --eval SET @global=@@global.$var
 | |
| 
 | |
| --echo # Test that "SET $var" is not allowed without $grant or SUPER
 | |
| 
 | |
| CREATE USER user1@localhost;
 | |
| GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
 | |
| --eval REVOKE $grant, SUPER ON *.* FROM user1@localhost
 | |
| --connect(user1,localhost,user1,,)
 | |
| --connection user1
 | |
| --error ER_SPECIFIC_ACCESS_DENIED_ERROR
 | |
| --eval SET GLOBAL $var=$value
 | |
| --error ER_GLOBAL_VARIABLE
 | |
| --eval SET $var=$value
 | |
| --error ER_GLOBAL_VARIABLE
 | |
| --eval SET SESSION $var=$value
 | |
| --disconnect user1
 | |
| --connection default
 | |
| DROP USER user1@localhost;
 | |
| 
 | |
| --echo # Test that "SET $var" is allowed with $grant
 | |
| 
 | |
| CREATE USER user1@localhost;
 | |
| --eval GRANT $grant ON *.* TO user1@localhost
 | |
| --connect(user1,localhost,user1,,)
 | |
| --connection user1
 | |
| --eval SET GLOBAL $var=$value
 | |
| --error ER_GLOBAL_VARIABLE
 | |
| --eval SET $var=$value
 | |
| --error ER_GLOBAL_VARIABLE
 | |
| --eval SET SESSION $var=$value
 | |
| --disconnect user1
 | |
| --connection default
 | |
| DROP USER user1@localhost;
 | |
| 
 | |
| --echo # Test that "SET $var" is allowed with SUPER
 | |
| 
 | |
| CREATE USER user1@localhost;
 | |
| GRANT SUPER ON *.* TO user1@localhost;
 | |
| --connect(user1,localhost,user1,,)
 | |
| --connection user1
 | |
| --eval SET GLOBAL $var=$value
 | |
| --error ER_GLOBAL_VARIABLE
 | |
| --eval SET $var=$value
 | |
| --error ER_GLOBAL_VARIABLE
 | |
| --eval SET SESSION $var=$value
 | |
| --disconnect user1
 | |
| --connection default
 | |
| DROP USER user1@localhost;
 | |
| 
 | |
| --eval SET @@global.$var=@global
 | 
