~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/variables.test

  • Committer: Mark Atwood
  • Date: 2008-12-29 22:12:25 UTC
  • mfrom: (752 testable)
  • mto: (754.1.4 devel)
  • mto: This revision was merged to the branch mainline in revision 755.
  • Revision ID: me@mark.atwood.name-20081229221225-u2hiic4ztb2mryfn
mergeĀ fromĀ main

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
set @my_server_id                 =@@global.server_id;
25
25
set @my_slow_launch_time          =@@global.slow_launch_time;
26
26
set @my_storage_engine            =@@global.storage_engine;
27
 
set @my_thread_cache_size         =@@global.thread_cache_size;
28
27
 
29
28
# case insensitivity tests (new in 5.0)
30
29
set @`test`=1;
175
174
set storage_engine=UNKNOWN_TABLE_TYPE;
176
175
--error 1230
177
176
set GLOBAL storage_engine=DEFAULT;
178
 
--error 1273
179
 
set collation_connection=UNKNOWN_COLLATION;
180
 
--error 1231
181
 
set collation_connection=NULL;
182
177
--error 1228
183
178
set global autocommit=1;
184
179
--error 1238
203
198
set global delay_key_write=ALL;
204
199
set global delay_key_write=1;
205
200
select @@delay_key_write;
206
 
set insert_id=1;
207
201
set interactive_timeout=100;
208
202
set join_buffer_size=100;
209
203
set last_insert_id=1;
230
224
set sql_big_selects=1;
231
225
set sql_buffer_result=1;
232
226
set sql_log_bin=1;
233
 
set sql_low_priority_updates=1;
234
227
set sql_quote_show_create=1;
235
228
set sql_safe_updates=1;
236
229
set sql_select_limit=1;
239
232
set sql_warnings=1;
240
233
set global table_open_cache=100;
241
234
set storage_engine=myisam;
242
 
set global thread_cache_size=100;
243
235
set timestamp=1, timestamp=default;
244
236
set tmp_table_size=100;
245
237
set tx_isolation="READ-COMMITTED";
246
238
set wait_timeout=100;
247
239
 
248
240
#
249
 
# Bugs: #20392: INSERT_ID session variable has weird value
250
 
#
251
 
select @@session.insert_id;
252
 
set @save_insert_id=@@session.insert_id;
253
 
set session insert_id=20;
254
 
select @@session.insert_id;
255
 
 
256
 
set session last_insert_id=100;
257
 
select @@session.insert_id;
258
 
select @@session.last_insert_id;
259
 
select @@session.insert_id;
260
 
 
261
 
set @@session.insert_id=@save_insert_id;
262
 
select @@session.insert_id;
263
 
 
264
 
#
265
241
# key buffer
266
242
#
267
243
 
303
279
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
304
280
set global myisam_max_sort_file_size=default;
305
281
 
306
 
#
307
 
# swap
308
 
#
309
 
select @@global.myisam_max_sort_file_size,@@local.max_join_size;
310
 
set @svc=@@global.myisam_max_sort_file_size, @svj=@@local.max_join_size;
311
 
select @@global.myisam_max_sort_file_size,@@local.max_join_size;
312
 
set @@global.myisam_max_sort_file_size=111,@@local.max_join_size=222;
313
 
select @@global.myisam_max_sort_file_size,@@local.max_join_size;
314
 
set @@global.myisam_max_sort_file_size=@@local.max_join_size,@@local.max_join_size=@@global.myisam_max_sort_file_size;
315
 
select @@global.myisam_max_sort_file_size,@@local.max_join_size;
316
 
set @@global.myisam_max_sort_file_size=@svc, @@local.max_join_size=@svj;
317
 
select @@global.myisam_max_sort_file_size,@@local.max_join_size;
318
 
set @a=1, @b=2;
319
 
set @a=@b, @b=@a;
320
 
select @a, @b;
 
282
## Bug #311084
 
283
## swap
 
284
##
 
285
#select @@global.myisam_max_sort_file_size,@@local.max_join_size;
 
286
#set @svc=@@global.myisam_max_sort_file_size, @svj=@@local.max_join_size;
 
287
#select @@global.myisam_max_sort_file_size,@@local.max_join_size;
 
288
#set @@global.myisam_max_sort_file_size=111,@@local.max_join_size=222;
 
289
#select @@global.myisam_max_sort_file_size,@@local.max_join_size;
 
290
#set @@global.myisam_max_sort_file_size=@@local.max_join_size,@@local.max_join_size=@@global.myisam_max_sort_file_size;
 
