~drizzle-trunk/drizzle/development

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