mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
102 lines
3.9 KiB
Text
102 lines
3.9 KiB
Text
SET @session_start_value = @@session.foreign_key_checks;
|
|
SELECT @session_start_value;
|
|
@session_start_value
|
|
1
|
|
'#--------------------FN_DYNVARS_032_01------------------------#'
|
|
SET @@session.foreign_key_checks = 1;
|
|
SET @@session.foreign_key_checks = DEFAULT;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
1
|
|
'Bug# 34878: No DEFAULT value for variable. Also setting DEFAULT does not give error'
|
|
'#---------------------FN_DYNVARS_032_02-------------------------#'
|
|
SET foreign_key_checks = 1;
|
|
SELECT @@foreign_key_checks;
|
|
@@foreign_key_checks
|
|
1
|
|
SELECT session.foreign_key_checks;
|
|
ERROR 42S02: Unknown table 'session' in field list
|
|
SELECT local.foreign_key_checks;
|
|
ERROR 42S02: Unknown table 'local' in field list
|
|
SET session foreign_key_checks = 0;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
0
|
|
'#--------------------FN_DYNVARS_032_03------------------------#'
|
|
SET @@session.foreign_key_checks = 0;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
0
|
|
SET @@session.foreign_key_checks = 1;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
1
|
|
'#--------------------FN_DYNVARS_032_04-------------------------#'
|
|
SET @@session.foreign_key_checks = -1;
|
|
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '-1'
|
|
SET @@session.foreign_key_checks = 2;
|
|
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '2'
|
|
SET @@session.foreign_key_checks = "T";
|
|
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'T'
|
|
SET @@session.foreign_key_checks = "Y";
|
|
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'Y'
|
|
SET @@session.foreign_key_checks = TRÜE;
|
|
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'TRÃœE'
|
|
SET @@session.foreign_key_checks = ÕN;
|
|
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'ÕN'
|
|
SET @@session.foreign_key_checks = OF;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
0
|
|
'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
|
|
SET @@session.foreign_key_checks = ÓFF;
|
|
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'ÓFF'
|
|
SET @@session.foreign_key_checks = '¹';
|
|
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '¹'
|
|
SET @@session.foreign_key_checks = NO;
|
|
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'NO'
|
|
'#-------------------FN_DYNVARS_032_05----------------------------#'
|
|
SET @@global.foreign_key_checks = 0;
|
|
ERROR HY000: Variable 'foreign_key_checks' is a SESSION variable and can't be used with SET GLOBAL
|
|
SELECT @@global.foreign_key_checks;
|
|
ERROR HY000: Variable 'foreign_key_checks' is a SESSION variable
|
|
'#----------------------FN_DYNVARS_032_06------------------------#'
|
|
SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='foreign_key_checks';
|
|
count(VARIABLE_VALUE)
|
|
1
|
|
'#----------------------FN_DYNVARS_032_07------------------------#'
|
|
SELECT @@session.foreign_key_checks = VARIABLE_VALUE
|
|
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
|
WHERE VARIABLE_NAME='foreign_key_checks';
|
|
@@session.foreign_key_checks = VARIABLE_VALUE
|
|
1
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
0
|
|
SELECT VARIABLE_VALUE
|
|
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
|
WHERE VARIABLE_NAME='foreign_key_checks';
|
|
VARIABLE_VALUE
|
|
OFF
|
|
'#---------------------FN_DYNVARS_032_08-------------------------#'
|
|
SET @@session.foreign_key_checks = OFF;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
0
|
|
SET @@session.foreign_key_checks = ON;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
1
|
|
'#---------------------FN_DYNVARS_032_09----------------------#'
|
|
SET @@session.foreign_key_checks = TRUE;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
1
|
|
SET @@session.foreign_key_checks = FALSE;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
0
|
|
SET @@session.foreign_key_checks = @session_start_value;
|
|
SELECT @@session.foreign_key_checks;
|
|
@@session.foreign_key_checks
|
|
1
|