291
#select @@global.myisam_max_sort_file_size,@@local.max_join_size;
 
292
#set @@global.myisam_max_sort_file_size=@svc, @@local.max_join_size=@svj;
 
293
#select @@global.myisam_max_sort_file_size,@@local.max_join_size;
 
294
#set @a=1, @b=2;
 
295
#set @a=@b, @b=@a;
 
296
#select @a, @b;
321
297
 
322
298
#
323
299
# Bug#2586:Disallow global/session/local as structured var. instance names
358
334
 
359
335
SET GLOBAL table_open_cache=-1;
360
336
SHOW VARIABLES LIKE 'table_open_cache';
361
 
SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
 
337
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
338
#SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
362
339
SET GLOBAL table_open_cache=DEFAULT;
363
340
 
364
341
#
365
 
# Bugs12363: character_set_results is nullable,
366
 
# but value_ptr returns string "NULL"
367
 
#
368
 
set character_set_results=NULL;
369
 
select ifnull(@@character_set_results,"really null");
370
 
set names latin1;
371
 
 
372
 
 
373
 
#
374
 
# Bug #9613: @@have_innodb
375
 
#
376
 
 
377
 
--replace_column 1 #
378
 
select @@have_innodb;
379
 
 
380
 
#
381
342
# Tests for lc_time_names
382
343
# Note, when adding new locales, please fix ID accordingly:
383
344
# - to test the last ID (currently 108)
486
447
#
487
448
# Bug #11775 Variable character_set_system does not exist (sometimes)
488
449
#
 
450
--error 1193
489
451
select @@character_set_system;
490
 
--error 1238
491
 
set global character_set_system = latin1;
 
452
--error 1193
 
453
set global character_set_system = utf8;
492
454
--error 1238
493
455
set @@global.version_compile_os='234';
494
456
 
495
457
#
496
 
# Check character_set_filesystem variable
 
458
# Check character_set_filesystem variable invalid for Drizzle
497
459
#
498
 
set character_set_filesystem=latin1;
499
 
select @@character_set_filesystem;
500
 
set @@global.character_set_filesystem=latin2;
501
 
set character_set_filesystem=latin1;
502
 
select @@character_set_filesystem;
503
 
set @@global.character_set_filesystem=latin2;
504
 
set character_set_filesystem=default;
505
 
select @@character_set_filesystem;
506
 
set @@global.character_set_filesystem=default;
507
 
select @@global.character_set_filesystem;
 
460
--error 1193
 
461
set @@global.character_set_filesystem=utf8;
 
462
--error 1193
 
463
set character_set_filesystem=utf8;
508
464
 
509
465
#
510
466
# Bug #17849: Show sql_big_selects in SHOW VARIABLES
512
468
set @old_sql_big_selects = @@sql_big_selects;
513
469
set @@sql_big_selects = 1;
514
470
show variables like 'sql_big_selects';
515
 
select * from information_schema.session_variables where variable_name like 'sql_big_selects';
 
471
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
472
#select * from information_schema.session_variables where variable_name like 'sql_big_selects';
516
473
set @@sql_big_selects = @old_sql_big_selects;
517
474
 
518
475
#
521
478
522
479
set @@sql_notes = 0, @@sql_warnings = 0;
523
480
show variables like 'sql_notes';
524
 
select * from information_schema.session_variables where variable_name like 'sql_notes';
 
481
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
482
#select * from information_schema.session_variables where variable_name like 'sql_notes';
525
483
show variables like 'sql_warnings';
526
 
select * from information_schema.session_variables where variable_name like 'sql_warnings';
 
484
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
485
#select * from information_schema.session_variables where variable_name like 'sql_warnings';
527
486
set @@sql_notes = 1, @@sql_warnings = 1;
528
487
show variables like 'sql_notes';
529
 
select * from information_schema.session_variables where variable_name like 'sql_notes';
 
488
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
489
#select * from information_schema.session_variables where variable_name like 'sql_notes';
530
490
show variables like 'sql_warnings';
531
 
select * from information_schema.session_variables where variable_name like 'sql_warnings';
 
491
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
492
#select * from information_schema.session_variables where variable_name like 'sql_warnings';
532
493
 
533
494
#
534
495
# Bug #12792: @@system_time_zone is not SELECTable.
555
516
--replace_column 2 #
556
517
show variables like 'basedir';
557
518
--replace_column 2 #
558
 
