File: foreign_key_checks_basic.result

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (99 lines) | stat: -rw-r--r-- 3,834 bytes parent folder | download | duplicates (4)
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
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
'#---------------------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 SELECT
SELECT local.foreign_key_checks;
ERROR 42S02: Unknown table 'local' in SELECT
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 = TRE;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'TRE'
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;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'OF'
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;
SELECT @@global.foreign_key_checks;
@@global.foreign_key_checks
0
SET @@global.foreign_key_checks = 1;
'#----------------------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 IF(@@session.foreign_key_checks, "ON", "OFF") = VARIABLE_VALUE 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
WHERE VARIABLE_NAME='foreign_key_checks';
IF(@@session.foreign_key_checks, "ON", "OFF") = VARIABLE_VALUE
1
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
1
SELECT VARIABLE_VALUE 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
WHERE VARIABLE_NAME='foreign_key_checks';
VARIABLE_VALUE
ON
'#---------------------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