~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/variables.test

  • Committer: Stewart Smith
  • Date: 2009-05-15 06:57:12 UTC
  • mto: (991.1.5 for-brian)
  • mto: This revision was merged to the branch mainline in revision 1022.
  • Revision ID: stewart@flamingspork.com-20090515065712-bmionylacjmexmmm
Make sql_mode=NO_AUTO_VALUE_ON_ZERO default for Drizzle.

Also fix DEFAULT keyword handling for auto-increment so that it defaults to
NULL and not 0 so that the following is valid and generates two auto-inc
values:

create table t1 (a int auto_increment primary key)
insert into t1 (a) values (default);
insert into t1 (a) values (default);

Important to note that 0 is no longer magic. So this gives you duplicate
primary key error:

insert into t1 (a) values(0);
insert into t1 (a) values(0);

as you've inserted the explicit value of 0 twice.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#
9
9
# Bug #19263: variables.test doesn't clean up after itself (I/II -- save)
10
10
#
 
11
set @my_connect_timeout           =@@global.connect_timeout;
 
12
set @my_flush                     =@@global.flush;
 
13
set @my_key_buffer_size           =@@global.key_buffer_size;
 
14
set @my_max_connect_errors        =@@global.max_connect_errors;
11
15
set @my_max_heap_table_size       =@@global.max_heap_table_size;
12
16
set @my_max_join_size             =@@global.max_join_size;
13
 
set @my_mysql_protocol_buffer_length =@@global.mysql_protocol_buffer_length;
 
17
set @my_net_buffer_length         =@@global.net_buffer_length;
 
18
set @my_net_write_timeout         =@@global.net_write_timeout;
 
19
set @my_net_read_timeout          =@@global.net_read_timeout;
14
20
set @my_server_id                 =@@global.server_id;
15
21
set @my_storage_engine            =@@global.storage_engine;
16
 
set @my_myisam_sort_buffer_size   =@@global.myisam_sort_buffer_size;
17
 
set @my_tx_isolation      =@@global.tx_isolation;
18
22
 
19
23
# case insensitivity tests (new in 5.0)
20
24
set @`test`=1;
63
67
set GLOBAL max_join_size=10;
64
68
set max_join_size=100;
65
69
show variables like 'max_join_size';
66
 
select * from data_dictionary.session_variables where variable_name like 'max_join_size';
 
70
select * from information_schema.session_variables where variable_name like 'max_join_size';
67
71
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
68
72
show global variables like 'max_join_size';
69
73
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
70
 
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
 
74
select * from information_schema.global_variables where variable_name like 'max_join_size';
71
75
set GLOBAL max_join_size=2000;
72
76
show global variables like 'max_join_size';
73
 
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
 
77
select * from information_schema.global_variables where variable_name like 'max_join_size';
74
78
set max_join_size=DEFAULT;
75
79
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
76
80
show variables like 'max_join_size';
77
81
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
78
 
select * from data_dictionary.session_variables where variable_name like 'max_join_size';
 
82
select * from information_schema.session_variables where variable_name like 'max_join_size';
79
83
set GLOBAL max_join_size=DEFAULT;
80
84
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
81
85
show global variables like 'max_join_size';
82
86
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
83
 
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
 
87
select * from information_schema.global_variables where variable_name like 'max_join_size';
84
88
set @@max_join_size=1000, @@global.max_join_size=2000;
85
89
select @@local.max_join_size, @@global.max_join_size;
86
90
select @@identity,  length(@@version)>0;
92
96
 
93
97
set global timed_mutexes=ON;
94
98
show variables like 'timed_mutexes';
95
 
select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
 
99
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
96
100
set global timed_mutexes=0;
97
101
show variables like 'timed_mutexes';
98
 
select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
 
102
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
99
103
 
100
 
set storage_engine=MYISAM, storage_engine="MEMORY";
 
104
set storage_engine=MYISAM, storage_engine="HEAP";
101
105
show local variables like 'storage_engine';
102
 
select * from data_dictionary.session_variables where variable_name like 'storage_engine';
 
106
select * from information_schema.session_variables where variable_name like 'storage_engine';
103
107
show global variables like 'storage_engine';
104
 
