blob: 9c26339839e24636c3a98833d9613b98ed45502c (
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
SET @start_global_value = @@global.optimizer_search_depth;
SELECT @start_global_value;
@start_global_value
62
SET @start_session_value = @@session.optimizer_search_depth;
SELECT @start_session_value;
@start_session_value
62
'#--------------------FN_DYNVARS_116_01-------------------------#'
SET @@global.optimizer_search_depth = 100;
Warnings:
Warning 1292 Truncated incorrect optimizer_search_depth value: '100'
SET @@global.optimizer_search_depth = DEFAULT;
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
62
SET @@session.optimizer_search_depth = 200;
Warnings:
Warning 1292 Truncated incorrect optimizer_search_depth value: '200'
SET @@session.optimizer_search_depth = DEFAULT;
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
62
'#--------------------FN_DYNVARS_116_02-------------------------#'
SET @@global.optimizer_search_depth = DEFAULT;
SELECT @@global.optimizer_search_depth = 62;
@@global.optimizer_search_depth = 62
1
SET @@session.optimizer_search_depth = DEFAULT;
SELECT @@session.optimizer_search_depth = 62;
@@session.optimizer_search_depth = 62
1
'#--------------------FN_DYNVARS_116_03-------------------------#'
SET @@global.optimizer_search_depth = 0;
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
0
SET @@global.optimizer_search_depth = 1;
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
1
SET @@global.optimizer_search_depth = 62;
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
62
SET @@global.optimizer_search_depth = 63;
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
63
'#--------------------FN_DYNVARS_116_04-------------------------#'
SET @@session.optimizer_search_depth = 0;
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
0
SET @@session.optimizer_search_depth = 1;
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
1
SET @@session.optimizer_search_depth = 62;
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
62
SET @@session.optimizer_search_depth = 63;
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
63
'#------------------FN_DYNVARS_116_05-----------------------#'
SET @@global.optimizer_search_depth = 64;
Warnings:
Warning 1292 Truncated incorrect optimizer_search_depth value: '64'
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
63
SET @@global.optimizer_search_depth = -1;
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
0
SET @@global.optimizer_search_depth = 65536;
Warnings:
Warning 1292 Truncated incorrect optimizer_search_depth value: '65536'
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
63
SET @@global.optimizer_search_depth = 65530.34.;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
63
SET @@global.optimizer_search_depth = test;
ERROR 42000: Incorrect argument type to variable 'optimizer_search_depth'
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
63
SET @@session.optimizer_search_depth = 64;
Warnings:
Warning 1292 Truncated incorrect optimizer_search_depth value: '64'
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
63
SET @@session.optimizer_search_depth = -2;
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
0
SET @@session.optimizer_search_depth = 65530.34.;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
SET @@session.optimizer_search_depth = 65550;
Warnings:
Warning 1292 Truncated incorrect optimizer_search_depth value: '65550'
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
63
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.optimizer_search_depth = test;
ERROR 42000: Incorrect argument type to variable 'optimizer_search_depth'
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
63
'#------------------FN_DYNVARS_116_06-----------------------#'
SELECT @@global.optimizer_search_depth = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='optimizer_search_depth';
@@global.optimizer_search_depth = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_116_07-----------------------#'
SELECT @@session.optimizer_search_depth = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='optimizer_search_depth';
@@session.optimizer_search_depth = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_116_08-----------------------#'
SET @@global.optimizer_search_depth = TRUE;
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
1
SET @@global.optimizer_search_depth = FALSE;
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
0
'#---------------------FN_DYNVARS_116_09----------------------#'
SET @@global.optimizer_search_depth = 10;
SELECT @@optimizer_search_depth = @@global.optimizer_search_depth;
@@optimizer_search_depth = @@global.optimizer_search_depth
0
'#---------------------FN_DYNVARS_116_10----------------------#'
SET @@optimizer_search_depth = 10;
SELECT @@optimizer_search_depth = @@local.optimizer_search_depth;
@@optimizer_search_depth = @@local.optimizer_search_depth
1
SELECT @@local.optimizer_search_depth = @@session.optimizer_search_depth;
@@local.optimizer_search_depth = @@session.optimizer_search_depth
1
'#---------------------FN_DYNVARS_116_11----------------------#'
SET optimizer_search_depth = 1;
SELECT @@optimizer_search_depth;
@@optimizer_search_depth
1
SELECT local.optimizer_search_depth;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.optimizer_search_depth;
ERROR 42S02: Unknown table 'session' in field list
SELECT optimizer_search_depth = @@session.optimizer_search_depth;
ERROR 42S22: Unknown column 'optimizer_search_depth' in 'field list'
SET @@global.optimizer_search_depth = @start_global_value;
SELECT @@global.optimizer_search_depth;
@@global.optimizer_search_depth
62
SET @@session.optimizer_search_depth = @start_session_value;
SELECT @@session.optimizer_search_depth;
@@session.optimizer_search_depth
62
|