5
5
drop table if exists t1,t2;
6
drop schema if exists data_dictionary;
9
create schema data_dictionary;
9
12
# Bug #19263: variables.test doesn't clean up after itself (I/II -- save)
14
set @my_myisam_key_cache_size =@@global.myisam_key_cache_size;
11
15
set @my_max_connect_errors =@@global.max_connect_errors;
12
16
set @my_max_heap_table_size =@@global.max_heap_table_size;
13
17
set @my_max_join_size =@@global.max_join_size;
14
set @my_mysql_protocol_buffer_length =@@global.mysql_protocol_buffer_length;
18
set @my_drizzle_protocol_buffer_length =@@global.drizzle_protocol_buffer_length;
15
19
set @my_server_id =@@global.server_id;
16
20
set @my_storage_engine =@@global.storage_engine;
17
21
set @my_myisam_sort_buffer_size =@@global.myisam_sort_buffer_size;
18
set @my_tx_isolation =@@global.tx_isolation;
20
23
# case insensitivity tests (new in 5.0)
113
116
--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE
114
117
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
116
set global mysql_protocol_buffer_length=1024;
117
show global variables like 'mysql_protocol_buffer_%';
118
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
119
show global variables like 'mysql_protocol_buffer_%';
120
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
121
set global mysql_protocol_buffer_length=1;
122
show variables like 'mysql_protocol_buffer_length';
119
set global drizzle_protocol_buffer_length=1024;
120
show global variables like 'drizzle_protocol_buffer_%';
121
select * from data_dictionary.global_variables where variable_name like 'drizzle_protocol_buffer_%';
122
show global variables like 'drizzle_protocol_buffer_%';
123
select * from data_dictionary.global_variables where variable_name like 'drizzle_protocol_buffer_%';
124
set global drizzle_protocol_buffer_length=1;
125
show variables like 'drizzle_protocol_buffer_length';
124
set global mysql_protocol_buffer_length=2000000000;
125
show variables like 'mysql_protocol_buffer_length';
127
set global drizzle_protocol_buffer_length=2000000000;
128
show variables like 'drizzle_protocol_buffer_length';
127
130
show variables like '%alloc%';
128
131
select * from data_dictionary.session_variables where variable_name like '%alloc%';
147
150
# The following should give errors
149
--error ER_UNKNOWN_SYSTEM_VARIABLE
150
153
set unknown_variable=1;
151
--error ER_WRONG_TYPE_FOR_VAR
152
155
set max_join_size="hello";
153
--error ER_UNKNOWN_STORAGE_ENGINE
154
157
set storage_engine=UNKNOWN_TABLE_TYPE;
155
--error ER_NO_DEFAULT
156
159
set GLOBAL storage_engine=DEFAULT;
157
--error ER_LOCAL_VARIABLE
158
161
set global autocommit=1;
159
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
160
163
select @@global.timestamp;
161
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
162
165
set @@version='';
163
--error ER_GLOBAL_VARIABLE
164
167
set myisam_max_sort_file_size=100;
165
--error ER_WRONG_VALUE_FOR_VAR
166
169
set @@SQL_WARNINGS=NULL;
168
171
# Test setting all variables
196
199
set tmp_table_size=100;
197
200
set tx_isolation="READ-COMMITTED";
206
create temporary table t1 (a int not null auto_increment, primary key(a));
207
create temporary table t2 (a int not null auto_increment, primary key(a));
208
insert into t1 values(null),(null),(null);
209
insert into t2 values(null),(null),(null);
210
set global myisam_key_cache_size=100000;
211
select @@myisam_key_cache_size;
212
select * from t1 where a=2;
213
select * from t2 where a=3;
215
select max(a) +1, max(a) +2 into @xx,@yy from t1;
227
select @@session.myisam_key_cache_size;
229
# init_connect was removed
231
#set init_connect = NULL;
232
#set global init_connect = NULL;
199
234
# Bug#3754 SET GLOBAL myisam_max_sort_file_size doesn't work as
200
235
# expected: check that there is no overflow when 64-bit
201
236
# variables are set
262
# Bug#2586:Disallow global/session/local as structured var. instance names
265
set @@global.global.myisam_key_cache_size= 1;
267
set GLOBAL global.myisam_key_cache_size= 1;
269
SELECT @@global.global.myisam_key_cache_size;
271
SELECT @@global.session.myisam_key_cache_size;
273
SELECT @@global.local.myisam_key_cache_size;
227
276
# BUG#4788 show create table provides incorrect statement
229
278
# What default width have numeric types?
268
317
--echo *** LC_TIME_NAMES: testing with string expressions
269
318
set lc_time_names=concat('de','_','DE');
270
319
select @@lc_time_names;
271
--error ER_UNKNOWN_ERROR
272
321
set lc_time_names=concat('de','+','DE');
273
322
select @@lc_time_names;
274
323
--echo LC_TIME_NAMES: testing with numeric expressions
275
324
set @@lc_time_names=1+2;
276
325
select @@lc_time_names;
277
--error ER_WRONG_TYPE_FOR_VAR
278
327
set @@lc_time_names=1/0;
279
328
select @@lc_time_names;
280
329
set lc_time_names=en_US;
281
330
--echo LC_TIME_NAMES: testing NULL and a negative number:
282
--error ER_WRONG_VALUE_FOR_VAR
283
332
set lc_time_names=NULL;
284
--error ER_UNKNOWN_ERROR
285
334
set lc_time_names=-1;
286
335
select @@lc_time_names;
287
336
--echo LC_TIME_NAMES: testing locale with the last ID:
288
337
set lc_time_names=108;
289
338
select @@lc_time_names;
290
339
--echo LC_TIME_NAMES: testing a number beyond the valid ID range:
291
--error ER_UNKNOWN_ERROR
292
341
set lc_time_names=109;
293
342
select @@lc_time_names;
294
343
--echo LC_TIME_NAMES: testing that 0 is en_US:
364
413
# Bug #11775 Variable character_set_system does not exist (sometimes)
366
--error ER_UNKNOWN_SYSTEM_VARIABLE
367
416
select @@character_set_system;
368
--error ER_UNKNOWN_SYSTEM_VARIABLE
369
418
set global character_set_system = utf8;
370
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
371
420
set @@global.version_compile_os='234';
374
423
# Check character_set_filesystem variable invalid for Drizzle
376
--error ER_UNKNOWN_SYSTEM_VARIABLE
377
426
set @@global.character_set_filesystem=utf8;
378
--error ER_UNKNOWN_SYSTEM_VARIABLE
379
428
set character_set_filesystem=utf8;
465
514
# Bug #19263: variables.test doesn't clean up after itself (II/II --
468
--error ER_UNKNOWN_SYSTEM_VARIABLE
469
518
set global flush_time =@my_flush_time;
519
set global myisam_key_cache_size =@my_myisam_key_cache_size;
470
520
set global max_connect_errors =@my_max_connect_errors;
471
521
set global max_heap_table_size =@my_max_heap_table_size;
472
522
set global max_join_size =@my_max_join_size;
474
524
set global max_write_lock_count =default;
475
set global mysql_protocol_buffer_length= @my_mysql_protocol_buffer_length;
526
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
527
set global drizzle_protocol_buffer_length= @my_drizzle_protocol_buffer_length;
476
528
set global server_id =@my_server_id;
477
529
set global storage_engine =@my_storage_engine;
478
--error ER_UNKNOWN_SYSTEM_VARIABLE
479
531
set global thread_cache_size =@my_thread_cache_size;
480
532
set global myisam_sort_buffer_size =@my_myisam_sort_buffer_size;
482
SHOW GLOBAL VARIABLES LIKE 'max_join_size';
483
SHOW LOCAL VARIABLES LIKE 'max_join_size';
485
set GLOBAL bulk_insert_buffer_size=DEFAULT;
486
set GLOBAL join_buffer_size=DEFAULT;
487
set GLOBAL max_allowed_packet=DEFAULT;
488
set GLOBAL max_connect_errors=DEFAULT;
489
set GLOBAL max_heap_table_size=DEFAULT;
490
set GLOBAL max_join_size=DEFAULT;
491
set GLOBAL max_sort_length=DEFAULT;
492
set GLOBAL max_write_lock_count=DEFAULT;
493
set GLOBAL myisam_sort_buffer_size=DEFAULT;
494
set GLOBAL mysql_protocol_buffer_length=DEFAULT;
495
set GLOBAL read_buffer_size=DEFAULT;
496
set GLOBAL read_rnd_buffer_size=DEFAULT;
497
set GLOBAL server_id=DEFAULT;
498
set GLOBAL sort_buffer_size=DEFAULT;
499
set GLOBAL table_open_cache=DEFAULT;
500
set GLOBAL storage_engine= @my_storage_engine;
501
set GLOBAL tmp_table_size=DEFAULT;
502
set GLOBAL tx_isolation= @my_tx_isolation;
504
set SESSION bulk_insert_buffer_size=DEFAULT;
505
set SESSION join_buffer_size=DEFAULT;
506
set SESSION max_allowed_packet=DEFAULT;
507
set SESSION max_heap_table_size=DEFAULT;
508
set SESSION max_join_size=DEFAULT;
509
set SESSION max_sort_length=DEFAULT;
510
set SESSION read_buffer_size=DEFAULT;
511
set SESSION read_rnd_buffer_size=DEFAULT;
512
set SESSION sort_buffer_size=DEFAULT;
513
set SESSION sql_big_selects=DEFAULT;
514
set SESSION sql_buffer_result=DEFAULT;
515
set SESSION sql_select_limit=DEFAULT;
516
set SESSION sql_warnings=DEFAULT;
517
set SESSION storage_engine= @my_storage_engine;
518
set SESSION tmp_table_size=DEFAULT;
519
set SESSION tx_isolation= @my_tx_isolation;
522
535
# Bug#28580 Repeatation of status variables
525
537
--replace_column 2 #
526
538
show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';
540
drop schema data_dictionary;