select * from data_dictionary.global_variables where variable_name like 'storage_engine';
 
108
select * from information_schema.global_variables where variable_name like 'storage_engine';
105
109
 
106
110
set GLOBAL myisam_max_sort_file_size=2000000;
107
111
show global variables like 'myisam_max_sort_file_size';
108
 
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
 
112
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
109
113
set GLOBAL myisam_max_sort_file_size=default;
110
114
--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE
111
115
show global variables like 'myisam_max_sort_file_size';
112
116
--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE
113
 
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
 
117
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
114
118
 
115
 
set global mysql_protocol_buffer_length=1024;
116
 
show global variables like 'mysql_protocol_buffer_%';
117
 
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
118
 
show global variables like 'mysql_protocol_buffer_%';
119
 
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
120
 
set global mysql_protocol_buffer_length=1;
121
 
show variables like 'mysql_protocol_buffer_length';
 
119
set global net_retry_count=10, session net_retry_count=10;
 
120
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
 
121
set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600;
 
122
show global variables like 'net_%';
 
123
select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
 
124
show session variables like 'net_%';
 
125
select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
 
126
set session net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000;
 
127
show global variables like 'net_%';
 
128
select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
 
129
show session variables like 'net_%';
 
130
select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
 
131
set net_buffer_length=1;
 
132
show variables like 'net_buffer_length';
 
133
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
122
134
#warning 1292
123
 
set global mysql_protocol_buffer_length=2000000000;
124
 
show variables like 'mysql_protocol_buffer_length';
 
135
set net_buffer_length=2000000000;
 
136
show variables like 'net_buffer_length';
 
137
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
125
138
 
126
139
show variables like '%alloc%';
127
 
select * from data_dictionary.session_variables where variable_name like '%alloc%';
 
140
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
128
141
set @@range_alloc_block_size=1024*16;
129
142
set @@query_alloc_block_size=1024*17+2;
130
143
set @@query_prealloc_size=1024*18;
 
144
set @@transaction_alloc_block_size=1024*20-1;
 
145
set @@transaction_prealloc_size=1024*21-1;
131
146
select @@query_alloc_block_size;
132
147
show variables like '%alloc%';
133
 
select * from data_dictionary.session_variables where variable_name like '%alloc%';
 
148
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
134
149
set @@range_alloc_block_size=default;
135
150
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
 
151
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
136
152
show variables like '%alloc%';
137
 
select * from data_dictionary.session_variables where variable_name like '%alloc%';
 
153
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
138
154
 
139
155
#
140
156
# Bug #10904 Illegal mix of collations between
145
161
 
146
162
# The following should give errors
147
163
 
148
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
164
--error 1193
149
165
set unknown_variable=1;
150
 
--error ER_WRONG_TYPE_FOR_VAR
 
166
--error 1232
151
167
set max_join_size="hello";
152
 
--error ER_UNKNOWN_STORAGE_ENGINE
 
168
--error 1286
153
169
set storage_engine=UNKNOWN_TABLE_TYPE;
154
 
--error ER_NO_DEFAULT
 
170
--error 1230
155
171
set GLOBAL storage_engine=DEFAULT;
156
 
--error ER_LOCAL_VARIABLE
 
172
--error 1228
157
173
set global autocommit=1;
158
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
174
--error 1238
159
175
select @@global.timestamp;
160
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR 
 
176
--error 1238 
161
177
set @@version='';
162
 
--error ER_GLOBAL_VARIABLE
 
178
--error 1229
163
179
set myisam_max_sort_file_size=100;
164
 
--error ER_WRONG_VALUE_FOR_VAR
 
180
--error 1231
165
181
set @@SQL_WARNINGS=NULL;
166
182
 
167
183
# Test setting all variables
169
185
set autocommit=1;
170
186
select @@autocommit;
171
187
set bulk_insert_buffer_size=100;
 
188
set global connect_timeout=100;
 
189
select @@delay_key_write;
 
190
set global delay_key_write="OFF";
 
191
select @@delay_key_write;
 
192
set global delay_key_write=ALL;
 