select * from information_schema.session_variables where variable_name like 'basedir';
 
519
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
520
#select * from information_schema.session_variables where variable_name like 'basedir';
559
521
--replace_column 2 #
560
522
show variables like 'datadir';
561
523
--replace_column 2 #
562
 
select * from information_schema.session_variables where variable_name like 'datadir';
 
524
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
525
#select * from information_schema.session_variables where variable_name like 'datadir';
563
526
--replace_column 2 #
564
527
show variables like 'tmpdir';
565
528
--replace_column 2 #
566
 
select * from information_schema.session_variables where variable_name like 'tmpdir';
 
529
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
530
#select * from information_schema.session_variables where variable_name like 'tmpdir';
567
531
 
568
532
#
569
533
# Bug #19606: make ssl settings available via SHOW VARIABLES and @@variables
570
534
571
535
# Don't actually output, since it depends on the system
572
 
--replace_column 1 # 2 # 3 # 4 # 5 #
573
 
select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key;
574
 
--replace_column 2 #
575
 
show variables like 'ssl%';
576
 
--replace_column 2 #
577
 
select * from information_schema.session_variables where variable_name like 'ssl%' order by 1;
 
536
#--replace_column 1 # 2 # 3 # 4 # 5 #
 
537
# Not supported in Drizzle
 
538
#select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key;
 
539
#--replace_column 2 #
 
540
#show variables like 'ssl%';
 
541
#--replace_column 2 #
 
542
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
543
#select * from information_schema.session_variables where variable_name like 'ssl%' order by 1;
578
544
 
579
545
#
580
546
# Bug #19616: make log_queries_not_using_indexes available in SHOW VARIABLES
581
547
# and as @@log_queries_not_using_indexes
582
548
#
583
 
select @@log_queries_not_using_indexes;
584
 
show variables like 'log_queries_not_using_indexes';
585
 
select * from information_schema.session_variables where variable_name like 'log_queries_not_using_indexes';
 
549
# Not valid in Drizzle
 
550
#select @@log_queries_not_using_indexes;
 
551
#show variables like 'log_queries_not_using_indexes';
 
552
# Bug 311025 Segmentation fault when accessing INFORMATION_SCHEMA
 
553
#select * from information_schema.session_variables where variable_name like 'log_queries_not_using_indexes';
586
554
 
587
555
#
588
556
# Bug#20908: Crash if select @@""
616
584
set global binlog_cache_size         =@my_binlog_cache_size;
617
585
set global connect_timeout           =@my_connect_timeout;
618
586
set global flush                     =@my_flush;
 
587
--error 1193
619
588
set global flush_time                =@my_flush_time;
620
589
set global key_buffer_size           =@my_key_buffer_size;
621
590
set global max_binlog_cache_size     =default;                #@my_max_binlog_cache_size;
627
596
# No default
628
597
#set global max_user_connections      =default;
629
598
set global max_write_lock_count      =default;
 
599
--error 1193
630
600
set global myisam_data_pointer_size  =@my_myisam_data_pointer_size;
631
601
set global net_buffer_length         =@my_net_buffer_length;
632
602
set global net_write_timeout         =@my_net_write_timeout;
633
603
set global net_read_timeout          =@my_net_read_timeout;
 
604
--error 1193
634
605
set global rpl_recovery_rank         =@my_rpl_recovery_rank;
635
606
set global server_id                 =@my_server_id;
636
607
set global slow_launch_time          =@my_slow_launch_time;
637
608
set global storage_engine            =@my_storage_engine;
 
609
--error 1193
638
610
set global thread_cache_size         =@my_thread_cache_size;
639
611
 
640
612
#
641
613
# Bug#28580 Repeatation of status variables
642
614
#
643
615
--replace_column 2 #
644
 
show global variables where Variable_name='table_definition_cache' or
645
 
Variable_name='table_lock_wait_timeout';
646
 
 
647
 
###########################################################################
648
 
 
649
 
--echo
650
 
--echo # --
651
 
--echo # -- Bug#34820: log_output can be set to illegal value.
652
 
--echo # --
653
 
 
654
 
--error ER_WRONG_VALUE_FOR_VAR
655
 
SET GLOBAL log_output = '';
656
 
 
657
 
--error ER_WRONG_VALUE_FOR_VAR
658
 
SET GLOBAL log_output = 0;
659
 
 
660
 
--echo
661
 
--echo # -- End of Bug#34820.
662
 
 
 
616
# Drizzle Bug 311044
 
617
#show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';