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
|
--echo #
--echo # Generic @@optimizer_switch tests
--echo #
--echo #
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='index_merge=off,index_merge_union=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='index_merge_union=on';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='default,index_merge_sort_union=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch=4;
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch=NULL;
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch='default,index_merge';
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch='index_merge=index_merge';
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch='index_merge=on,but...';
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch='index_merge=';
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch='index_merge';
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch='on';
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch='index_merge=on,index_merge=off';
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch='index_merge_union=on,index_merge_union=default';
--error ER_WRONG_VALUE_FOR_VAR
set optimizer_switch='default,index_merge=on,index_merge=off,default';
set optimizer_switch=default;
set optimizer_switch='index_merge=off,index_merge_union=off,default';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch=default;
# Check setting defaults for global vars
--replace_regex /,table_elimination=on//
select @@global.optimizer_switch;
set @@global.optimizer_switch=default;
--replace_regex /,table_elimination=on//
select @@global.optimizer_switch;
--echo #
--echo # Check index_merge's @@optimizer_switch flags
--echo #
--replace_regex /,table_elimination.on//
select @@optimizer_switch;
--echo
--echo BUG#37120 optimizer_switch allowable values not according to specification
--echo
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='default,materialization=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='default,semijoin=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='default,loosescan=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='default,semijoin=off,materialization=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='default,materialization=off,semijoin=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='default,semijoin=off,materialization=off,loosescan=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='default,semijoin=off,loosescan=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch='default,materialization=off,loosescan=off';
--replace_regex /,table_elimination=on//
select @@optimizer_switch;
set optimizer_switch=default;
|