193
set global delay_key_write=1;
 
194
select @@delay_key_write;
172
195
set join_buffer_size=100;
173
196
set last_insert_id=1;
174
197
set max_allowed_packet=100;
 
198
set global max_connect_errors=100;
175
199
set max_heap_table_size=100;
176
200
set max_join_size=100;
177
201
set max_sort_length=100;
 
202
set max_tmp_tables=100;
178
203
set global max_write_lock_count=100;
179
204
set global myisam_sort_buffer_size=100;
180
 
set global mysql_protocol_buffer_length=100;
 
205
set net_buffer_length=100;
 
206
set net_read_timeout=100;
 
207
set net_write_timeout=100;
181
208
set read_buffer_size=100;
182
209
set read_rnd_buffer_size=100;
183
210
set global server_id=100;
184
211
set sort_buffer_size=100;
185
212
set sql_big_selects=1;
186
213
set sql_buffer_result=1;
 
214
set sql_safe_updates=1;
187
215
set sql_select_limit=1;
188
216
# reset it, so later tests don't get confused
189
217
set sql_select_limit=default;
193
221
set timestamp=1, timestamp=default;
194
222
set tmp_table_size=100;
195
223
set tx_isolation="READ-COMMITTED";
 
224
set wait_timeout=100;
 
225
 
 
226
#
 
227
# key buffer
 
228
#
 
229
 
 
230
create table t1 (a int not null auto_increment, primary key(a));
 
231
create table t2 (a int not null auto_increment, primary key(a));
 
232
insert into t1 values(null),(null),(null);
 
233
insert into t2 values(null),(null),(null);
 
234
set global key_buffer_size=100000;
 
235
select @@key_buffer_size;
 
236
select * from t1 where a=2;
 
237
select * from t2 where a=3;
 
238
check table t1,t2;
 
239
select max(a) +1, max(a) +2 into @xx,@yy from t1;
 
240
drop table t1,t2;
 
241
 
 
242
#
 
243
# error conditions
 
244
#
 
245
 
 
246
--error 1193
 
247
select @@xxxxxxxxxx;
 
248
select 1;
 
249
 
 
250
--error 1238
 
251
select @@session.key_buffer_size;
 
252
 
 
253
# init_connect was removed
 
254
#--error 1229
 
255
#set init_connect = NULL;
 
256
#set global init_connect = NULL;
196
257
 
197
258
# Bug#3754 SET GLOBAL myisam_max_sort_file_size doesn't work as
198
259
# expected: check that there is no overflow when 64-bit
202
263
--replace_result 4294967296 MAX_FILE_SIZE 2146435072 MAX_FILE_SIZE
203
264
show global variables like 'myisam_max_sort_file_size';
204
265
--replace_result 4294967296 MAX_FILE_SIZE 2146435072 MAX_FILE_SIZE
205
 
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
 
266
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
206
267
set global myisam_max_sort_file_size=default;
207
268
 
208
269
## Bug #311084
222
283
#select @a, @b;
223
284
 
224
285
#
 
286
# Bug#2586:Disallow global/session/local as structured var. instance names
 
287
#
 
288
--error 1064
 
289
set @@global.global.key_buffer_size= 1;
 
290
--error 1064
 
291
set GLOBAL global.key_buffer_size= 1;
 
292
--error 1064
 
293
SELECT @@global.global.key_buffer_size;
 
294
--error 1064
 
295
SELECT @@global.session.key_buffer_size;
 
296
--error 1064
 
297
SELECT @@global.local.key_buffer_size;
 
298
 
 
299
#
225
300
# BUG#4788 show create table provides incorrect statement
226
301
#
227
302
# What default width have numeric types?
228
 
