~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
drop table if exists t1,t2;
2415.1.3 by Brian Aker
Fix non-repeatable tests.
2
set @my_sort_buffer_size	  =@@global.sort_buffer_size;
1 by brian
clean slate
3
set @my_max_heap_table_size       =@@global.max_heap_table_size;
4
set @my_max_join_size             =@@global.max_join_size;
1305.1.1 by Eric Day
Switched to using the MySQL protocol by default.
5
set @my_mysql_protocol_buffer_length =@@global.mysql_protocol_buffer_length;
1 by brian
clean slate
6
set @my_server_id                 =@@global.server_id;
7
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
8
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
9
set @my_tx_isolation	  =@@global.tx_isolation;
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
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
87
select * from data_dictionary.session_variables where variable_name like 'max_join_size';
1 by brian
clean slate
88
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
89
max_join_size	100
1 by brian
clean slate
90
show global variables like 'max_join_size';
91
Variable_name	Value
92
max_join_size	10
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
93
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
1 by brian
clean slate
94
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
95
max_join_size	10
1 by brian
clean slate
96
set GLOBAL max_join_size=2000;
97
show global variables like 'max_join_size';
98
Variable_name	Value
99
max_join_size	2000
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
100
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
1 by brian
clean slate
101
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
102
max_join_size	2000
1 by brian
clean slate
103
set max_join_size=DEFAULT;
104
show variables like 'max_join_size';
105
Variable_name	Value
106
max_join_size	2000
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
107
select * from data_dictionary.session_variables where variable_name like 'max_join_size';
1 by brian
clean slate
108
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
109
max_join_size	2000
1 by brian
clean slate
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
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
114
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
1 by brian
clean slate
115
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
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
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
147
select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
1 by brian
clean slate
148
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
149
timed_mutexes	ON
1 by brian
clean slate
150
set global timed_mutexes=0;
151
show variables like 'timed_mutexes';
152
Variable_name	Value
153
timed_mutexes	OFF
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
154
select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
1 by brian
clean slate
155
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
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
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
161
select * from data_dictionary.session_variables where variable_name like 'storage_engine';
1 by brian
clean slate
162
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
163
storage_engine	MEMORY
1 by brian
clean slate
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
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
167
select * from data_dictionary.global_variables where variable_name like 'storage_engine';
1 by brian
clean slate
168
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
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
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
174
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
1 by brian
clean slate
175
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
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
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
181
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
1 by brian
clean slate
182
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
183
myisam_max_sort_file_size	2147483647
1305.1.1 by Eric Day
Switched to using the MySQL protocol by default.
184
set global mysql_protocol_buffer_length=1024;
185
show global variables like 'mysql_protocol_buffer_%';
186
Variable_name	Value
187
mysql_protocol_buffer_length	1024
188
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
189
VARIABLE_NAME	VARIABLE_VALUE
190
mysql_protocol_buffer_length	1024
191
show global variables like 'mysql_protocol_buffer_%';
192
Variable_name	Value
193
mysql_protocol_buffer_length	1024
194
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
195
VARIABLE_NAME	VARIABLE_VALUE
196
mysql_protocol_buffer_length	1024
197
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.
198
Warnings:
1964.2.10 by Monty Taylor
Changed show SHOW_INT works ... man, trying to cast things as a method of data storage is lame.
199
Error	1524	Error setting mysql_protocol_buffer_length. Given value 1 (< 1024)
1305.1.1 by Eric Day
Switched to using the MySQL protocol by default.
200
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.
201
Variable_name	Value
1305.1.1 by Eric Day
Switched to using the MySQL protocol by default.
202
mysql_protocol_buffer_length	1024
203
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.
204
Warnings:
1964.2.10 by Monty Taylor
Changed show SHOW_INT works ... man, trying to cast things as a method of data storage is lame.
205
Error	1524	Error setting mysql_protocol_buffer_length. Given value 2000000000 (> 1048576)
1305.1.1 by Eric Day
Switched to using the MySQL protocol by default.
206
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.
207
Variable_name	Value
1964.2.10 by Monty Taylor
Changed show SHOW_INT works ... man, trying to cast things as a method of data storage is lame.
208
mysql_protocol_buffer_length	1024
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
1273.13.72 by Brian Aker
1) Reduced the size of VARIABLE_VALUE.
214
range_alloc_block_size	4096
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
215
select * from data_dictionary.session_variables where variable_name like '%alloc%';
1 by brian
clean slate
216
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
217
innodb_use_sys_malloc	ON
218
query_alloc_block_size	8192
219
query_prealloc_size	8192
1273.13.72 by Brian Aker
1) Reduced the size of VARIABLE_VALUE.
220
range_alloc_block_size	4096
1 by brian
clean slate
221
set @@range_alloc_block_size=1024*16;
222
set @@query_alloc_block_size=1024*17+2;
223
set @@query_prealloc_size=1024*18;
224
select @@query_alloc_block_size;
225
@@query_alloc_block_size
226
17408
227
show variables like '%alloc%';
228
Variable_name	Value
933.1.2 by Monty Taylor
Fixed merge weirdness errors.
229
innodb_use_sys_malloc	ON
1 by brian
clean slate
230
query_alloc_block_size	17408
231
query_prealloc_size	18432
1273.13.72 by Brian Aker
1) Reduced the size of VARIABLE_VALUE.
232
range_alloc_block_size	16384
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
233
select * from data_dictionary.session_variables where variable_name like '%alloc%';
1 by brian
clean slate
234
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
235
innodb_use_sys_malloc	ON
236
query_alloc_block_size	17408
237
query_prealloc_size	18432
1273.13.72 by Brian Aker
1) Reduced the size of VARIABLE_VALUE.
238
range_alloc_block_size	16384
1 by brian
clean slate
239
set @@range_alloc_block_size=default;
240
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
241
show variables like '%alloc%';
242
Variable_name	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	8192
245
query_prealloc_size	8192
1273.13.72 by Brian Aker
1) Reduced the size of VARIABLE_VALUE.
246
range_alloc_block_size	4096
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
247
select * from data_dictionary.session_variables where variable_name like '%alloc%';
1 by brian
clean slate
248
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
249
innodb_use_sys_malloc	ON
250
query_alloc_block_size	8192
251
query_prealloc_size	8192
1273.13.72 by Brian Aker
1) Reduced the size of VARIABLE_VALUE.
252
range_alloc_block_size	4096
1 by brian
clean slate
253
SELECT @@version LIKE 'non-existent';
254
@@version LIKE 'non-existent'
255
0
256
SELECT @@version_compile_os LIKE 'non-existent';
257
@@version_compile_os LIKE 'non-existent'
258
0
259
set unknown_variable=1;
260
ERROR HY000: Unknown system variable 'unknown_variable'
261
set max_join_size="hello";
262
ERROR 42000: Incorrect argument type to variable 'max_join_size'
263
set storage_engine=UNKNOWN_TABLE_TYPE;
264
ERROR 42000: Unknown table engine 'UNKNOWN_TABLE_TYPE'
265
set GLOBAL storage_engine=DEFAULT;
266
ERROR 42000: Variable 'storage_engine' doesn't have a default value
267
set global autocommit=1;
268
ERROR HY000: Variable 'autocommit' is a SESSION variable and can't be used with SET GLOBAL
269
select @@global.timestamp;
270
ERROR HY000: Variable 'timestamp' is a SESSION variable
271
set @@version='';
272
ERROR HY000: Variable 'version' is a read only variable
273
set myisam_max_sort_file_size=100;
274
ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
275
set @@SQL_WARNINGS=NULL;
276
ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'NULL'
277
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
278
select @@autocommit;
279
@@autocommit
280
1
1 by brian
clean slate
281
set bulk_insert_buffer_size=100;
282
set join_buffer_size=100;
283
Warnings:
910.4.10 by Stewart Smith
fix system variables for correct endian architectures.
284
Error	1292	Truncated incorrect join_buffer_size value: '100'
1 by brian
clean slate
285
set last_insert_id=1;
286
set max_allowed_packet=100;
287
Warnings:
910.4.10 by Stewart Smith
fix system variables for correct endian architectures.
288
Error	1292	Truncated incorrect max_allowed_packet value: '100'
1 by brian
clean slate
289
set max_heap_table_size=100;
290
Warnings:
910.4.10 by Stewart Smith
fix system variables for correct endian architectures.
291
Error	1292	Truncated incorrect max_heap_table_size value: '100'
1 by brian
clean slate
292
set max_join_size=100;
293
set max_sort_length=100;
294
set global max_write_lock_count=100;
789 by Brian Aker
MyISAM fix.
295
set global myisam_sort_buffer_size=100;
296
Warnings:
1964.1.4 by Monty Taylor
Use boost::exception data bundling instead of co-opting the exceptions
297
Error	1524	Error setting myisam_sort_buffer_size. Given value 100 (< 1024)
1305.1.1 by Eric Day
Switched to using the MySQL protocol by default.
298
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.
299
Warnings:
1964.2.10 by Monty Taylor
Changed show SHOW_INT works ... man, trying to cast things as a method of data storage is lame.
300
Error	1524	Error setting mysql_protocol_buffer_length. Given value 100 (< 1024)
1 by brian
clean slate
301
set read_buffer_size=100;
302
Warnings:
910.4.10 by Stewart Smith
fix system variables for correct endian architectures.
303
Error	1292	Truncated incorrect read_buffer_size value: '100'
1 by brian
clean slate
304
set read_rnd_buffer_size=100;
305
set global server_id=100;
306
set sort_buffer_size=100;
307
Warnings:
910.4.10 by Stewart Smith
fix system variables for correct endian architectures.
308
Error	1292	Truncated incorrect sort_buffer_size value: '100'
1 by brian
clean slate
309
set sql_big_selects=1;
310
set sql_buffer_result=1;
311
set sql_select_limit=1;
312
set sql_select_limit=default;
313
set sql_warnings=1;
314
set global table_open_cache=100;
315
set storage_engine=myisam;
316
set timestamp=1, timestamp=default;
317
set tmp_table_size=100;
318
Warnings:
910.4.10 by Stewart Smith
fix system variables for correct endian architectures.
319
Error	1292	Truncated incorrect tmp_table_size value: '100'
1 by brian
clean slate
320
set tx_isolation="READ-COMMITTED";
321
set global myisam_max_sort_file_size=4294967296;
322
show global variables like 'myisam_max_sort_file_size';
323
Variable_name	Value
324
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
325
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
1 by brian
clean slate
326
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
327
myisam_max_sort_file_size	MAX_FILE_SIZE
1 by brian
clean slate
328
set global myisam_max_sort_file_size=default;
1063.9.46 by Stewart Smith
variables.test for MyISAM as temp only.
329
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
330
c1 int,
331
c2 int,
332
c3 int,
1 by brian
clean slate
333
c4 int,
334
c5 bigint);
335
show create table t1;
336
Table	Create Table
1063.9.46 by Stewart Smith
variables.test for MyISAM as temp only.
337
t1	CREATE TEMPORARY TABLE `t1` (
1743.5.2 by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output
338
  `c1` INT DEFAULT NULL,
339
  `c2` INT DEFAULT NULL,
340
  `c3` INT DEFAULT NULL,
341
  `c4` INT DEFAULT NULL,
342
  `c5` BIGINT DEFAULT NULL
1638.10.82 by Stewart Smith
fix some tests for explicit COLLATE in CREATE TABLE
343
) ENGINE=MyISAM COLLATE = utf8_general_ci
1 by brian
clean slate
344
drop table t1;
345
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.
346
create temporary table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4;
1 by brian
clean slate
347
show create table t1;
348
Table	Create Table
1063.9.46 by Stewart Smith
variables.test for MyISAM as temp only.
349
t1	CREATE TEMPORARY TABLE `t1` (
1743.5.2 by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output
350
  `c1` BIGINT DEFAULT NULL,
351
  `c2` DECIMAL(65,30) DEFAULT NULL,
352
  `c3` TEXT COLLATE utf8_general_ci,
353
  `c4` DOUBLE DEFAULT NULL
1638.10.82 by Stewart Smith
fix some tests for explicit COLLATE in CREATE TABLE
354
) ENGINE=MyISAM COLLATE = utf8_general_ci
1 by brian
clean slate
355
drop table t1;
356
SET GLOBAL table_open_cache=-1;
357
Warnings:
910.4.10 by Stewart Smith
fix system variables for correct endian architectures.
358
Error	1292	Truncated incorrect table_open_cache value: '18446744073709551615'
1 by brian
clean slate
359
SHOW VARIABLES LIKE 'table_open_cache';
360
Variable_name	Value
910.4.10 by Stewart Smith
fix system variables for correct endian architectures.
361
table_open_cache	100
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
362
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).
363
VARIABLE_NAME	VARIABLE_VALUE
1280.1.1 by Brian Aker
Remove option where variable case is changed.
364
table_open_cache	100
1 by brian
clean slate
365
SET GLOBAL table_open_cache=DEFAULT;
366
*** Various tests with LC_TIME_NAMES
367
*** LC_TIME_NAMES: testing case insensitivity
368
set @@lc_time_names='ru_ru';
369
select @@lc_time_names;
370
@@lc_time_names
371
ru_RU
372
*** LC_TIME_NAMES: testing with a user variable
373
set @lc='JA_JP';
374
set @@lc_time_names=@lc;
375
select @@lc_time_names;
376
@@lc_time_names
377
ja_JP
378
*** LC_TIME_NAMES: testing with string expressions
379
set lc_time_names=concat('de','_','DE');
380
select @@lc_time_names;
381
@@lc_time_names
382
de_DE
383
set lc_time_names=concat('de','+','DE');
384
ERROR HY000: Unknown locale: 'de+DE'
385
select @@lc_time_names;
386
@@lc_time_names
387
de_DE
388
LC_TIME_NAMES: testing with numeric expressions
389
set @@lc_time_names=1+2;
390
select @@lc_time_names;
391
@@lc_time_names
392
sv_SE
393
set @@lc_time_names=1/0;
394
ERROR 42000: Incorrect argument type to variable 'lc_time_names'
395
select @@lc_time_names;
396
@@lc_time_names
397
sv_SE
398
set lc_time_names=en_US;
399
LC_TIME_NAMES: testing NULL and a negative number:
400
set lc_time_names=NULL;
401
ERROR 42000: Variable 'lc_time_names' can't be set to the value of 'NULL'
402
set lc_time_names=-1;
403
ERROR HY000: Unknown locale: '-1'
404
select @@lc_time_names;
405
@@lc_time_names
406
en_US
407
LC_TIME_NAMES: testing locale with the last ID:
408
set lc_time_names=108;
409
select @@lc_time_names;
410
@@lc_time_names
411
zh_HK
412
LC_TIME_NAMES: testing a number beyond the valid ID range:
413
set lc_time_names=109;
414
ERROR HY000: Unknown locale: '109'
415
select @@lc_time_names;
416
@@lc_time_names
417
zh_HK
418
LC_TIME_NAMES: testing that 0 is en_US:
419
set lc_time_names=0;
420
select @@lc_time_names;
421
@@lc_time_names
422
en_US
423
select @@global.lc_time_names, @@lc_time_names;
424
@@global.lc_time_names	@@lc_time_names
425
en_US	en_US
426
set @@global.lc_time_names=fr_FR;
427
select @@global.lc_time_names, @@lc_time_names;
428
@@global.lc_time_names	@@lc_time_names
429
fr_FR	en_US
430
New connection
431
select @@global.lc_time_names, @@lc_time_names;
432
@@global.lc_time_names	@@lc_time_names
433
fr_FR	fr_FR
434
set @@lc_time_names=ru_RU;
435
select @@global.lc_time_names, @@lc_time_names;
436
@@global.lc_time_names	@@lc_time_names
437
fr_FR	ru_RU
438
Returnung to default connection
439
select @@global.lc_time_names, @@lc_time_names;
440
@@global.lc_time_names	@@lc_time_names
441
fr_FR	en_US
442
set lc_time_names=default;
443
select @@global.lc_time_names, @@lc_time_names;
444
@@global.lc_time_names	@@lc_time_names
445
fr_FR	fr_FR
446
set @@global.lc_time_names=default;
447
select @@global.lc_time_names, @@lc_time_names;
448
@@global.lc_time_names	@@lc_time_names
449
en_US	fr_FR
450
set @@lc_time_names=default;
451
select @@global.lc_time_names, @@lc_time_names;
452
@@global.lc_time_names	@@lc_time_names
453
en_US	en_US
454
set @test = @@query_prealloc_size;
455
set @@query_prealloc_size = @test;
456
select @@query_prealloc_size = @test;
457
@@query_prealloc_size = @test
458
1
459
End of 4.1 tests
1063.9.46 by Stewart Smith
variables.test for MyISAM as temp only.
460
create temporary table t1 (a int);
1 by brian
clean slate
461
select a into @x from t1;
462
Warnings:
463
Warning	1329	No data - zero rows fetched, selected, or processed
464
show warnings;
465
Level	Code	Message
466
Warning	1329	No data - zero rows fetched, selected, or processed
467
drop table t1;
468
set @@warning_count=1;
469
ERROR HY000: Variable 'warning_count' is a read only variable
470
set @@global.error_count=1;
471
ERROR HY000: Variable 'error_count' is a read only variable
472
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
473
ERROR HY000: Unknown system variable 'character_set_system'
474
set global character_set_system = utf8;
475
ERROR HY000: Unknown system variable 'character_set_system'
1 by brian
clean slate
476
set @@global.version_compile_os='234';
477
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
478
set @@global.character_set_filesystem=utf8;
479
ERROR HY000: Unknown system variable 'character_set_filesystem'
480
set character_set_filesystem=utf8;
481
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
482
set @sql_big_selects = @@sql_big_selects;
1 by brian
clean slate
483
set @@sql_big_selects = 1;
484
show variables like 'sql_big_selects';
485
Variable_name	Value
486
sql_big_selects	ON
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
487
set @@sql_big_selects = @sql_big_selects;
1 by brian
clean slate
488
set @@sql_notes = 0, @@sql_warnings = 0;
489
show variables like 'sql_notes';
490
Variable_name	Value
491
sql_notes	OFF
492
show variables like 'sql_warnings';
493
Variable_name	Value
494
sql_warnings	OFF
495
set @@sql_notes = 1, @@sql_warnings = 1;
496
show variables like 'sql_notes';
497
Variable_name	Value
498
sql_notes	ON
499
show variables like 'sql_warnings';
500
Variable_name	Value
501
sql_warnings	ON
502
select @@version, @@version_comment, @@version_compile_machine,
503
@@version_compile_os;
504
@@version	@@version_comment	@@version_compile_machine	@@version_compile_os
505
#	#	#	#
506
select @@basedir, @@datadir, @@tmpdir;
507
@@basedir	@@datadir	@@tmpdir
508
#	#	#
509
show variables like 'basedir';
510
Variable_name	Value
511
basedir	#
512
show variables like 'datadir';
513
Variable_name	Value
514
datadir	#
515
show variables like 'tmpdir';
516
Variable_name	Value
517
tmpdir	#
518
select @@"";
642.1.53 by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests
519
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
520
select @@&;
642.1.53 by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests
521
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
522
select @@@;
642.1.53 by Lee
enable subselect_not, subselect_no_mat and variables tests, some other misc clean up on other tests
523
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
524
select @@hostname;
525
@@hostname
526
#
527
set @@hostname= "anothername";
528
ERROR HY000: Variable 'hostname' is a read only variable
529
show variables like 'hostname';
530
Variable_name	Value
531
hostname	#
532
End of 5.0 tests
533
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
534
ERROR HY000: Unknown system variable 'flush_time'
1 by brian
clean slate
535
set global max_heap_table_size       =@my_max_heap_table_size;
536
set global max_join_size             =@my_max_join_size;
537
set global max_write_lock_count      =default;
1305.1.1 by Eric Day
Switched to using the MySQL protocol by default.
538
set global mysql_protocol_buffer_length= @my_mysql_protocol_buffer_length;
1 by brian
clean slate
539
set global server_id                 =@my_server_id;
540
set global storage_engine            =@my_storage_engine;
541
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
542
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
543
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
544
SHOW GLOBAL VARIABLES LIKE 'max_join_size';
545
Variable_name	Value
546
max_join_size	2147483647
547
SHOW LOCAL VARIABLES LIKE 'max_join_size';
548
Variable_name	Value
549
max_join_size	100
550
set GLOBAL bulk_insert_buffer_size=DEFAULT;
551
set GLOBAL join_buffer_size=DEFAULT;
552
set GLOBAL max_allowed_packet=DEFAULT;
2415.1.3 by Brian Aker
Fix non-repeatable tests.
553
set GLOBAL max_heap_table_size=@my_max_heap_table_size;
1487.1.1 by Brian Aker
There is room for improvement around this. We should be using rows as well
554
set GLOBAL max_join_size=DEFAULT;
555
set GLOBAL max_sort_length=DEFAULT;
556
set GLOBAL max_write_lock_count=DEFAULT;
557
set GLOBAL myisam_sort_buffer_size=DEFAULT;
558
set GLOBAL mysql_protocol_buffer_length=DEFAULT;
559
set GLOBAL read_buffer_size=DEFAULT;
560
set GLOBAL read_rnd_buffer_size=DEFAULT;
2415.1.3 by Brian Aker
Fix non-repeatable tests.
561
set global server_id=@my_server_id;
562
set GLOBAL sort_buffer_size=@my_sort_buffer_size;
1487.1.1 by Brian Aker
There is room for improvement around this. We should be using rows as well
563
set GLOBAL table_open_cache=DEFAULT;
564
set GLOBAL storage_engine= @my_storage_engine;
565
set GLOBAL tmp_table_size=DEFAULT;
566
set GLOBAL tx_isolation= @my_tx_isolation;
567
set SESSION bulk_insert_buffer_size=DEFAULT;
568
set SESSION join_buffer_size=DEFAULT;
569
set SESSION max_allowed_packet=DEFAULT;
2415.1.3 by Brian Aker
Fix non-repeatable tests.
570
set SESSION max_heap_table_size=@my_max_heap_table_size;
1487.1.1 by Brian Aker
There is room for improvement around this. We should be using rows as well
571
set SESSION max_join_size=DEFAULT;
572
set SESSION max_sort_length=DEFAULT;
573
set SESSION read_buffer_size=DEFAULT;
574
set SESSION read_rnd_buffer_size=DEFAULT;
575
set SESSION sort_buffer_size=DEFAULT;
576
set SESSION sql_big_selects=DEFAULT;
577
set SESSION sql_buffer_result=DEFAULT;
578
set SESSION sql_select_limit=DEFAULT;
579
set SESSION sql_warnings=DEFAULT;
580
set SESSION storage_engine= @my_storage_engine;
581
set SESSION tmp_table_size=DEFAULT;
582
set SESSION tx_isolation= @my_tx_isolation;
1055.1.2 by Padraig O'Sullivan
Updated test case based on bug fix.
583
show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';
584
Variable_name	Value
585
table_definition_cache	#
586
table_lock_wait_timeout	#