mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			118 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			118 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
SET @start_value = @@autocommit;
 | 
						|
SELECT @start_value;
 | 
						|
@start_value
 | 
						|
1
 | 
						|
'#--------------------FN_DYNVARS_003_01------------------------#'
 | 
						|
SET @@autocommit = 0;
 | 
						|
SET @@autocommit = DEFAULT;
 | 
						|
SELECT @@autocommit;
 | 
						|
@@autocommit
 | 
						|
0
 | 
						|
'Bug: variable DEFAULT value not working and is not throwing error'
 | 
						|
'#---------------------FN_DYNVARS_003_02-------------------------#'
 | 
						|
SET @@autocommit = @start_value;
 | 
						|
SELECT @@autocommit = 1;
 | 
						|
@@autocommit = 1
 | 
						|
1
 | 
						|
'#--------------------FN_DYNVARS_003_03------------------------#'
 | 
						|
SET @@autocommit = 0;
 | 
						|
SELECT @@autocommit;
 | 
						|
@@autocommit
 | 
						|
0
 | 
						|
SET @@autocommit = 1;
 | 
						|
SELECT @@autocommit;
 | 
						|
@@autocommit
 | 
						|
1
 | 
						|
'#--------------------FN_DYNVARS_003_04-------------------------#'
 | 
						|
SET @@autocommit = 2;
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of '2'
 | 
						|
SET @@autocommit = -1;
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of '-1'
 | 
						|
SET @@autocommit = TRUEF;
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of 'TRUEF'
 | 
						|
SET @@autocommit = TRUE_F;
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of 'TRUE_F'
 | 
						|
SET @@autocommit = FALSE0;
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of 'FALSE0'
 | 
						|
SET @@autocommit = OON;
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of 'OON'
 | 
						|
SET @@autocommit = ONN;
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of 'ONN'
 | 
						|
SET @@autocommit = OOFF;
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of 'OOFF'
 | 
						|
SET @@autocommit = 0FF;
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of '0FF'
 | 
						|
SET @@autocommit = ' ';
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of ' '
 | 
						|
SET @@autocommit = " ";
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of ' '
 | 
						|
SET @@autocommit = '';
 | 
						|
ERROR 42000: Variable 'autocommit' can't be set to the value of ''
 | 
						|
'#-------------------FN_DYNVARS_003_05----------------------------#'
 | 
						|
SET @@global.autocommit = 0;
 | 
						|
ERROR HY000: Variable 'autocommit' is a SESSION variable and can't be used with SET GLOBAL
 | 
						|
SELECT @@global.autocommit;
 | 
						|
ERROR HY000: Variable 'autocommit' is a SESSION variable
 | 
						|
'#----------------------FN_DYNVARS_003_06------------------------#'
 | 
						|
SELECT @@session.autocommit = VARIABLE_VALUE 
 | 
						|
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
 | 
						|
WHERE VARIABLE_NAME='autocommit';
 | 
						|
@@session.autocommit = VARIABLE_VALUE
 | 
						|
0
 | 
						|
Bug # 34839: Values in variable and information_schema do not match for autocommit
 | 
						|
'#----------------------FN_DYNVARS_003_07------------------------#'
 | 
						|
SET @@autocommit = 1;
 | 
						|
SELECT @@autocommit = VARIABLE_VALUE
 | 
						|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
 | 
						|
WHERE VARIABLE_NAME='autocommit';
 | 
						|
@@autocommit = VARIABLE_VALUE
 | 
						|
0
 | 
						|
'#---------------------FN_DYNVARS_003_08-------------------------#'
 | 
						|
SET @@autocommit = OFF;
 | 
						|
SELECT @@autocommit;
 | 
						|
@@autocommit
 | 
						|
0
 | 
						|
SET @@autocommit = ON;
 | 
						|
SELECT @@autocommit;
 | 
						|
@@autocommit
 | 
						|
1
 | 
						|
'#---------------------FN_DYNVARS_003_09----------------------#'
 | 
						|
SET @@autocommit = TRUE;
 | 
						|
SELECT @@autocommit;
 | 
						|
@@autocommit
 | 
						|
1
 | 
						|
SET @@autocommit = FALSE;
 | 
						|
SELECT @@autocommit;
 | 
						|
@@autocommit
 | 
						|
0
 | 
						|
'#---------------------FN_DYNVARS_003_10----------------------#'
 | 
						|
SET @@autocommit = 0;
 | 
						|
SELECT @@autocommit = @@local.autocommit;
 | 
						|
@@autocommit = @@local.autocommit
 | 
						|
1
 | 
						|
SELECT @@local.autocommit = @@session.autocommit;
 | 
						|
@@local.autocommit = @@session.autocommit
 | 
						|
1
 | 
						|
SET @@autocommit = 1;
 | 
						|
SELECT @@autocommit = @@local.autocommit;
 | 
						|
@@autocommit = @@local.autocommit
 | 
						|
1
 | 
						|
SELECT @@session.autocommit = @@autocommit;
 | 
						|
@@session.autocommit = @@autocommit
 | 
						|
1
 | 
						|
'#---------------------FN_DYNVARS_003_11----------------------#'
 | 
						|
SET autocommit = 1;
 | 
						|
SELECT @@autocommit;
 | 
						|
@@autocommit
 | 
						|
1
 | 
						|
SELECT local.autocommit;
 | 
						|
ERROR 42S02: Unknown table 'local' in field list
 | 
						|
SELECT session.autocommit;
 | 
						|
ERROR 42S02: Unknown table 'session' in field list
 | 
						|
SELECT autocommit = @@session.autocommit;
 | 
						|
ERROR 42S22: Unknown column 'autocommit' in 'field list'
 | 
						|
SET @@autocommit = @start_value;
 | 
						|
SELECT @@autocommit;
 | 
						|
@@autocommit
 | 
						|
1
 |