create temporary table t1 (
 
303
create table t1 (
229
304
  c1 int,
230
305
  c2 int,
231
306
  c3 int,
236
311
#
237
312
# What types and widths have variables?
238
313
set @arg00= 8, @arg01= 8.8, @arg02= 'a string', @arg03= 0.2e0;
239
 
create temporary table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4;
 
314
create table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4;
240
315
show create table t1;
241
316
drop table t1;
242
317
 
246
321
 
247
322
SET GLOBAL table_open_cache=-1;
248
323
SHOW VARIABLES LIKE 'table_open_cache';
249
 
SELECT * FROM DATA_DICTIONARY.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
 
324
SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
250
325
SET GLOBAL table_open_cache=DEFAULT;
251
326
 
252
327
#
266
341
--echo *** LC_TIME_NAMES: testing with string expressions
267
342
set lc_time_names=concat('de','_','DE');
268
343
select @@lc_time_names;
269
 
--error ER_UNKNOWN_ERROR
 
344
--error 1105
270
345
set lc_time_names=concat('de','+','DE');
271
346
select @@lc_time_names;
272
347
--echo LC_TIME_NAMES: testing with numeric expressions
273
348
set @@lc_time_names=1+2;
274
349
select @@lc_time_names;
275
 
--error ER_WRONG_TYPE_FOR_VAR
 
350
--error 1232
276
351
set @@lc_time_names=1/0;
277
352
select @@lc_time_names;
278
353
set lc_time_names=en_US;
279
354
--echo LC_TIME_NAMES: testing NULL and a negative number:
280
 
--error ER_WRONG_VALUE_FOR_VAR
 
355
--error 1231
281
356
set lc_time_names=NULL;
282
 
--error ER_UNKNOWN_ERROR
 
357
--error 1105
283
358
set lc_time_names=-1;
284
359
select @@lc_time_names;
285
360
--echo LC_TIME_NAMES: testing locale with the last ID:
286
361
set lc_time_names=108;
287
362
select @@lc_time_names;
288
363
--echo LC_TIME_NAMES: testing a number beyond the valid ID range:
289
 
--error ER_UNKNOWN_ERROR
 
364
--error 1105
290
365
set lc_time_names=109;
291
366
select @@lc_time_names;
292
367
--echo LC_TIME_NAMES: testing that 0 is en_US:
330
405
# Bug#6282 Packet error with SELECT INTO
331
406
332
407
 
333
 
create temporary table t1 (a int);
 
408
create table t1 (a int);
334
409
select a into @x from t1;
335
410
show warnings;
336
411
drop table t1;
339
414
# Bug #10339: read only variables.
340
415
#
341
416
 
342
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
417
--error 1238
343
418
set @@warning_count=1;
344
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
419
--error 1238
345
420
set @@global.error_count=1;
346
421
 
347
422
#
348
423
# Bug #10351: Setting ulong variable to > MAX_ULONG fails on 32-bit platform
349
424
#
350
 
--disable_query_log
351
 
select VARIABLE_VALUE from data_dictionary.GLOBAL_VARIABLES where VARIABLE_NAME like "VERSION_COMPILE_MACHINE" into @arch;
352
 
--enable_query_log
353
 
# We technically do not care about 32bit hardware. -Brian
354
 
#set @@max_heap_table_size= 4294967296;
355
 
#select @@max_heap_table_size > 0;
356
 
#set global max_heap_table_size= 4294967296;
357
 
#select @@max_heap_table_size > 0;
358
 
#set @@max_heap_table_size= 4294967296;
359
 
#select @@max_heap_table_size > 0;
360
 
--enable_warnings
 
425
 
 
426
set @@max_heap_table_size= 4294967296;
 
427
select @@max_heap_table_size > 0;
 
428
set global max_heap_table_size= 4294967296;
 
429
select @@max_heap_table_size > 0;
 
430
set @@max_heap_table_size= 4294967296;
 
431
select @@max_heap_table_size > 0;
 
432
 
361
433
#
362
434
# Bug #11775 Variable character_set_system does not exist (sometimes)
363
435
#
364
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
436
--error 1193
365
437
select @@character_set_system;
366
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
438
--error 1193
367
439
set global character_set_system = utf8;
368
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
440
--error 1238
369
441
set @@global.version_compile_os='234';
370
442
 
371
443
#
372
444
# Check character_set_filesystem variable invalid for Drizzle
373
445
#
374
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
446
--error 1193
375
447
set @@global.character_set_filesystem=utf8;
376
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
448
--error 1193
377
449
set character_set_filesystem=utf8;
378
450
 
379
451
#
380
452
# Bug #17849: Show sql_big_selects in SHOW VARIABLES
381
453
#
382
 
set @sql_big_selects = @@sql_big_selects;
 
454
set @old_sql_big_selects = @@sql_big_selects;
383
455
set @@sql_big_selects = 1;
384
456
show variables like 'sql_big_selects';
385
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
386
 
#select * from data_dictionary.session_variables where variable_name like 'sql_big_selects';
387
 
set @@sql_big_selects = @sql_big_selects;
 
457
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
458
#select * from information_schema.session_variables where variable_name like 'sql_big_selects';
 
459
set @@sql_big_selects = @old_sql_big_selects;
388
460
 
389
461
#
390
462
# Bug #16195: SHOW VARIABLES doesn't report correctly sql_warnings and
392
464
393
465
set @@sql_notes = 0, @@sql_warnings = 0;
394
466
show variables like 'sql_notes';
395
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
396
 
#select * from data_dictionary.session_variables where variable_name like 'sql_notes';
 
467
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
468
#select * from information_schema.session_variables where variable_name like 'sql_notes';
397
469
show variables like 'sql_warnings';
398
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
399
 
#select * from data_dictionary.session_variables where variable_name like 'sql_warnings';
 
470
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
471
#select * from information_schema.session_variables where variable_name like 'sql_warnings';
400
472
set @@sql_notes = 1, @@sql_warnings = 1;
401
473
show variables like 'sql_notes';
402
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
403
 
#select * from data_dictionary.session_variables where variable_name like 'sql_notes';
 
474
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
475
#select * from information_schema.session_variables where variable_name like 'sql_notes';
404
476
show variables like 'sql_warnings';
405
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
406
 
#select * from data_dictionary.session_variables where variable_name like 'sql_warnings';
 
477
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
478
#select * from information_schema.session_variables where variable_name like 'sql_warnings';
407
479
 
408
480
#
409
481
# Bug #15684: system variables cannot be SELECTed (e.g. @@version_comment)
423
495
--replace_column 2 #
424
496
show variables like 'basedir';
425
497
--replace_column 2 #
426
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
427
 
#select * from data_dictionary.session_variables where variable_name like 'basedir';
 
498
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
499
#select * from information_schema.session_variables where variable_name like 'basedir';
428
500
--replace_column 2 #
429
501
show variables like 'datadir';
430
502
--replace_column 2 #
431
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
432
 
#select * from data_dictionary.session_variables where variable_name like 'datadir';
 
503
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
504
#select * from information_schema.session_variables where variable_name like 'datadir';
433
505
--replace_column 2 #
434
506
show variables like 'tmpdir';
435
507
--replace_column 2 #
 
508
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
509
#select * from information_schema.session_variables where variable_name like 'tmpdir';
 
510
 
 
511
#
 
512
# Bug #19606: make ssl settings available via SHOW VARIABLES and @@variables
 
513
 
514
# Don't actually output, since it depends on the system
 
515
#--replace_column 1 # 2 # 3 # 4 # 5 #
 
516
# Not supported in Drizzle
 
517
#select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key;
 
518
#--replace_column 2 #
 
519
#show variables like 'ssl%';
 
520
#--replace_column 2 #
 
521
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
522
#select * from information_schema.session_variables where variable_name like 'ssl%' order by 1;
 
523
 
 
524
#
 
525
# Bug #19616: make log_queries_not_using_indexes available in SHOW VARIABLES
 
526
# and as @@log_queries_not_using_indexes
 
527
#
 
528
# Not valid in Drizzle
 
529
#select @@log_queries_not_using_indexes;
 
530
#show variables like 'log_queries_not_using_indexes';
 
531
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
532
#select * from information_schema.session_variables where variable_name like 'log_queries_not_using_indexes';
436
533
 
437
534
#
438
535
# Bug#20908: Crash if select @@""
450
547
# Don't actually output, since it depends on the system
451
548
--replace_column 1 #
452
549
select @@hostname;
453
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
550
--error 1238
454
551
set @@hostname= "anothername";
455
552
--replace_column 2 #
456
553
show variables like 'hostname';
463
560
# Bug #19263: variables.test doesn't clean up after itself (II/II --
464
561
# restore)
465
562
#
466
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
563
set global connect_timeout           =@my_connect_timeout;
 
564
set global flush                     =@my_flush;
 
565
--error 1193
467
566
set global flush_time                =@my_flush_time;
 
567
set global key_buffer_size           =@my_key_buffer_size;
 
568
set global max_connect_errors        =@my_max_connect_errors;
468
569
set global max_heap_table_size       =@my_max_heap_table_size;
469
570
set global max_join_size             =@my_max_join_size;
470
571
# No default
 
572
#set global max_user_connections      =default;
471
573
set global max_write_lock_count      =default;
472
 
set global mysql_protocol_buffer_length= @my_mysql_protocol_buffer_length;
 
574
--error 1232
 
575
set global myisam_data_pointer_size  =@my_myisam_data_pointer_size;
 
576
set global net_buffer_length         =@my_net_buffer_length;
 
577
set global net_write_timeout         =@my_net_write_timeout;
 
578
set global net_read_timeout          =@my_net_read_timeout;
473
579
set global server_id                 =@my_server_id;
474
580
set global storage_engine            =@my_storage_engine;
475
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
581
--error 1193
476
582
set global thread_cache_size         =@my_thread_cache_size;
477
 
set global myisam_sort_buffer_size   =@my_myisam_sort_buffer_size;
478
 
 
479
 
SHOW GLOBAL VARIABLES LIKE 'max_join_size';
480
 
SHOW LOCAL VARIABLES LIKE 'max_join_size';
481
 
 
482
 
set GLOBAL bulk_insert_buffer_size=DEFAULT;
483
 
set GLOBAL join_buffer_size=DEFAULT;
484
 
set GLOBAL max_allowed_packet=DEFAULT;
485
 
set GLOBAL max_heap_table_size=DEFAULT;
486
 
set GLOBAL max_join_size=DEFAULT;
487
 
set GLOBAL max_sort_length=DEFAULT;
488
 
set GLOBAL max_write_lock_count=DEFAULT;
489
 
set GLOBAL myisam_sort_buffer_size=DEFAULT;
490
 
set GLOBAL mysql_protocol_buffer_length=DEFAULT;
491
 
set GLOBAL read_buffer_size=DEFAULT;
492
 
set GLOBAL read_rnd_buffer_size=DEFAULT;
493
 
set GLOBAL server_id=DEFAULT;
494
 
set GLOBAL sort_buffer_size=DEFAULT;
495
 
set GLOBAL table_open_cache=DEFAULT;
496
 
set GLOBAL storage_engine= @my_storage_engine;
497
 
set GLOBAL tmp_table_size=DEFAULT;
498
 
set GLOBAL tx_isolation= @my_tx_isolation;
499
 
 
500
 
set SESSION bulk_insert_buffer_size=DEFAULT;
501
 
set SESSION join_buffer_size=DEFAULT;
502
 
set SESSION max_allowed_packet=DEFAULT;
503
 
set SESSION max_heap_table_size=DEFAULT;
504
 
set SESSION max_join_size=DEFAULT;
505
 
set SESSION max_sort_length=DEFAULT;
506
 
set SESSION read_buffer_size=DEFAULT;
507
 
set SESSION read_rnd_buffer_size=DEFAULT;
508
 
set SESSION sort_buffer_size=DEFAULT;
509
 
set SESSION sql_big_selects=DEFAULT;
510
 
set SESSION sql_buffer_result=DEFAULT;
511
 
set SESSION sql_select_limit=DEFAULT;
512
 
set SESSION sql_warnings=DEFAULT;
513
 
set SESSION storage_engine= @my_storage_engine;
514
 
set SESSION tmp_table_size=DEFAULT;
515
 
set SESSION tx_isolation= @my_tx_isolation;
516
583
 
517
584
#
518
585
# Bug#28580 Repeatation of status variables
519
586
#
520
 
 
521
587
--replace_column 2 #
522
 
show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';
523
 
 
 
588
# Drizzle Bug 311044
 
589
#show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';