~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/variables.test

  • Committer: Monty Taylor
  • Date: 2010-04-22 02:46:23 UTC
  • mto: (1497.3.4 enable-dtrace)
  • mto: This revision was merged to the branch mainline in revision 1527.
  • Revision ID: mordred@inaugust.com-20100422024623-4urw8fi8eraci08p
Don't overwrite the pandora_vc_revinfo file if we don't have new
authoratative information.

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;
 
12
set @my_max_connect_errors        =@@global.max_connect_errors;
11
13
set @my_max_heap_table_size       =@@global.max_heap_table_size;
12
14
set @my_max_join_size             =@@global.max_join_size;
13
15
set @my_mysql_protocol_buffer_length =@@global.mysql_protocol_buffer_length;
145
147
 
146
148
# The following should give errors
147
149
 
148
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
150
--error 1193
149
151
set unknown_variable=1;
150
 
--error ER_WRONG_TYPE_FOR_VAR
 
152
--error 1232
151
153
set max_join_size="hello";
152
 
--error ER_UNKNOWN_STORAGE_ENGINE
 
154
--error 1286
153
155
set storage_engine=UNKNOWN_TABLE_TYPE;
154
 
--error ER_NO_DEFAULT
 
156
--error 1230
155
157
set GLOBAL storage_engine=DEFAULT;
156
 
--error ER_LOCAL_VARIABLE
 
158
--error 1228
157
159
set global autocommit=1;
158
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
160
--error 1238
159
161
select @@global.timestamp;
160
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR 
 
162
--error 1238 
161
163
set @@version='';
162
 
--error ER_GLOBAL_VARIABLE
 
164
--error 1229
163
165
set myisam_max_sort_file_size=100;
164
 
--error ER_WRONG_VALUE_FOR_VAR
 
166
--error 1231
165
167
set @@SQL_WARNINGS=NULL;
166
168
 
167
169
# Test setting all variables
172
174
set join_buffer_size=100;
173
175
set last_insert_id=1;
174
176
set max_allowed_packet=100;
 
177
set global max_connect_errors=100;
175
178
set max_heap_table_size=100;
176
179
set max_join_size=100;
177
180
set max_sort_length=100;
194
197
set tmp_table_size=100;
195
198
set tx_isolation="READ-COMMITTED";
196
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
 
197
232
# Bug#3754 SET GLOBAL myisam_max_sort_file_size doesn't work as
198
233
# expected: check that there is no overflow when 64-bit
199
234
# variables are set
222
257
#select @a, @b;
223
258
 
224
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
#
225
274
# BUG#4788 show create table provides incorrect statement
226
275
#
227
276
# What default width have numeric types?
266
315
--echo *** LC_TIME_NAMES: testing with string expressions
267
316
set lc_time_names=concat('de','_','DE');
268
317
select @@lc_time_names;
269
 
--error ER_UNKNOWN_ERROR
 
318
--error 1105
270
319
set lc_time_names=concat('de','+','DE');
271
320
select @@lc_time_names;
272
321
--echo LC_TIME_NAMES: testing with numeric expressions
273
322
set @@lc_time_names=1+2;
274
323
select @@lc_time_names;
275
 
--error ER_WRONG_TYPE_FOR_VAR
 
324
--error 1232
276
325
set @@lc_time_names=1/0;
277
326
select @@lc_time_names;
278
327
set lc_time_names=en_US;
279
328
--echo LC_TIME_NAMES: testing NULL and a negative number:
280
 
--error ER_WRONG_VALUE_FOR_VAR
 
329
--error 1231
281
330
set lc_time_names=NULL;
282
 
--error ER_UNKNOWN_ERROR
 
331
--error 1105
283
332
set lc_time_names=-1;
284
333
select @@lc_time_names;
285
334
--echo LC_TIME_NAMES: testing locale with the last ID:
286
335
set lc_time_names=108;
287
336
select @@lc_time_names;
288
337
--echo LC_TIME_NAMES: testing a number beyond the valid ID range:
289
 
--error ER_UNKNOWN_ERROR
 
338
--error 1105
290
339
set lc_time_names=109;
291
340
select @@lc_time_names;
292
341
--echo LC_TIME_NAMES: testing that 0 is en_US:
339
388
# Bug #10339: read only variables.
340
389
#
341
390
 
342
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
391
--error 1238
343
392
set @@warning_count=1;
344
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
393
--error 1238
345
394
set @@global.error_count=1;
346
395
 
347
396
#
361
410
#
362
411
# Bug #11775 Variable character_set_system does not exist (sometimes)
363
412
#
364
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
413
--error 1193
365
414
select @@character_set_system;
366
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
415
--error 1193
367
416
set global character_set_system = utf8;
368
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
417
--error 1238
369
418
set @@global.version_compile_os='234';
370
419
 
371
420
#
372
421
# Check character_set_filesystem variable invalid for Drizzle
373
422
#
374
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
423
--error 1193
375
424
set @@global.character_set_filesystem=utf8;
376
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
425
--error 1193
377
426
set character_set_filesystem=utf8;
378
427
 
379
428
#
450
499
# Don't actually output, since it depends on the system
451
500
--replace_column 1 #
452
501
select @@hostname;
453
 
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
502
--error 1238
454
503
set @@hostname= "anothername";
455
504
--replace_column 2 #
456
505
show variables like 'hostname';
463
512
# Bug #19263: variables.test doesn't clean up after itself (II/II --
464
513
# restore)
465
514
#
466
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
515
--error 1193
467
516
set global flush_time                =@my_flush_time;
 
517
set global myisam_key_cache_size           =@my_myisam_key_cache_size;
 
518
set global max_connect_errors        =@my_max_connect_errors;
468
519
set global max_heap_table_size       =@my_max_heap_table_size;
469
520
set global max_join_size             =@my_max_join_size;
470
521
# No default
471
522
set global max_write_lock_count      =default;
 
523
--error 1232
 
524
set global myisam_data_pointer_size  =@my_myisam_data_pointer_size;
472
525
set global mysql_protocol_buffer_length= @my_mysql_protocol_buffer_length;
473
526
set global server_id                 =@my_server_id;
474
527
set global storage_engine            =@my_storage_engine;
475
 
--error ER_UNKNOWN_SYSTEM_VARIABLE
 
528
--error 1193
476
529
set global thread_cache_size         =@my_thread_cache_size;
477
530
set global myisam_sort_buffer_size   =@my_myisam_sort_buffer_size;
478
531
 
482
535
set GLOBAL bulk_insert_buffer_size=DEFAULT;
483
536
set GLOBAL join_buffer_size=DEFAULT;
484
537
set GLOBAL max_allowed_packet=DEFAULT;
 
538
set GLOBAL max_connect_errors=DEFAULT;
485
539
set GLOBAL max_heap_table_size=DEFAULT;
486
540
set GLOBAL max_join_size=DEFAULT;
487
541
set GLOBAL max_sort_length=DEFAULT;