~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/variables.test

  • Committer: Padraig O'Sullivan
  • Date: 2009-07-30 02:39:13 UTC
  • mto: (1115.3.11 captain)
  • mto: This revision was merged to the branch mainline in revision 1121.
  • Revision ID: osullivan.padraig@gmail.com-20090730023913-o2zuocp32l6btnc2
Removing references to MY_BITMAP throughout the code base and updating calls
to MyBitmap in various places to use the new interface.

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_myisam_key_cache_size           =@@global.myisam_key_cache_size;
 
11
set @my_connect_timeout           =@@global.connect_timeout;
 
12
set @my_flush                     =@@global.flush;
 
13
set @my_key_buffer_size           =@@global.key_buffer_size;
12
14
set @my_max_connect_errors        =@@global.max_connect_errors;
13
15
set @my_max_heap_table_size       =@@global.max_heap_table_size;
14
16
set @my_max_join_size             =@@global.max_join_size;
15
 
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;
16
20
set @my_server_id                 =@@global.server_id;
17
21
set @my_storage_engine            =@@global.storage_engine;
18
 
set @my_myisam_sort_buffer_size   =@@global.myisam_sort_buffer_size;
19
22
 
20
23
# case insensitivity tests (new in 5.0)
21
24
set @`test`=1;
64
67
set GLOBAL max_join_size=10;
65
68
set max_join_size=100;
66
69
show variables like 'max_join_size';
67
 
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';
68
71
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
69
72
show global variables like 'max_join_size';
70
73
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
71
 
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';
72
75
set GLOBAL max_join_size=2000;
73
76
show global variables like 'max_join_size';
74
 
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';
75
78
set max_join_size=DEFAULT;
76
79
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
77
80
show variables like 'max_join_size';
78
81
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
79
 
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';
80
83
set GLOBAL max_join_size=DEFAULT;
81
84
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
82
85
show global variables like 'max_join_size';
83
86
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
84
 
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';
85
88
set @@max_join_size=1000, @@global.max_join_size=2000;
86
89
select @@local.max_join_size, @@global.max_join_size;
87
90
select @@identity,  length(@@version)>0;
93
96
 
94
97
set global timed_mutexes=ON;
95
98
show variables like 'timed_mutexes';
96
 
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';
97
100
set global timed_mutexes=0;
98
101
show variables like 'timed_mutexes';
99
 
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';
100
103
 
101
 
set storage_engine=MYISAM, storage_engine="MEMORY";
 
104
set storage_engine=MYISAM, storage_engine="HEAP";
102
105
show local variables like 'storage_engine';
103
 
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';
104
107
show global variables like 'storage_engine';
105
 
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';
106
109
 
107
110
set GLOBAL myisam_max_sort_file_size=2000000;
108
111
show global variables like 'myisam_max_sort_file_size';
109
 
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';
110
113
set GLOBAL myisam_max_sort_file_size=default;
111
114
--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE
112
115
show global variables like 'myisam_max_sort_file_size';
113
116
--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE
114
 
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';
115
118
 
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 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';
123
134
#warning 1292
124
 
set global mysql_protocol_buffer_length=2000000000;
125
 
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';
126
138
 
127
139
show variables like '%alloc%';
128
 
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;
129
141
set @@range_alloc_block_size=1024*16;
130
142
set @@query_alloc_block_size=1024*17+2;
131
143
set @@query_prealloc_size=1024*18;
 
144
set @@transaction_alloc_block_size=1024*20-1;
 
145
set @@transaction_prealloc_size=1024*21-1;
132
146
select @@query_alloc_block_size;
133
147
show variables like '%alloc%';
134
 
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;
135
149
set @@range_alloc_block_size=default;
136
150
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
 
151
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
137
152
show variables like '%alloc%';
138
 
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;
139
154
 
140
155
#
141
156
# Bug #10904 Illegal mix of collations between
170
185
set autocommit=1;
171
186
select @@autocommit;
172
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;
173
195
set join_buffer_size=100;
174
196
set last_insert_id=1;
175
197
set max_allowed_packet=100;
179
201
set max_sort_length=100;
180
202
set global max_write_lock_count=100;
181
203
set global myisam_sort_buffer_size=100;
182
 
set global mysql_protocol_buffer_length=100;
 
204
set net_buffer_length=100;
 
205
set net_read_timeout=100;
 
206
set net_write_timeout=100;
183
207
set read_buffer_size=100;
184
208
set read_rnd_buffer_size=100;
185
209
set global server_id=100;
186
210
set sort_buffer_size=100;
187
211
set sql_big_selects=1;
188
212
set sql_buffer_result=1;
 
