~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/variables.test

  • Committer: Monty Taylor
  • Date: 2010-03-23 08:23:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1398.
  • Revision ID: mordred@inaugust.com-20100323082332-r8tktlbu82wlamzv
Set the default plugin version for plugins not specifying a version to be
tied to the actual server version.

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
12
set @my_max_connect_errors        =@@global.max_connect_errors;
12
13
set @my_max_heap_table_size       =@@global.max_heap_table_size;
13
14
set @my_max_join_size             =@@global.max_join_size;
15
16
set @my_server_id                 =@@global.server_id;
16
17
set @my_storage_engine            =@@global.storage_engine;
17
18
set @my_myisam_sort_buffer_size   =@@global.myisam_sort_buffer_size;
18
 
set @my_tx_isolation      =@@global.tx_isolation;
19
19
 
20
20
# case insensitivity tests (new in 5.0)
21
21
set @`test`=1;
146
146
 
147
147
# The following should give errors
148
148
 
149
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
149
--error 1193
150
150
set unknown_variable=1;
151
 
--error ER_WRONG_TYPE_FOR_VAR
 
151
--error 1232
152
152
set max_join_size="hello";
153
 
--error ER_UNKNOWN_STORAGE_ENGINE
 
153
--error 1286
154
154
set storage_engine=UNKNOWN_TABLE_TYPE;
155
 
--error ER_NO_DEFAULT
 
155
--error 1230
156
156
set GLOBAL storage_engine=DEFAULT;
157
 
--error ER_LOCAL_VARIABLE
 
157
--error 1228
158
158
set global autocommit=1;
159
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
159
--error 1238
160
160
select @@global.timestamp;
161
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR 
 
161
--error 1238 
162
162
set @@version='';
163
 
--error ER_GLOBAL_VARIABLE
 
163
--error 1229
164
164
set myisam_max_sort_file_size=100;
165
 
--error ER_WRONG_VALUE_FOR_VAR
 
165
--error 1231
166
166
set @@SQL_WARNINGS=NULL;
167
167
 
168
168
# Test setting all variables
196
196
set tmp_table_size=100;
197
197
set tx_isolation="READ-COMMITTED";
198
198
 
 
199
#
 
200
# key buffer
 
201
#
 
202
 
 
203
create temporary table t1 (a int not null auto_increment, primary key(a));
 
204
create temporary table t2 (a int not null auto_increment, primary key(a));
 
205
insert into t1 values(null),(null),(null);
 
206
insert into t2 values(null),(null),(null);
 
207
set global myisam_key_cache_size=100000;
 
208
select @@myisam_key_cache_size;
 
209
select * from t1 where a=2;
 
210
select * from t2 where a=3;
 
211
check table t1,t2;
 
212
select max(a) +1, max(a) +2 into @xx,@yy from t1;
 
213
drop table t1,t2;
 
214
 
 
215
#
 
216
# error conditions
 
217
#
 
218
 
 
219
--error 1193
 
220
select @@xxxxxxxxxx;
 
221
select 1;
 
222
 
 
223
--error 1238
 
224
select @@session.myisam_key_cache_size;
 
225
 
 
226
# init_connect was removed
 
227
#--error 1229
 
228
#set init_connect = NULL;
 
229
#set global init_connect = NULL;
 
230
 
199
231
# Bug#3754 SET GLOBAL myisam_max_sort_file_size doesn't work as
200
232
# expected: check that there is no overflow when 64-bit
201
233
# variables are set
224
256
#select @a, @b;
225
257
 
226
258
#
 
259
# Bug#2586:Disallow global/session/local as structured var. instance names
 
260
#
 
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;
 
271
 
 
272
#
227
273
# BUG#4788 show create table provides incorrect statement
228
274
#
229
275
# What default width have numeric types?
268
314
--echo *** LC_TIME_NAMES: testing with string expressions
269
315
set lc_time_names=concat('de','_','DE');
270
316
select @@lc_time_names;
271
 
