mariadb/mysql-test/suite/sys_vars/r/tx_isolation_basic.result
Alexander Barkov ffbb2bbc09 Removing redundant tests for "SET (global|local|session).varname"
This is covered in mysql-test/t/variables.test. There is no sense
to test this for every individual variables.

This is to reduce the coming soon patch for ROW-type routine variables,
which will change the error from ER_PARSE_ERROR to a new error
"unknown structured variable".
2017-04-05 15:02:56 +04:00

141 lines
5.1 KiB
Text

SET @global_start_value = @@global.tx_isolation;
SELECT @global_start_value;
@global_start_value
REPEATABLE-READ
SET @session_start_value = @@session.tx_isolation;
SELECT @session_start_value;
@session_start_value
REPEATABLE-READ
'#--------------------FN_DYNVARS_183_01------------------------#'
SET @@global.tx_isolation = 'READ-UNCOMMITTED';
SET @@global.tx_isolation = DEFAULT;
SELECT @@global.tx_isolation;
@@global.tx_isolation
REPEATABLE-READ
SET @@session.tx_isolation = DEFAULT;
SELECT @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ
'#---------------------FN_DYNVARS_183_02-------------------------#'
SET @@global.tx_isolation = NULL;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'NULL'
SET @@global.tx_isolation = '';
ERROR 42000: Variable 'tx_isolation' can't be set to the value of ''
SET @@session.tx_isolation = NULL;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'NULL'
SET @@session.tx_isolation = '';
ERROR 42000: Variable 'tx_isolation' can't be set to the value of ''
'#--------------------FN_DYNVARS_183_03------------------------#'
SET @@global.tx_isolation = 'READ-UNCOMMITTED';
SELECT @@global.tx_isolation;
@@global.tx_isolation
READ-UNCOMMITTED
SET @@global.tx_isolation = 'read-COMMITTED';
SELECT @@global.tx_isolation;
@@global.tx_isolation
READ-COMMITTED
SET @@global.tx_isolation = 'REPEATABLE-READ';
SELECT @@global.tx_isolation;
@@global.tx_isolation
REPEATABLE-READ
SET @@global.tx_isolation = 'SERIALIZable';
SELECT @@global.tx_isolation;
@@global.tx_isolation
SERIALIZABLE
SET @@session.tx_isolation = 'READ-UNCOMMITTED';
SELECT @@session.tx_isolation;
@@session.tx_isolation
READ-UNCOMMITTED
SET @@session.tx_isolation = 'READ-COMMITTED';
SELECT @@session.tx_isolation;
@@session.tx_isolation
READ-COMMITTED
SET @@session.tx_isolation = 'REPEATABLE-READ';
SELECT @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ
SET @@session.tx_isolation = 'serializable';
SELECT @@session.tx_isolation;
@@session.tx_isolation
SERIALIZABLE
'#--------------------FN_DYNVARS_183_04-------------------------#'
SET @@global.tx_isolation = -1;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of '-1'
SET @@global.tx_isolation = READUNCOMMITTED;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'READUNCOMMITTED'
SET @@global.tx_isolation = 'REPEATABLE';
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'REPEATABLE'
SET @@global.tx_isolation = OFF;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'OFF'
SET @@global.tx_isolation = ON;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'ON'
SET @@global.tx_isolation = 'NON-SERIALIZABLE';
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'NON-SERIALIZABLE'
SET @@tx_isolation = -1;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of '-1'
SET @@tx_isolation = READUNCOMMITTED;
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'READUNCOMMITTED'
SET @@tx_isolation = 'REPEATABLE';
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'REPEATABLE'
SET @@tx_isolation = 'NONE';
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'NONE'
SET @@tx_isolation = 'ALL';
ERROR 42000: Variable 'tx_isolation' can't be set to the value of 'ALL'
'#-------------------FN_DYNVARS_183_05----------------------------#'
SELECT @@session.tx_isolation = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='tx_isolation';
@@session.tx_isolation = VARIABLE_VALUE
1
'#----------------------FN_DYNVARS_183_06------------------------#'
SELECT @@global.tx_isolation = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='tx_isolation';
@@global.tx_isolation = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_183_07-------------------------#'
SET @@global.tx_isolation = 0;
SELECT @@global.tx_isolation;
@@global.tx_isolation
READ-UNCOMMITTED
SET @@global.tx_isolation = 1;
SELECT @@global.tx_isolation;
@@global.tx_isolation
READ-COMMITTED
SET @@global.tx_isolation = 2;
SELECT @@global.tx_isolation;
@@global.tx_isolation
REPEATABLE-READ
SET @@global.tx_isolation = 3;
SELECT @@global.tx_isolation;
@@global.tx_isolation
SERIALIZABLE
SET @@global.tx_isolation = 0.4;
ERROR 42000: Incorrect argument type to variable 'tx_isolation'
'#---------------------FN_DYNVARS_183_08----------------------#'
SET @@global.tx_isolation = TRUE;
SELECT @@global.tx_isolation;
@@global.tx_isolation
READ-COMMITTED
SET @@global.tx_isolation = FALSE;
SELECT @@global.tx_isolation;
@@global.tx_isolation
READ-UNCOMMITTED
'#---------------------FN_DYNVARS_183_09----------------------#'
SET tx_isolation = 'REPEATABLE-READ';
SET session tx_isolation = 'REPEATABLE-READ';
SELECT @@tx_isolation;
@@tx_isolation
REPEATABLE-READ
SET global tx_isolation = 'REPEATABLE-READ';
SELECT @@global.tx_isolation;
@@global.tx_isolation
REPEATABLE-READ
SET @@global.tx_isolation = @global_start_value;
SELECT @@global.tx_isolation;
@@global.tx_isolation
REPEATABLE-READ
SET @@session.tx_isolation = @session_start_value;
SELECT @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