213
set sql_safe_updates=1;
189
214
set sql_select_limit=1;
190
215
# reset it, so later tests don't get confused
191
216
set sql_select_limit=default;
195
220
set timestamp=1, timestamp=default;
196
221
set tmp_table_size=100;
197
222
set tx_isolation="READ-COMMITTED";
 
223
set wait_timeout=100;
198
224
 
199
225
#
200
226
# key buffer
204
230
create temporary table t2 (a int not null auto_increment, primary key(a));
205
231
insert into t1 values(null),(null),(null);
206
232
insert into t2 values(null),(null),(null);
207
 
set global myisam_key_cache_size=100000;
208
 
select @@myisam_key_cache_size;
 
233
set global key_buffer_size=100000;
 
234
select @@key_buffer_size;
209
235
select * from t1 where a=2;
210
236
select * from t2 where a=3;
211
237
check table t1,t2;
221
247
select 1;
222
248
 
223
249
--error 1238
224
 
select @@session.myisam_key_cache_size;
 
250
select @@session.key_buffer_size;
225
251
 
226
252
# init_connect was removed
227
253
#--error 1229
236
262
--replace_result 4294967296 MAX_FILE_SIZE 2146435072 MAX_FILE_SIZE
237
263
show global variables like 'myisam_max_sort_file_size';
238
264
--replace_result 4294967296 MAX_FILE_SIZE 2146435072 MAX_FILE_SIZE
239
 
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
 
265
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
240
266
set global myisam_max_sort_file_size=default;
241
267
 
242
268
## Bug #311084
258
284
#
259
285
# Bug#2586:Disallow global/session/local as structured var. instance names
260
286
#
261
 
--error 1193
262
 
set @@global.global.myisam_key_cache_size= 1;
263
 
--error 1193
264
 
set GLOBAL global.myisam_key_cache_size= 1;
265
 
--error 1064
266
 
SELECT @@global.global.myisam_key_cache_size;
267
 
--error 1064
268
 
SELECT @@global.session.myisam_key_cache_size;
269
 
--error 1064
270
 
SELECT @@global.local.myisam_key_cache_size;
 
287
--error 1064
 
288
set @@global.global.key_buffer_size= 1;
 
289
--error 1064
 
290
set GLOBAL global.key_buffer_size= 1;
 
291
--error 1064
 
292
SELECT @@global.global.key_buffer_size;
 
293
--error 1064
 
294
SELECT @@global.session.key_buffer_size;
 
295
--error 1064
 
296
SELECT @@global.local.key_buffer_size;
271
297
 
272
298
#
273
299
# BUG#4788 show create table provides incorrect statement
294
320
 
295
321
SET GLOBAL table_open_cache=-1;
296
322
SHOW VARIABLES LIKE 'table_open_cache';
297
 
SELECT * FROM DATA_DICTIONARY.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
 
323
SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
298
324
SET GLOBAL table_open_cache=DEFAULT;
299
325
 
300
326
#
395
421
#
396
422
# Bug #10351: Setting ulong variable to > MAX_ULONG fails on 32-bit platform
397
423
#
398
 
--disable_query_log
399
 
select VARIABLE_VALUE from data_dictionary.GLOBAL_VARIABLES where VARIABLE_NAME like "VERSION_COMPILE_MACHINE" into @arch;
400
 
--enable_query_log
401
 
# We technically do not care about 32bit hardware. -Brian
402
 
#set @@max_heap_table_size= 4294967296;
403
 
#select @@max_heap_table_size > 0;
404
 
#set global max_heap_table_size= 4294967296;
405
 
#select @@max_heap_table_size > 0;
406
 
#set @@max_heap_table_size= 4294967296;
407
 
#select @@max_heap_table_size > 0;
408
 
--enable_warnings
 
424
 
 
425
set @@max_heap_table_size= 4294967296;
 
426
select @@max_heap_table_size > 0;
 
427
set global max_heap_table_size= 4294967296;
 
428
select @@max_heap_table_size > 0;
 
429
set @@max_heap_table_size= 4294967296;
 
430
select @@max_heap_table_size > 0;
 
431
 
409
432
#
410
433
# Bug #11775 Variable character_set_system does not exist (sometimes)
411
434
#
427
450
#
428
451
# Bug #17849: Show sql_big_selects in SHOW VARIABLES
429
452
#
430
 
set @sql_big_selects = @@sql_big_selects;
 
453
set @old_sql_big_selects = @@sql_big_selects;
431
454
set @@sql_big_selects = 1;
432
455
show variables like 'sql_big_selects';
433
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
434
 
#select * from data_dictionary.session_variables where variable_name like 'sql_big_selects';
435
 
set @@sql_big_selects = @sql_big_selects;
 
456
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
457
#select * from information_schema.session_variables where variable_name like 'sql_big_selects';
 
458
set @@sql_big_selects = @old_sql_big_selects;
436
459
 