--error ER_UNKNOWN_ERROR
 
317
--error 1105
272
318
set lc_time_names=concat('de','+','DE');
273
319
select @@lc_time_names;
274
320
--echo LC_TIME_NAMES: testing with numeric expressions
275
321
set @@lc_time_names=1+2;
276
322
select @@lc_time_names;
277
 
--error ER_WRONG_TYPE_FOR_VAR
 
323
--error 1232
278
324
set @@lc_time_names=1/0;
279
325
select @@lc_time_names;
280
326
set lc_time_names=en_US;
281
327
--echo LC_TIME_NAMES: testing NULL and a negative number:
282
 
--error ER_WRONG_VALUE_FOR_VAR
 
328
--error 1231
283
329
set lc_time_names=NULL;
284
 
--error ER_UNKNOWN_ERROR
 
330
--error 1105
285
331
set lc_time_names=-1;
286
332
select @@lc_time_names;
287
333
--echo LC_TIME_NAMES: testing locale with the last ID:
288
334
set lc_time_names=108;
289
335
select @@lc_time_names;
290
336
--echo LC_TIME_NAMES: testing a number beyond the valid ID range:
291
 
--error ER_UNKNOWN_ERROR
 
337
--error 1105
292
338
set lc_time_names=109;
293
339
select @@lc_time_names;
294
340
--echo LC_TIME_NAMES: testing that 0 is en_US:
341
387
# Bug #10339: read only variables.
342
388
#
343
389
 
344
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
390
--error 1238
345
391
set @@warning_count=1;
346
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
392
--error 1238
347
393
set @@global.error_count=1;
348
394
 
349
395
#
363
409
#
364
410
# Bug #11775 Variable character_set_system does not exist (sometimes)
365
411
#
366
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
412
--error 1193
367
413
select @@character_set_system;
368
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
414
--error 1193
369
415
set global character_set_system = utf8;
370
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
416
--error 1238
371
417
set @@global.version_compile_os='234';
372
418
 
373
419
#
374
420
# Check character_set_filesystem variable invalid for Drizzle
375
421
#
376
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
422
--error 1193
377
423
set @@global.character_set_filesystem=utf8;
378
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
424
--error 1193
379
425
set character_set_filesystem=utf8;
380
426
 
381
427
#
452
498
# Don't actually output, since it depends on the system
453
499
--replace_column 1 #
454
500
select @@hostname;
455
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
501
--error 1238
456
502
set @@hostname= "anothername";
457
503
--replace_column 2 #
458
504
show variables like 'hostname';
465
511
# Bug #19263: variables.test doesn't clean up after itself (II/II --
466
512
# restore)
467
513
#
468
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
514
--error 1193
469
515
set global flush_time                =@my_flush_time;
 
516
set global myisam_key_cache_size           =@my_myisam_key_cache_size;
470
517
set global max_connect_errors        =@my_max_connect_errors;
471
518
set global max_heap_table_size       =@my_max_heap_table_size;
472
519
set global max_join_size             =@my_max_join_size;
473
520
# No default
474
521
set global max_write_lock_count      =default;
 
522
--error 1232
 
523
set global myisam_data_pointer_size  =@my_myisam_data_pointer_size;
475
524
set global mysql_protocol_buffer_length= @my_mysql_protocol_buffer_length;
476
525
set global server_id                 =@my_server_id;
477
526
set global storage_engine            =@my_storage_engine;
478
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
527
--error 1193
479
528
set global thread_cache_size         =@my_thread_cache_size;
480
529
set global myisam_sort_buffer_size   =@my_myisam_sort_buffer_size;
481
530
 
482
 
SHOW GLOBAL VARIABLES LIKE 'max_join_size';
483
 
SHOW LOCAL VARIABLES LIKE 'max_join_size';
484
 
 
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;
503
 
 
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;
520
 
 
521
531
#
522
532
# Bug#28580 Repeatation of status variables
523
533
#
524
 
 
525
534
--replace_column 2 #
526
535
show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';
527