blob: b4763ae0aa4e8c223325f7534f7cbfc3071016b1 (
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
SET @start_global_value = @@global.optimizer_prune_level;
SELECT @start_global_value;
@start_global_value
2
SET @start_session_value = @@session.optimizer_prune_level;
SELECT @start_session_value;
@start_session_value
2
'#--------------------FN_DYNVARS_115_01-------------------------#'
SET @@global.optimizer_prune_level = 0;
SET @@global.optimizer_prune_level = DEFAULT;
SELECT @@global.optimizer_prune_level;
@@global.optimizer_prune_level
2
SET @@session.optimizer_prune_level = 0;
SET @@session.optimizer_prune_level = DEFAULT;
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
2
'#--------------------FN_DYNVARS_115_02-------------------------#'
SET @@global.optimizer_prune_level = DEFAULT;
SELECT @@global.optimizer_prune_level = 2;
@@global.optimizer_prune_level = 2
1
SET @@session.optimizer_prune_level = DEFAULT;
SELECT @@session.optimizer_prune_level = 2;
@@session.optimizer_prune_level = 2
1
'#--------------------FN_DYNVARS_115_03-------------------------#'
SELECT @@global.optimizer_prune_level;
@@global.optimizer_prune_level
2
SET @@global.optimizer_prune_level = 0;
SELECT @@global.optimizer_prune_level;
@@global.optimizer_prune_level
0
SET @@global.optimizer_prune_level = 1;
SELECT @@global.optimizer_prune_level;
@@global.optimizer_prune_level
1
SET @@global.optimizer_prune_level = 2;
SELECT @@global.optimizer_prune_level;
@@global.optimizer_prune_level
2
SET @@global.optimizer_prune_level = TRUE;
SELECT @@global.optimizer_prune_level;
@@global.optimizer_prune_level
1
SET @@global.optimizer_prune_level = FALSE;
SELECT @@global.optimizer_prune_level;
@@global.optimizer_prune_level
0
'#--------------------FN_DYNVARS_115_04-------------------------#'
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
2
SET @@session.optimizer_prune_level = 0;
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
0
SET @@session.optimizer_prune_level = 1;
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
1
SET @@session.optimizer_prune_level = 2;
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
2
SET @@session.optimizer_prune_level = TRUE;
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
1
SET @@session.optimizer_prune_level = FALSE;
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
0
'#------------------FN_DYNVARS_115_05-----------------------#'
SET @@global.optimizer_prune_level = ON;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
'Bug# 34840: Since it is not a boolean variable, it should give errors on 'ON' & 'OFF' values';
SET @@global.optimizer_prune_level = OFF;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@global.optimizer_prune_level = 'ONN';
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@global.optimizer_prune_level = "OFFF";
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@global.optimizer_prune_level = TTRUE;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@global.optimizer_prune_level = FELSE;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@global.optimizer_prune_level = -1024;
Warnings:
Warning 1292 Truncated incorrect optimizer_prune_level value: '-1024'
SELECT @@global.optimizer_prune_level;
@@global.optimizer_prune_level
0
'Bug# 34840: Since it is not a boolean variable, it should no give errors on numeric values';
SET @@global.optimizer_prune_level = 65536;
Warnings:
Warning 1292 Truncated incorrect optimizer_prune_level value: '65536'
SET @@global.optimizer_prune_level = 3;
Warnings:
Warning 1292 Truncated incorrect optimizer_prune_level value: '3'
select @@global.optimizer_prune_level;
@@global.optimizer_prune_level
2
SET @@global.optimizer_prune_level = 65530.34;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@global.optimizer_prune_level = test;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = ON;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = OFF;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = ONN;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = ONF;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = ON;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = OF;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = 'OFN';
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = -2;
Warnings:
Warning 1292 Truncated incorrect optimizer_prune_level value: '-2'
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
0
SET @@session.optimizer_prune_level = 65530.34;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
SET @@session.optimizer_prune_level = 65550;
Warnings:
Warning 1292 Truncated incorrect optimizer_prune_level value: '65550'
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
2
SET @@session.optimizer_prune_level = test;
ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level'
'#------------------FN_DYNVARS_115_06-----------------------#'
SELECT @@global.optimizer_prune_level = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='optimizer_prune_level';
@@global.optimizer_prune_level = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_115_07-----------------------#'
SELECT @@session.optimizer_prune_level = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='optimizer_prune_level';
@@session.optimizer_prune_level = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_115_08----------------------#'
SET @@optimizer_prune_level = 0;
SET @@global.optimizer_prune_level = 1;
SELECT @@optimizer_prune_level = @@global.optimizer_prune_level;
@@optimizer_prune_level = @@global.optimizer_prune_level
0
'#---------------------FN_DYNVARS_115_09----------------------#'
SET @@optimizer_prune_level = 1;
SELECT @@optimizer_prune_level = @@local.optimizer_prune_level;
@@optimizer_prune_level = @@local.optimizer_prune_level
1
SELECT @@local.optimizer_prune_level = @@session.optimizer_prune_level;
@@local.optimizer_prune_level = @@session.optimizer_prune_level
1
'#---------------------FN_DYNVARS_115_10----------------------#'
SET optimizer_prune_level = 1;
SELECT @@optimizer_prune_level;
@@optimizer_prune_level
1
SELECT local.optimizer_prune_level;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.optimizer_prune_level;
ERROR 42S02: Unknown table 'session' in field list
SELECT optimizer_prune_level = @@session.optimizer_prune_level;
ERROR 42S22: Unknown column 'optimizer_prune_level' in 'field list'
SET @@global.optimizer_prune_level = @start_global_value;
SELECT @@global.optimizer_prune_level;
@@global.optimizer_prune_level
2
SET @@session.optimizer_prune_level = @start_session_value;
SELECT @@session.optimizer_prune_level;
@@session.optimizer_prune_level
2
|