1
by brian
clean slate |
1 |
drop table if exists t1,t2; |
2 |
set @my_key_buffer_size =@@global.key_buffer_size; |
|
3 |
set @my_max_connect_errors =@@global.max_connect_errors; |
|
4 |
set @my_max_heap_table_size =@@global.max_heap_table_size; |
|
5 |
set @my_max_join_size =@@global.max_join_size; |
|
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
6 |
set @my_drizzle_protocol_buffer_length =@@global.drizzle_protocol_buffer_length; |
1
by brian
clean slate |
7 |
set @my_server_id =@@global.server_id; |
8 |
set @my_storage_engine =@@global.storage_engine; |
|
1119.4.7
by Stewart Smith
make variables test not leave state of server in a modified state. i.e. fully |
9 |
set @my_myisam_sort_buffer_size =@@global.myisam_sort_buffer_size; |
1
by brian
clean slate |
10 |
set @`test`=1; |
11 |
select @test, @`test`, @TEST, @`TEST`, @"teSt"; |
|
12 |
@test @`test` @TEST @`TEST` @"teSt" |
|
13 |
1 1 1 1 1 |
|
14 |
set @TEST=2; |
|
15 |
select @test, @`test`, @TEST, @`TEST`, @"teSt"; |
|
16 |
@test @`test` @TEST @`TEST` @"teSt" |
|
17 |
2 2 2 2 2 |
|
18 |
set @"tEST"=3; |
|
19 |
select @test, @`test`, @TEST, @`TEST`, @"teSt"; |
|
20 |
@test @`test` @TEST @`TEST` @"teSt" |
|
21 |
3 3 3 3 3 |
|
22 |
set @`TeST`=4; |
|
23 |
select @test, @`test`, @TEST, @`TEST`, @"teSt"; |
|
24 |
@test @`test` @TEST @`TEST` @"teSt" |
|
25 |
4 4 4 4 4 |
|
26 |
select @`teST`:=5; |
|
27 |
@`teST`:=5 |
|
28 |
5
|
|
29 |
select @test, @`test`, @TEST, @`TEST`, @"teSt"; |
|
30 |
@test @`test` @TEST @`TEST` @"teSt" |
|
31 |
5 5 5 5 5 |
|
32 |
set @select=2,@t5=1.23456; |
|
33 |
select @`select`,@not_used; |
|
34 |
@`select` @not_used |
|
35 |
2 NULL |
|
36 |
set @test_int=10,@test_double=1e-10,@test_string="abcdeghi",@test_string2="abcdefghij",@select=NULL; |
|
37 |
select @test_int,@test_double,@test_string,@test_string2,@select; |
|
38 |
@test_int @test_double @test_string @test_string2 @select |
|
39 |
10 0.0000000001 abcdeghi abcdefghij NULL |
|
40 |
set @test_int="hello",@test_double="hello",@test_string="hello",@test_string2="hello"; |
|
41 |
select @test_int,@test_double,@test_string,@test_string2; |
|
42 |
@test_int @test_double @test_string @test_string2 |
|
43 |
hello hello hello hello |
|
44 |
set @test_int="hellohello",@test_double="hellohello",@test_string="hellohello",@test_string2="hellohello"; |
|
45 |
select @test_int,@test_double,@test_string,@test_string2; |
|
46 |
@test_int @test_double @test_string @test_string2 |
|
47 |
hellohello hellohello hellohello hellohello |
|
48 |
set @test_int=null,@test_double=null,@test_string=null,@test_string2=null; |
|
49 |
select @test_int,@test_double,@test_string,@test_string2; |
|
50 |
@test_int @test_double @test_string @test_string2 |
|
51 |
NULL NULL NULL NULL |
|
52 |
select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3; |
|
53 |
@t1:=(@t2:=1)+@t3:=4 @t1 @t2 @t3 |
|
54 |
5 5 1 4 |
|
55 |
explain extended select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3; |
|
56 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
|
57 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used |
|
58 |
Warnings: |
|
59 |
Note 1003 select (@t1:=((@t2:=1) + (@t3:=4))) AS `@t1:=(@t2:=1)+@t3:=4`,(@t1) AS `@t1`,(@t2) AS `@t2`,(@t3) AS `@t3` |
|
60 |
select @t5; |
|
61 |
@t5 |
|
62 |
1.23456
|
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
63 |
CREATE TABLE t1 (c_id INT NOT NULL, c_name VARCHAR(250), c_country VARCHAR(250), PRIMARY KEY(c_id)); |
1
by brian
clean slate |
64 |
INSERT INTO t1 VALUES (1,'Bozo','USA'),(2,'Ronald','USA'),(3,'Kinko','IRE'),(4,'Mr. Floppy','GB'); |
65 |
SELECT @min_cid:=min(c_id), @max_cid:=max(c_id) from t1; |
|
66 |
@min_cid:=min(c_id) @max_cid:=max(c_id) |
|
67 |
1 4 |
|
68 |
SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid; |
|
69 |
c_id c_name c_country |
|
70 |
1 Bozo USA |
|
71 |
4 Mr. Floppy GB |
|
72 |
SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid OR c_id=666; |
|
73 |
c_id c_name c_country |
|
74 |
1 Bozo USA |
|
75 |
4 Mr. Floppy GB |
|
76 |
ALTER TABLE t1 DROP PRIMARY KEY; |
|
77 |
select * from t1 where c_id=@min_cid OR c_id=@max_cid; |
|
78 |
c_id c_name c_country |
|
79 |
1 Bozo USA |
|
80 |
4 Mr. Floppy GB |
|
81 |
drop table t1; |
|
82 |
set GLOBAL max_join_size=10; |
|
83 |
set max_join_size=100; |
|
84 |
show variables like 'max_join_size'; |
|
85 |
Variable_name Value |
|
86 |
max_join_size 100 |
|
87 |
select * from information_schema.session_variables where variable_name like 'max_join_size'; |
|
88 |
VARIABLE_NAME VARIABLE_VALUE |
|
89 |
MAX_JOIN_SIZE 100 |
|
90 |
show global variables like 'max_join_size'; |
|
91 |
Variable_name Value |
|
92 |
max_join_size 10 |
|
93 |
select * from information_schema.global_variables where variable_name like 'max_join_size'; |
|
94 |
VARIABLE_NAME VARIABLE_VALUE |
|
95 |
MAX_JOIN_SIZE 10 |
|
96 |
set GLOBAL max_join_size=2000; |
|
97 |
show global variables like 'max_join_size'; |
|
98 |
Variable_name Value |
|
99 |
max_join_size 2000 |
|
100 |
select * from information_schema.global_variables where variable_name like 'max_join_size'; |
|
101 |
VARIABLE_NAME VARIABLE_VALUE |
|
102 |
MAX_JOIN_SIZE 2000 |
|
103 |
set max_join_size=DEFAULT; |
|
104 |
show variables like 'max_join_size'; |
|
105 |
Variable_name Value |
|
106 |
max_join_size 2000 |
|
107 |
select * from information_schema.session_variables where variable_name like 'max_join_size'; |
|
108 |
VARIABLE_NAME VARIABLE_VALUE |
|
109 |
MAX_JOIN_SIZE 2000 |
|
110 |
set GLOBAL max_join_size=DEFAULT; |
|
111 |
show global variables like 'max_join_size'; |
|
112 |
Variable_name Value |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
113 |
max_join_size 2147483647 |
1
by brian
clean slate |
114 |
select * from information_schema.global_variables where variable_name like 'max_join_size'; |
115 |
VARIABLE_NAME VARIABLE_VALUE |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
116 |
MAX_JOIN_SIZE 2147483647 |
1
by brian
clean slate |
117 |
set @@max_join_size=1000, @@global.max_join_size=2000; |
118 |
select @@local.max_join_size, @@global.max_join_size; |
|
119 |
@@local.max_join_size @@global.max_join_size |
|
120 |
1000 2000 |
|
121 |
select @@identity, length(@@version)>0; |
|
122 |
@@identity length(@@version)>0 |
|
123 |
0 1 |
|
124 |
select @@VERSION=version(); |
|
125 |
@@VERSION=version() |
|
126 |
1
|
|
127 |
select last_insert_id(345); |
|
128 |
last_insert_id(345) |
|
129 |
345
|
|
130 |
explain extended select last_insert_id(345); |
|
131 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
|
132 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used |
|
133 |
Warnings: |
|
134 |
Note 1003 select last_insert_id(345) AS `last_insert_id(345)` |
|
135 |
select @@IDENTITY,last_insert_id(), @@identity; |
|
136 |
@@IDENTITY last_insert_id() @@identity |
|
137 |
345 345 345 |
|
138 |
explain extended select @@IDENTITY,last_insert_id(), @@identity; |
|
139 |
id select_type table type possible_keys key key_len ref rows filtered Extra |
|
140 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used |
|
141 |
Warnings: |
|
142 |
Note 1003 select 345 AS `@@IDENTITY`,last_insert_id() AS `last_insert_id()`,345 AS `@@identity` |
|
143 |
set global timed_mutexes=ON; |
|
144 |
show variables like 'timed_mutexes'; |
|
145 |
Variable_name Value |
|
146 |
timed_mutexes ON |
|
147 |
select * from information_schema.session_variables where variable_name like 'timed_mutexes'; |
|
148 |
VARIABLE_NAME VARIABLE_VALUE |
|
149 |
TIMED_MUTEXES ON |
|
150 |
set global timed_mutexes=0; |
|
151 |
show variables like 'timed_mutexes'; |
|
152 |
Variable_name Value |
|
153 |
timed_mutexes OFF |
|
154 |
select * from information_schema.session_variables where variable_name like 'timed_mutexes'; |
|
155 |
VARIABLE_NAME VARIABLE_VALUE |
|
156 |
TIMED_MUTEXES OFF |
|
1233.2.1
by Monty Taylor
Renamed instances of HEAP engine to MEMORY. Removed the alias. |
157 |
set storage_engine=MYISAM, storage_engine="MEMORY"; |
1
by brian
clean slate |
158 |
show local variables like 'storage_engine'; |
159 |
Variable_name Value |
|
160 |
storage_engine MEMORY |
|
161 |
select * from information_schema.session_variables where variable_name like 'storage_engine'; |
|
162 |
VARIABLE_NAME VARIABLE_VALUE |
|
163 |
STORAGE_ENGINE MEMORY |
|
164 |
show global variables like 'storage_engine'; |
|
165 |
Variable_name Value |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
166 |
storage_engine InnoDB |
1
by brian
clean slate |
167 |
select * from information_schema.global_variables where variable_name like 'storage_engine'; |
168 |
VARIABLE_NAME VARIABLE_VALUE |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
169 |
STORAGE_ENGINE InnoDB |
1
by brian
clean slate |
170 |
set GLOBAL myisam_max_sort_file_size=2000000; |
171 |
show global variables like 'myisam_max_sort_file_size'; |
|
172 |
Variable_name Value |
|
788
by Brian Aker
Move MyISAM bits to myisam plugin |
173 |
myisam_max_sort_file_size 2000000 |
1
by brian
clean slate |
174 |
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size'; |
175 |
VARIABLE_NAME VARIABLE_VALUE |
|
788
by Brian Aker
Move MyISAM bits to myisam plugin |
176 |
MYISAM_MAX_SORT_FILE_SIZE 2000000 |
1
by brian
clean slate |
177 |
set GLOBAL myisam_max_sort_file_size=default; |
178 |
show global variables like 'myisam_max_sort_file_size'; |
|
179 |
Variable_name Value |
|
788
by Brian Aker
Move MyISAM bits to myisam plugin |
180 |
myisam_max_sort_file_size 2147483647 |
1
by brian
clean slate |
181 |
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size'; |
182 |
VARIABLE_NAME VARIABLE_VALUE |
|
788
by Brian Aker
Move MyISAM bits to myisam plugin |
183 |
MYISAM_MAX_SORT_FILE_SIZE 2147483647 |
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
184 |
set global drizzle_protocol_buffer_length=1024; |
185 |
show global variables like 'drizzle_protocol_buffer_%'; |
|
186 |
Variable_name Value |
|
187 |
drizzle_protocol_buffer_length 1024 |
|
1225.1.23
by Padraig O'Sullivan
Removed a redundant order by in the variables test case and also updated its result file. |
188 |
select * from information_schema.global_variables where variable_name like 'drizzle_protocol_buffer_%'; |
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
189 |
VARIABLE_NAME VARIABLE_VALUE |
190 |
DRIZZLE_PROTOCOL_BUFFER_LENGTH 1024 |
|
191 |
show global variables like 'drizzle_protocol_buffer_%'; |
|
192 |
Variable_name Value |
|
193 |
drizzle_protocol_buffer_length 1024 |
|
1225.1.23
by Padraig O'Sullivan
Removed a redundant order by in the variables test case and also updated its result file. |
194 |
select * from information_schema.global_variables where variable_name like 'drizzle_protocol_buffer_%'; |
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
195 |
VARIABLE_NAME VARIABLE_VALUE |
196 |
DRIZZLE_PROTOCOL_BUFFER_LENGTH 1024 |
|
197 |
set global drizzle_protocol_buffer_length=1; |
|
971.7.3
by Eric Day
Added net_buffer_length tests back in as oldlibdrizzle_buffer_length tests. |
198 |
Warnings: |
199 |
Error 1292 Truncated incorrect buffer_length value: '1' |
|
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
200 |
show variables like 'drizzle_protocol_buffer_length'; |
971.7.3
by Eric Day
Added net_buffer_length tests back in as oldlibdrizzle_buffer_length tests. |
201 |
Variable_name Value |
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
202 |
drizzle_protocol_buffer_length 1024 |
203 |
set global drizzle_protocol_buffer_length=2000000000; |
|
971.7.3
by Eric Day
Added net_buffer_length tests back in as oldlibdrizzle_buffer_length tests. |
204 |
Warnings: |
205 |
Error 1292 Truncated incorrect buffer_length value: '2000000000' |
|
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
206 |
show variables like 'drizzle_protocol_buffer_length'; |
971.7.3
by Eric Day
Added net_buffer_length tests back in as oldlibdrizzle_buffer_length tests. |
207 |
Variable_name Value |
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
208 |
drizzle_protocol_buffer_length 1048576 |
1
by brian
clean slate |
209 |
show variables like '%alloc%'; |
210 |
Variable_name Value |
|
933.1.2
by Monty Taylor
Fixed merge weirdness errors. |
211 |
innodb_use_sys_malloc ON |
1
by brian
clean slate |
212 |
query_alloc_block_size 8192 |
213 |
query_prealloc_size 8192 |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
214 |
range_alloc_block_size
|
1
by brian
clean slate |
215 |
transaction_alloc_block_size 8192 |
216 |
transaction_prealloc_size 4096 |
|
1225.1.23
by Padraig O'Sullivan
Removed a redundant order by in the variables test case and also updated its result file. |
217 |
select * from information_schema.session_variables where variable_name like '%alloc%'; |
1
by brian
clean slate |
218 |
VARIABLE_NAME VARIABLE_VALUE |
933.1.2
by Monty Taylor
Fixed merge weirdness errors. |
219 |
INNODB_USE_SYS_MALLOC ON |
1
by brian
clean slate |
220 |
QUERY_ALLOC_BLOCK_SIZE 8192 |
221 |
QUERY_PREALLOC_SIZE 8192 |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
222 |
RANGE_ALLOC_BLOCK_SIZE
|
1
by brian
clean slate |
223 |
TRANSACTION_ALLOC_BLOCK_SIZE 8192 |
224 |
TRANSACTION_PREALLOC_SIZE 4096 |
|
225 |
set @@range_alloc_block_size=1024*16; |
|
226 |
set @@query_alloc_block_size=1024*17+2; |
|
227 |
set @@query_prealloc_size=1024*18; |
|
228 |
set @@transaction_alloc_block_size=1024*20-1; |
|
229 |
set @@transaction_prealloc_size=1024*21-1; |
|
230 |
select @@query_alloc_block_size; |
|
231 |
@@query_alloc_block_size |
|
232 |
17408
|
|
233 |
show variables like '%alloc%'; |
|
234 |
Variable_name Value |
|
933.1.2
by Monty Taylor
Fixed merge weirdness errors. |
235 |
innodb_use_sys_malloc ON |
1
by brian
clean slate |
236 |
query_alloc_block_size 17408 |
237 |
query_prealloc_size 18432 |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
238 |
range_alloc_block_size
|
1
by brian
clean slate |
239 |
transaction_alloc_block_size 19456 |
240 |
transaction_prealloc_size 20480 |
|
1225.1.23
by Padraig O'Sullivan
Removed a redundant order by in the variables test case and also updated its result file. |
241 |
select * from information_schema.session_variables where variable_name like '%alloc%'; |
1
by brian
clean slate |
242 |
VARIABLE_NAME VARIABLE_VALUE |
933.1.2
by Monty Taylor
Fixed merge weirdness errors. |
243 |
INNODB_USE_SYS_MALLOC ON |
1
by brian
clean slate |
244 |
QUERY_ALLOC_BLOCK_SIZE 17408 |
245 |
QUERY_PREALLOC_SIZE 18432 |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
246 |
RANGE_ALLOC_BLOCK_SIZE
|
1
by brian
clean slate |
247 |
TRANSACTION_ALLOC_BLOCK_SIZE 19456 |
248 |
TRANSACTION_PREALLOC_SIZE 20480 |
|
249 |
set @@range_alloc_block_size=default; |
|
250 |
set @@query_alloc_block_size=default, @@query_prealloc_size=default; |
|
251 |
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default; |
|
252 |
show variables like '%alloc%'; |
|
253 |
Variable_name Value |
|
933.1.2
by Monty Taylor
Fixed merge weirdness errors. |
254 |
innodb_use_sys_malloc ON |
1
by brian
clean slate |
255 |
query_alloc_block_size 8192 |
256 |
query_prealloc_size 8192 |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
257 |
range_alloc_block_size
|
1
by brian
clean slate |
258 |
transaction_alloc_block_size 8192 |
259 |
transaction_prealloc_size 4096 |
|
1225.1.23
by Padraig O'Sullivan
Removed a redundant order by in the variables test case and also updated its result file. |
260 |
select * from information_schema.session_variables where variable_name like '%alloc%'; |
1
by brian
clean slate |
261 |
VARIABLE_NAME VARIABLE_VALUE |
933.1.2
by Monty Taylor
Fixed merge weirdness errors. |
262 |
INNODB_USE_SYS_MALLOC ON |
1
by brian
clean slate |
263 |
QUERY_ALLOC_BLOCK_SIZE 8192 |
264 |
QUERY_PREALLOC_SIZE 8192 |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
265 |
RANGE_ALLOC_BLOCK_SIZE
|
1
by brian
clean slate |
266 |
TRANSACTION_ALLOC_BLOCK_SIZE 8192 |
267 |
TRANSACTION_PREALLOC_SIZE 4096 |
|
268 |
SELECT @@version LIKE 'non-existent'; |
|
269 |
@@version LIKE 'non-existent' |
|
270 |
0
|
|
271 |
SELECT @@version_compile_os LIKE 'non-existent'; |
|
272 |
@@version_compile_os LIKE 'non-existent' |
|
273 |
0
|
|
274 |
set unknown_variable=1; |
|
275 |
ERROR HY000: Unknown system variable 'unknown_variable' |
|
276 |
set max_join_size="hello"; |
|
277 |
ERROR 42000: Incorrect argument type to variable 'max_join_size' |
|
278 |
set storage_engine=UNKNOWN_TABLE_TYPE; |
|
279 |
ERROR 42000: Unknown table engine 'UNKNOWN_TABLE_TYPE' |
|
280 |
set GLOBAL storage_engine=DEFAULT; |
|
281 |
ERROR 42000: Variable 'storage_engine' doesn't have a default value |
|
282 |
set global autocommit=1; |
|
283 |
ERROR HY000: Variable 'autocommit' is a SESSION variable and can't be used with SET GLOBAL |
|
284 |
select @@global.timestamp; |
|
285 |
ERROR HY000: Variable 'timestamp' is a SESSION variable |
|
286 |
set @@version=''; |
|
287 |
ERROR HY000: Variable 'version' is a read only variable |
|
288 |
set myisam_max_sort_file_size=100; |
|
289 |
ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL |
|
290 |
set @@SQL_WARNINGS=NULL; |
|
291 |
ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'NULL' |
|
292 |
set autocommit=1; |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
293 |
select @@autocommit; |
294 |
@@autocommit |
|
295 |
1
|
|
1
by brian
clean slate |
296 |
set bulk_insert_buffer_size=100; |
297 |
set join_buffer_size=100; |
|
298 |
Warnings: |
|
910.4.10
by Stewart Smith
fix system variables for correct endian architectures. |
299 |
Error 1292 Truncated incorrect join_buffer_size value: '100' |
1
by brian
clean slate |
300 |
set last_insert_id=1; |
301 |
set max_allowed_packet=100; |
|
302 |
Warnings: |
|
910.4.10
by Stewart Smith
fix system variables for correct endian architectures. |
303 |
Error 1292 Truncated incorrect max_allowed_packet value: '100' |
1
by brian
clean slate |
304 |
set global max_connect_errors=100; |
305 |
set max_heap_table_size=100; |
|
306 |
Warnings: |
|
910.4.10
by Stewart Smith
fix system variables for correct endian architectures. |
307 |
Error 1292 Truncated incorrect max_heap_table_size value: '100' |
1
by brian
clean slate |
308 |
set max_join_size=100; |
309 |
set max_sort_length=100; |
|
310 |
set global max_write_lock_count=100; |
|
789
by Brian Aker
MyISAM fix. |
311 |
set global myisam_sort_buffer_size=100; |
312 |
Warnings: |
|
910.4.10
by Stewart Smith
fix system variables for correct endian architectures. |
313 |
Error 1292 Truncated incorrect sort_buffer_size value: '100' |
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
314 |
set global drizzle_protocol_buffer_length=100; |
971.7.3
by Eric Day
Added net_buffer_length tests back in as oldlibdrizzle_buffer_length tests. |
315 |
Warnings: |
316 |
Error 1292 Truncated incorrect buffer_length value: '100' |
|
1
by brian
clean slate |
317 |
set read_buffer_size=100; |
318 |
Warnings: |
|
910.4.10
by Stewart Smith
fix system variables for correct endian architectures. |
319 |
Error 1292 Truncated incorrect read_buffer_size value: '100' |
1
by brian
clean slate |
320 |
set read_rnd_buffer_size=100; |
321 |
set global server_id=100; |
|
322 |
set sort_buffer_size=100; |
|
323 |
Warnings: |
|
910.4.10
by Stewart Smith
fix system variables for correct endian architectures. |
324 |
Error 1292 Truncated incorrect sort_buffer_size value: '100' |
1
by brian
clean slate |
325 |
set sql_big_selects=1; |
326 |
set sql_buffer_result=1; |
|
327 |
set sql_select_limit=1; |
|
328 |
set sql_select_limit=default; |
|
329 |
set sql_warnings=1; |
|
330 |
set global table_open_cache=100; |
|
331 |
set storage_engine=myisam; |
|
332 |
set timestamp=1, timestamp=default; |
|
333 |
set tmp_table_size=100; |
|
334 |
Warnings: |
|
910.4.10
by Stewart Smith
fix system variables for correct endian architectures. |
335 |
Error 1292 Truncated incorrect tmp_table_size value: '100' |
1
by brian
clean slate |
336 |
set tx_isolation="READ-COMMITTED"; |
1063.9.46
by Stewart Smith
variables.test for MyISAM as temp only. |
337 |
create temporary table t1 (a int not null auto_increment, primary key(a)); |
338 |
create temporary table t2 (a int not null auto_increment, primary key(a)); |
|
1
by brian
clean slate |
339 |
insert into t1 values(null),(null),(null); |
340 |
insert into t2 values(null),(null),(null); |
|
341 |
set global key_buffer_size=100000; |
|
342 |
select @@key_buffer_size; |
|
343 |
@@key_buffer_size |
|
344 |
98304
|
|
345 |
select * from t1 where a=2; |
|
346 |
a
|
|
347 |
2
|
|
348 |
select * from t2 where a=3; |
|
349 |
a
|
|
350 |
3
|
|
351 |
check table t1,t2; |
|
352 |
Table Op Msg_type Msg_text |
|
353 |
test.t1 check status OK |
|
354 |
test.t2 check status OK |
|
355 |
select max(a) +1, max(a) +2 into @xx,@yy from t1; |
|
356 |
drop table t1,t2; |
|
357 |
select @@xxxxxxxxxx; |
|
358 |
ERROR HY000: Unknown system variable 'xxxxxxxxxx' |
|
359 |
select 1; |
|
360 |
1
|
|
361 |
1
|
|
362 |
select @@session.key_buffer_size; |
|
363 |
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable |
|
364 |
set global myisam_max_sort_file_size=4294967296; |
|
365 |
show global variables like 'myisam_max_sort_file_size'; |
|
366 |
Variable_name Value |
|
367 |
myisam_max_sort_file_size MAX_FILE_SIZE |
|
368 |
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size'; |
|
369 |
VARIABLE_NAME VARIABLE_VALUE |
|
370 |
MYISAM_MAX_SORT_FILE_SIZE MAX_FILE_SIZE |
|
371 |
set global myisam_max_sort_file_size=default; |
|
372 |
set @@global.global.key_buffer_size= 1; |
|
1106.4.2
by Brian Aker
Remove multi key cache |
373 |
ERROR HY000: Unknown system variable 'global' |
1
by brian
clean slate |
374 |
set GLOBAL global.key_buffer_size= 1; |
1106.4.2
by Brian Aker
Remove multi key cache |
375 |
ERROR HY000: Unknown system variable 'global' |
1
by brian
clean slate |
376 |
SELECT @@global.global.key_buffer_size; |
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
377 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'key_buffer_size' at line 1 |
1
by brian
clean slate |
378 |
SELECT @@global.session.key_buffer_size; |
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
379 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'key_buffer_size' at line 1 |
1
by brian
clean slate |
380 |
SELECT @@global.local.key_buffer_size; |
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
381 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'key_buffer_size' at line 1 |
1063.9.46
by Stewart Smith
variables.test for MyISAM as temp only. |
382 |
create temporary table t1 ( |
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
383 |
c1 int, |
384 |
c2 int, |
|
385 |
c3 int, |
|
1
by brian
clean slate |
386 |
c4 int, |
387 |
c5 bigint); |
|
388 |
show create table t1; |
|
389 |
Table Create Table |
|
1063.9.46
by Stewart Smith
variables.test for MyISAM as temp only. |
390 |
t1 CREATE TEMPORARY TABLE `t1` ( |
873.2.35
by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements. |
391 |
`c1` int DEFAULT NULL, |
392 |
`c2` int DEFAULT NULL, |
|
393 |
`c3` int DEFAULT NULL, |
|
394 |
`c4` int DEFAULT NULL, |
|
395 |
`c5` bigint DEFAULT NULL |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
396 |
) ENGINE=MyISAM |
1
by brian
clean slate |
397 |
drop table t1; |
398 |
set @arg00= 8, @arg01= 8.8, @arg02= 'a string', @arg03= 0.2e0; |
|
1063.9.46
by Stewart Smith
variables.test for MyISAM as temp only. |
399 |
create temporary table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4; |
1
by brian
clean slate |
400 |
show create table t1; |
401 |
Table Create Table |
|
1063.9.46
by Stewart Smith
variables.test for MyISAM as temp only. |
402 |
t1 CREATE TEMPORARY TABLE `t1` ( |
873.2.35
by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements. |
403 |
`c1` bigint DEFAULT NULL, |
404 |
`c2` decimal(65,30) DEFAULT NULL, |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
405 |
`c3` text, |
873.2.35
by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements. |
406 |
`c4` double DEFAULT NULL |
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
407 |
) ENGINE=MyISAM |
1
by brian
clean slate |
408 |
drop table t1; |
409 |
SET GLOBAL table_open_cache=-1; |
|
410 |
Warnings: |
|
910.4.10
by Stewart Smith
fix system variables for correct endian architectures. |
411 |
Error 1292 Truncated incorrect table_open_cache value: '18446744073709551615' |
1
by brian
clean slate |
412 |
SHOW VARIABLES LIKE 'table_open_cache'; |
413 |
Variable_name Value |
|
910.4.10
by Stewart Smith
fix system variables for correct endian architectures. |
414 |
table_open_cache 100 |
971.2.1
by Eric Day
Fix for bug #311025. This was due to code that was removed during ulong cleanup (r576). |
415 |
SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache'; |
416 |
VARIABLE_NAME VARIABLE_VALUE |
|
417 |
TABLE_OPEN_CACHE 100 |
|
1
by brian
clean slate |
418 |
SET GLOBAL table_open_cache=DEFAULT; |
419 |
*** Various tests with LC_TIME_NAMES |
|
420 |
*** LC_TIME_NAMES: testing case insensitivity |
|
421 |
set @@lc_time_names='ru_ru'; |
|
422 |
select @@lc_time_names; |
|
423 |
@@lc_time_names |
|
424 |
ru_RU
|
|
425 |
*** LC_TIME_NAMES: testing with a user variable |
|
426 |
set @lc='JA_JP'; |
|
427 |
set @@lc_time_names=@lc; |
|
428 |
select @@lc_time_names; |
|
429 |
@@lc_time_names |
|
430 |
ja_JP
|
|
431 |
*** LC_TIME_NAMES: testing with string expressions |
|
432 |
set lc_time_names=concat('de','_','DE'); |
|
433 |
select @@lc_time_names; |
|
434 |
@@lc_time_names |
|
435 |
de_DE
|
|
436 |
set lc_time_names=concat('de','+','DE'); |
|
437 |
ERROR HY000: Unknown locale: 'de+DE' |
|
438 |
select @@lc_time_names; |
|
439 |
@@lc_time_names |
|
440 |
de_DE
|
|
441 |
LC_TIME_NAMES: testing with numeric expressions |
|
442 |
set @@lc_time_names=1+2; |
|
443 |
select @@lc_time_names; |
|
444 |
@@lc_time_names |
|
445 |
sv_SE
|
|
446 |
set @@lc_time_names=1/0; |
|
447 |
ERROR 42000: Incorrect argument type to variable 'lc_time_names' |
|
448 |
select @@lc_time_names; |
|
449 |
@@lc_time_names |
|
450 |
sv_SE
|
|
451 |
set lc_time_names=en_US; |
|
452 |
LC_TIME_NAMES: testing NULL and a negative number: |
|
453 |
set lc_time_names=NULL; |
|
454 |
ERROR 42000: Variable 'lc_time_names' can't be set to the value of 'NULL' |
|
455 |
set lc_time_names=-1; |
|
456 |
ERROR HY000: Unknown locale: '-1' |
|
457 |
select @@lc_time_names; |
|
458 |
@@lc_time_names |
|
459 |
en_US
|
|
460 |
LC_TIME_NAMES: testing locale with the last ID: |
|
461 |
set lc_time_names=108; |
|
462 |
select @@lc_time_names; |
|
463 |
@@lc_time_names |
|
464 |
zh_HK
|
|
465 |
LC_TIME_NAMES: testing a number beyond the valid ID range: |
|
466 |
set lc_time_names=109; |
|
467 |
ERROR HY000: Unknown locale: '109' |
|
468 |
select @@lc_time_names; |
|
469 |
@@lc_time_names |
|
470 |
zh_HK
|
|
471 |
LC_TIME_NAMES: testing that 0 is en_US: |
|
472 |
set lc_time_names=0; |
|
473 |
select @@lc_time_names; |
|
474 |
@@lc_time_names |
|
475 |
en_US
|
|
476 |
select @@global.lc_time_names, @@lc_time_names; |
|
477 |
@@global.lc_time_names @@lc_time_names |
|
478 |
en_US en_US |
|
479 |
set @@global.lc_time_names=fr_FR; |
|
480 |
select @@global.lc_time_names, @@lc_time_names; |
|
481 |
@@global.lc_time_names @@lc_time_names |
|
482 |
fr_FR en_US |
|
483 |
New connection |
|
484 |
select @@global.lc_time_names, @@lc_time_names; |
|
485 |
@@global.lc_time_names @@lc_time_names |
|
486 |
fr_FR fr_FR |
|
487 |
set @@lc_time_names=ru_RU; |
|
488 |
select @@global.lc_time_names, @@lc_time_names; |
|
489 |
@@global.lc_time_names @@lc_time_names |
|
490 |
fr_FR ru_RU |
|
491 |
Returnung to default connection |
|
492 |
select @@global.lc_time_names, @@lc_time_names; |
|
493 |
@@global.lc_time_names @@lc_time_names |
|
494 |
fr_FR en_US |
|
495 |
set lc_time_names=default; |
|
496 |
select @@global.lc_time_names, @@lc_time_names; |
|
497 |
@@global.lc_time_names @@lc_time_names |
|
498 |
fr_FR fr_FR |
|
499 |
set @@global.lc_time_names=default; |
|
500 |
select @@global.lc_time_names, @@lc_time_names; |
|
501 |
@@global.lc_time_names @@lc_time_names |
|
502 |
en_US fr_FR |
|
503 |
set @@lc_time_names=default; |
|
504 |
select @@global.lc_time_names, @@lc_time_names; |
|
505 |
@@global.lc_time_names @@lc_time_names |
|
506 |
en_US en_US |
|
507 |
set @test = @@query_prealloc_size; |
|
508 |
set @@query_prealloc_size = @test; |
|
509 |
select @@query_prealloc_size = @test; |
|
510 |
@@query_prealloc_size = @test |
|
511 |
1
|
|
512 |
End of 4.1 tests |
|
1063.9.46
by Stewart Smith
variables.test for MyISAM as temp only. |
513 |
create temporary table t1 (a int); |
1
by brian
clean slate |
514 |
select a into @x from t1; |
515 |
Warnings: |
|
516 |
Warning 1329 No data - zero rows fetched, selected, or processed |
|
517 |
show warnings; |
|
518 |
Level Code Message |
|
519 |
Warning 1329 No data - zero rows fetched, selected, or processed |
|
520 |
drop table t1; |
|
521 |
set @@warning_count=1; |
|
522 |
ERROR HY000: Variable 'warning_count' is a read only variable |
|
523 |
set @@global.error_count=1; |
|
524 |
ERROR HY000: Variable 'error_count' is a read only variable |
|
525 |
select @@character_set_system; |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
526 |
ERROR HY000: Unknown system variable 'character_set_system' |
527 |
set global character_set_system = utf8; |
|
528 |
ERROR HY000: Unknown system variable 'character_set_system' |
|
1
by brian
clean slate |
529 |
set @@global.version_compile_os='234'; |
530 |
ERROR HY000: Variable 'version_compile_os' is a read only variable |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
531 |
set @@global.character_set_filesystem=utf8; |
532 |
ERROR HY000: Unknown system variable 'character_set_filesystem' |
|
533 |
set character_set_filesystem=utf8; |
|
534 |
ERROR HY000: Unknown system variable 'character_set_filesystem' |
|
1
by brian
clean slate |
535 |
set @old_sql_big_selects = @@sql_big_selects; |
536 |
set @@sql_big_selects = 1; |
|
537 |
show variables like 'sql_big_selects'; |
|
538 |
Variable_name Value |
|
539 |
sql_big_selects ON |
|
540 |
set @@sql_big_selects = @old_sql_big_selects; |
|
541 |
set @@sql_notes = 0, @@sql_warnings = 0; |
|
542 |
show variables like 'sql_notes'; |
|
543 |
Variable_name Value |
|
544 |
sql_notes OFF |
|
545 |
show variables like 'sql_warnings'; |
|
546 |
Variable_name Value |
|
547 |
sql_warnings OFF |
|
548 |
set @@sql_notes = 1, @@sql_warnings = 1; |
|
549 |
show variables like 'sql_notes'; |
|
550 |
Variable_name Value |
|
551 |
sql_notes ON |
|
552 |
show variables like 'sql_warnings'; |
|
553 |
Variable_name Value |
|
554 |
sql_warnings ON |
|
555 |
select @@version, @@version_comment, @@version_compile_machine, |
|
556 |
@@version_compile_os; |
|
557 |
@@version @@version_comment @@version_compile_machine @@version_compile_os |
|
558 |
# # # #
|
|
559 |
select @@basedir, @@datadir, @@tmpdir; |
|
560 |
@@basedir @@datadir @@tmpdir |
|
561 |
# # #
|
|
562 |
show variables like 'basedir'; |
|
563 |
Variable_name Value |
|
564 |
basedir # |
|
565 |
show variables like 'datadir'; |
|
566 |
Variable_name Value |
|
567 |
datadir # |
|
568 |
show variables like 'tmpdir'; |
|
569 |
Variable_name Value |
|
570 |
tmpdir # |
|
571 |
select @@""; |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
572 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '""' at line 1 |
1
by brian
clean slate |
573 |
select @@&; |
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
574 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '&' at line 1 |
1
by brian
clean slate |
575 |
select @@@; |
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
576 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '@' at line 1 |
1
by brian
clean slate |
577 |
select @@hostname; |
578 |
@@hostname |
|
579 |
#
|
|
580 |
set @@hostname= "anothername"; |
|
581 |
ERROR HY000: Variable 'hostname' is a read only variable |
|
582 |
show variables like 'hostname'; |
|
583 |
Variable_name Value |
|
584 |
hostname # |
|
585 |
End of 5.0 tests |
|
586 |
set global flush_time =@my_flush_time; |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
587 |
ERROR HY000: Unknown system variable 'flush_time' |
1
by brian
clean slate |
588 |
set global key_buffer_size =@my_key_buffer_size; |
589 |
set global max_connect_errors =@my_max_connect_errors; |
|
590 |
set global max_heap_table_size =@my_max_heap_table_size; |
|
591 |
set global max_join_size =@my_max_join_size; |
|
592 |
set global max_write_lock_count =default; |
|
593 |
set global myisam_data_pointer_size =@my_myisam_data_pointer_size; |
|
790
by Brian Aker
More myisam plugin conversion. |
594 |
ERROR 42000: Incorrect argument type to variable 'myisam_data_pointer_size' |
971.7.11
by Eric Day
Fixed header file guards and fixed test cases. |
595 |
set global drizzle_protocol_buffer_length= @my_drizzle_protocol_buffer_length; |
1
by brian
clean slate |
596 |
set global server_id =@my_server_id; |
597 |
set global storage_engine =@my_storage_engine; |
|
598 |
set global thread_cache_size =@my_thread_cache_size; |
|
642.1.53
by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests |
599 |
ERROR HY000: Unknown system variable 'thread_cache_size' |
1119.4.14
by Stewart Smith
slightly out of order variables result from fixing up server state |
600 |
set global myisam_sort_buffer_size =@my_myisam_sort_buffer_size; |
1055.1.2
by Padraig O'Sullivan
Updated test case based on bug fix. |
601 |
show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout'; |
602 |
Variable_name Value |
|
603 |
table_definition_cache # |
|
604 |
table_lock_wait_timeout # |