blob: e09e680fe997d769f6e030b946bfb73791b0530d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
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
|