~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/variables.test

  • Committer: Brian Aker
  • Date: 2010-07-20 02:17:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1665.
  • Revision ID: brian@gaz-20100720021709-1yeehbw8d5vbtmlc
Removed identifier bit

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