437
460
#
438
461
# Bug #16195: SHOW VARIABLES doesn't report correctly sql_warnings and
440
463
441
464
set @@sql_notes = 0, @@sql_warnings = 0;
442
465
show variables like 'sql_notes';
443
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
444
 
#select * from data_dictionary.session_variables where variable_name like 'sql_notes';
 
466
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
467
#select * from information_schema.session_variables where variable_name like 'sql_notes';
445
468
show variables like 'sql_warnings';
446
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
447
 
#select * from data_dictionary.session_variables where variable_name like 'sql_warnings';
 
469
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
470
#select * from information_schema.session_variables where variable_name like 'sql_warnings';
448
471
set @@sql_notes = 1, @@sql_warnings = 1;
449
472
show variables like 'sql_notes';
450
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
451
 
#select * from data_dictionary.session_variables where variable_name like 'sql_notes';
 
473
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
474
#select * from information_schema.session_variables where variable_name like 'sql_notes';
452
475
show variables like 'sql_warnings';
453
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
454
 
#select * from data_dictionary.session_variables where variable_name like 'sql_warnings';
 
476
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
477
#select * from information_schema.session_variables where variable_name like 'sql_warnings';
455
478
 
456
479
#
457
480
# Bug #15684: system variables cannot be SELECTed (e.g. @@version_comment)
471
494
--replace_column 2 #
472
495
show variables like 'basedir';
473
496
--replace_column 2 #
474
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
475
 
#select * from data_dictionary.session_variables where variable_name like 'basedir';
 
497
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
498
#select * from information_schema.session_variables where variable_name like 'basedir';
476
499
--replace_column 2 #
477
500
show variables like 'datadir';
478
501
--replace_column 2 #
479
 
# Bug 311025 Segmentation fault when accessing DATA_DICTIONARY
480
 
#select * from data_dictionary.session_variables where variable_name like 'datadir';
 
502
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
503
#select * from information_schema.session_variables where variable_name like 'datadir';
481
504
--replace_column 2 #
482
505
show variables like 'tmpdir';
483
506
--replace_column 2 #
 
507
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
508
#select * from information_schema.session_variables where variable_name like 'tmpdir';
 
509
 
 
510
#
 
511
# Bug #19606: make ssl settings available via SHOW VARIABLES and @@variables
 
512
 
513
# Don't actually output, since it depends on the system
 
514
#--replace_column 1 # 2 # 3 # 4 # 5 #
 
515
# Not supported in Drizzle
 
516
#select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key;
 
517
#--replace_column 2 #
 
518
#show variables like 'ssl%';
 
519
#--replace_column 2 #
 
520
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
521
#select * from information_schema.session_variables where variable_name like 'ssl%' order by 1;
 
522
 
 
523
#
 
524
# Bug #19616: make log_queries_not_using_indexes available in SHOW VARIABLES
 
525
# and as @@log_queries_not_using_indexes
 
526
#
 
527
# Not valid in Drizzle
 
528
#select @@log_queries_not_using_indexes;
 
529
#show variables like 'log_queries_not_using_indexes';
 
530
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
531
#select * from information_schema.session_variables where variable_name like 'log_queries_not_using_indexes';
484
532
 
485
533
#
486
534
# Bug#20908: Crash if select @@""
511
559
# Bug #19263: variables.test doesn't clean up after itself (II/II --
512
560
# restore)
513
561
#
 
562
set global connect_timeout           =@my_connect_timeout;
 
563
set global flush                     =@my_flush;
514
564
--error 1193
515
565
set global flush_time                =@my_flush_time;
516
 
set global myisam_key_cache_size           =@my_myisam_key_cache_size;
 
566
set global key_buffer_size           =@my_key_buffer_size;
517
567
set global max_connect_errors        =@my_max_connect_errors;
518
568
set global max_heap_table_size       =@my_max_heap_table_size;
519
569
set global max_join_size             =@my_max_join_size;
520
570
# No default
 
571
#set global max_user_connections      =default;
521
572
set global max_write_lock_count      =default;
522
573
--error 1232
523
574
set global myisam_data_pointer_size  =@my_myisam_data_pointer_size;
524
 
set global mysql_protocol_buffer_length= @my_mysql_protocol_buffer_length;
 
575
set global net_buffer_length         =@my_net_buffer_length;
 
576
set global net_write_timeout         =@my_net_write_timeout;
 
577
set global net_read_timeout          =@my_net_read_timeout;
525
578
set global server_id                 =@my_server_id;
526
579
set global storage_engine            =@my_storage_engine;
527
580
--error 1193
528
581
set global thread_cache_size         =@my_thread_cache_size;
529
 
set global myisam_sort_buffer_size   =@my_myisam_sort_buffer_size;
530
582
 
531
583
#
532
584
# Bug#28580 Repeatation of status variables