~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/pbxt/variables.result

lp:drizzle + pbxt 1.1 + test results

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1,t2;
 
2
set @my_key_buffer_size           =@@global.key_buffer_size;
 
3
set @my_max_connect_errors        =@@global.max_connect_errors;
 
4
set @my_max_heap_table_size       =@@global.max_heap_table_size;
 
5
set @my_max_join_size             =@@global.max_join_size;
 
6
set @my_oldlibdrizzle_buffer_length =@@global.oldlibdrizzle_buffer_length;
 
7
set @my_server_id                 =@@global.server_id;
 
8
set @my_storage_engine            =@@global.storage_engine;
 
9
set @my_myisam_sort_buffer_size   =@@global.myisam_sort_buffer_size;
 
10
set @`test`=1;
 
11
select @test, @`test`, @TEST, @`TEST`, @"teSt";
 
12
@test   @`test` @TEST   @`TEST` @"teSt"
 
13
1       1       1       1       1
 
14
set @TEST=2;
 
15
select @test, @`test`, @TEST, @`TEST`, @"teSt";
 
16
@test   @`test` @TEST   @`TEST` @"teSt"
 
17
2       2       2       2       2
 
18
set @"tEST"=3;
 
19
select @test, @`test`, @TEST, @`TEST`, @"teSt";
 
20
@test   @`test` @TEST   @`TEST` @"teSt"
 
21
3       3       3       3       3
 
22
set @`TeST`=4;
 
23
select @test, @`test`, @TEST, @`TEST`, @"teSt";
 
24
@test   @`test` @TEST   @`TEST` @"teSt"
 
25
4       4       4       4       4
 
26
select @`teST`:=5;
 
27
@`teST`:=5
 
28
5
 
29
select @test, @`test`, @TEST, @`TEST`, @"teSt";
 
30
@test   @`test` @TEST   @`TEST` @"teSt"
 
31
5       5       5       5       5
 
32
set @select=2,@t5=1.23456;
 
33
select @`select`,@not_used;
 
34
@`select`       @not_used
 
35
2       NULL
 
36
set @test_int=10,@test_double=1e-10,@test_string="abcdeghi",@test_string2="abcdefghij",@select=NULL;
 
37
select @test_int,@test_double,@test_string,@test_string2,@select;
 
38
@test_int       @test_double    @test_string    @test_string2   @select
 
39
10      0.0000000001    abcdeghi        abcdefghij      NULL
 
40
set @test_int="hello",@test_double="hello",@test_string="hello",@test_string2="hello";
 
41
select @test_int,@test_double,@test_string,@test_string2;
 
42
@test_int       @test_double    @test_string    @test_string2
 
43
hello   hello   hello   hello
 
44
set @test_int="hellohello",@test_double="hellohello",@test_string="hellohello",@test_string2="hellohello";
 
45
select @test_int,@test_double,@test_string,@test_string2;
 
46
@test_int       @test_double    @test_string    @test_string2
 
47
hellohello      hellohello      hellohello      hellohello
 
48
set @test_int=null,@test_double=null,@test_string=null,@test_string2=null;
 
49
select @test_int,@test_double,@test_string,@test_string2;
 
50
@test_int       @test_double    @test_string    @test_string2
 
51
NULL    NULL    NULL    NULL
 
52
select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3;
 
53
@t1:=(@t2:=1)+@t3:=4    @t1     @t2     @t3
 
54
5       5       1       4
 
55
explain extended select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3;
 
56
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
 
57
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
 
58
Warnings:
 
59
Note    1003    select (@t1:=((@t2:=1) + (@t3:=4))) AS `@t1:=(@t2:=1)+@t3:=4`,(@t1) AS `@t1`,(@t2) AS `@t2`,(@t3) AS `@t3`
 
60
select @t5;
 
61
@t5
 
62
1.23456
 
63
CREATE TABLE t1 (c_id INT NOT NULL, c_name VARCHAR(250), c_country VARCHAR(250), PRIMARY KEY(c_id));
 
64
INSERT INTO t1 VALUES (1,'Bozo','USA'),(2,'Ronald','USA'),(3,'Kinko','IRE'),(4,'Mr. Floppy','GB');
 
65
SELECT @min_cid:=min(c_id), @max_cid:=max(c_id) from t1;
 
66
@min_cid:=min(c_id)     @max_cid:=max(c_id)
 
67
1       4
 
68
SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid;
 
69
c_id    c_name  c_country
 
70
1       Bozo    USA
 
71
4       Mr. Floppy      GB
 
72
SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid OR c_id=666;
 
73
c_id    c_name  c_country
 
74
1       Bozo    USA
 
75
4       Mr. Floppy      GB
 
76
ALTER TABLE t1 DROP PRIMARY KEY;
 
77
select * from t1 where c_id=@min_cid OR c_id=@max_cid;
 
78
c_id    c_name  c_country
 
79
1       Bozo    USA
 
80
4       Mr. Floppy      GB
 
81
drop table t1;
 
82
set GLOBAL max_join_size=10;
 
83
set max_join_size=100;
 
84
show variables like 'max_join_size';
 
85
Variable_name   Value
 
86
max_join_size   100
 
87
select * from information_schema.session_variables where variable_name like 'max_join_size';
 
88
VARIABLE_NAME   VARIABLE_VALUE
 
89
MAX_JOIN_SIZE   100
 
90
show global variables like 'max_join_size';
 
91
Variable_name   Value
 
92
max_join_size   10
 
93
select * from information_schema.global_variables where variable_name like 'max_join_size';
 
94
VARIABLE_NAME   VARIABLE_VALUE
 
95
MAX_JOIN_SIZE   10
 
96
set GLOBAL max_join_size=2000;
 
97
show global variables like 'max_join_size';
 
98
Variable_name   Value
 
99
max_join_size   2000
 
100
select * from information_schema.global_variables where variable_name like 'max_join_size';
 
101
VARIABLE_NAME   VARIABLE_VALUE
 
102
MAX_JOIN_SIZE   2000
 
103
set max_join_size=DEFAULT;
 
104
show variables like 'max_join_size';
 
105
Variable_name   Value
 
106
max_join_size   2000
 
107
select * from information_schema.session_variables where variable_name like 'max_join_size';
 
108
VARIABLE_NAME   VARIABLE_VALUE
 
109
MAX_JOIN_SIZE   2000
 
110
set GLOBAL max_join_size=DEFAULT;
 
111
show global variables like 'max_join_size';
 
112
Variable_name   Value
 
113
max_join_size   2147483647
 
114
select * from information_schema.global_variables where variable_name like 'max_join_size';
 
115
VARIABLE_NAME   VARIABLE_VALUE
 
116
MAX_JOIN_SIZE   2147483647
 
117
set @@max_join_size=1000, @@global.max_join_size=2000;
 
118
select @@local.max_join_size, @@global.max_join_size;
 
119
@@local.max_join_size   @@global.max_join_size
 
120
1000    2000
 
121
select @@identity,  length(@@version)>0;
 
122
@@identity      length(@@version)>0
 
123
0       1
 
124
select @@VERSION=version();
 
125
@@VERSION=version()
 
126
1
 
127
select last_insert_id(345);
 
128
last_insert_id(345)
 
129
345
 
130
explain extended select last_insert_id(345);
 
131
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
 
132
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
 
133
Warnings:
 
134
Note    1003    select last_insert_id(345) AS `last_insert_id(345)`
 
135
select @@IDENTITY,last_insert_id(), @@identity;
 
136
@@IDENTITY      last_insert_id()        @@identity
 
137
345     345     345
 
138
explain extended select @@IDENTITY,last_insert_id(), @@identity;
 
139
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
 
140
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
 
141
Warnings:
 
142
Note    1003    select 345 AS `@@IDENTITY`,last_insert_id() AS `last_insert_id()`,345 AS `@@identity`
 
143
set global timed_mutexes=ON;
 
144
show variables like 'timed_mutexes';
 
145
Variable_name   Value
 
146
timed_mutexes   ON
 
147
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
 
148
VARIABLE_NAME   VARIABLE_VALUE
 
149
TIMED_MUTEXES   ON
 
150
set global timed_mutexes=0;
 
151
show variables like 'timed_mutexes';
 
152
Variable_name   Value
 
153
timed_mutexes   OFF
 
154
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
 
155
VARIABLE_NAME   VARIABLE_VALUE
 
156
TIMED_MUTEXES   OFF
 
157
set storage_engine=MYISAM, storage_engine="HEAP";
 
158
show local variables like 'storage_engine';
 
159
Variable_name   Value
 
160
storage_engine  MEMORY
 
161
select * from information_schema.session_variables where variable_name like 'storage_engine';
 
162
VARIABLE_NAME   VARIABLE_VALUE
 
163
STORAGE_ENGINE  MEMORY
 
164
show global variables like 'storage_engine';
 
165
Variable_name   Value
 
166
storage_engine  PBXT
 
167
select * from information_schema.global_variables where variable_name like 'storage_engine';
 
168
VARIABLE_NAME   VARIABLE_VALUE
 
169
STORAGE_ENGINE  PBXT
 
170
set GLOBAL myisam_max_sort_file_size=2000000;
 
171
show global variables like 'myisam_max_sort_file_size';
 
172
Variable_name   Value
 
173
myisam_max_sort_file_size       2000000
 
174
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
 
175
VARIABLE_NAME   VARIABLE_VALUE
 
176
MYISAM_MAX_SORT_FILE_SIZE       2000000
 
177
set GLOBAL myisam_max_sort_file_size=default;
 
178
show global variables like 'myisam_max_sort_file_size';
 
179
Variable_name   Value
 
180
myisam_max_sort_file_size       2147483647
 
181
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
 
182
VARIABLE_NAME   VARIABLE_VALUE
 
183
MYISAM_MAX_SORT_FILE_SIZE       2147483647
 
184
set global oldlibdrizzle_buffer_length=1024;
 
185
show global variables like 'oldlibdrizzle_buffer_%';
 
186
Variable_name   Value
 
187
oldlibdrizzle_buffer_length     1024
 
188
select * from information_schema.global_variables where variable_name like 'oldlibdrizzle_buffer_%' order by 1;
 
189
VARIABLE_NAME   VARIABLE_VALUE
 
190
OLDLIBDRIZZLE_BUFFER_LENGTH     1024
 
191
show global variables like 'oldlibdrizzle_buffer_%';
 
192
Variable_name   Value
 
193
oldlibdrizzle_buffer_length     1024
 
194
select * from information_schema.global_variables where variable_name like 'oldlibdrizzle_buffer_%' order by 1;
 
195
VARIABLE_NAME   VARIABLE_VALUE
 
196
OLDLIBDRIZZLE_BUFFER_LENGTH     1024
 
197
set global oldlibdrizzle_buffer_length=1;
 
198
Warnings:
 
199
Error   1292    Truncated incorrect buffer_length value: '1'
 
200
show variables like 'oldlibdrizzle_buffer_length';
 
201
Variable_name   Value
 
202
oldlibdrizzle_buffer_length     1024
 
203
set global oldlibdrizzle_buffer_length=2000000000;
 
204
Warnings:
 
205
Error   1292    Truncated incorrect buffer_length value: '2000000000'
 
206
show variables like 'oldlibdrizzle_buffer_length';
 
207
Variable_name   Value
 
208
oldlibdrizzle_buffer_length     1048576
 
209
show variables like '%alloc%';
 
210
Variable_name   Value
 
211
innodb_use_sys_malloc   ON
 
212
query_alloc_block_size  8192
 
213
query_prealloc_size     8192
 
214
range_alloc_block_size  
 
215
transaction_alloc_block_size    8192
 
216
transaction_prealloc_size       4096
 
217
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
 
218
VARIABLE_NAME   VARIABLE_VALUE
 
219
INNODB_USE_SYS_MALLOC   ON
 
220
QUERY_ALLOC_BLOCK_SIZE  8192
 
221
QUERY_PREALLOC_SIZE     8192
 
222
RANGE_ALLOC_BLOCK_SIZE  
 
223
TRANSACTION_ALLOC_BLOCK_SIZE    8192
 
224
TRANSACTION_PREALLOC_SIZE       4096
 
225
set @@range_alloc_block_size=1024*16;
 
226
set @@query_alloc_block_size=1024*17+2;
 
227
set @@query_prealloc_size=1024*18;
 
228
set @@transaction_alloc_block_size=1024*20-1;
 
229
set @@transaction_prealloc_size=1024*21-1;
 
230
select @@query_alloc_block_size;
 
231
@@query_alloc_block_size
 
232
17408
 
233
show variables like '%alloc%';
 
234
Variable_name   Value
 
235
innodb_use_sys_malloc   ON
 
236
query_alloc_block_size  17408
 
237
query_prealloc_size     18432
 
238
range_alloc_block_size  
 
239
transaction_alloc_block_size    19456
 
240
transaction_prealloc_size       20480
 
241
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
 
242
VARIABLE_NAME   VARIABLE_VALUE
 
243
INNODB_USE_SYS_MALLOC   ON
 
244
QUERY_ALLOC_BLOCK_SIZE  17408
 
245
QUERY_PREALLOC_SIZE     18432
 
246
RANGE_ALLOC_BLOCK_SIZE  
 
247
TRANSACTION_ALLOC_BLOCK_SIZE    19456
 
248
TRANSACTION_PREALLOC_SIZE       20480
 
249
set @@range_alloc_block_size=default;
 
250
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
 
251
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
 
252
show variables like '%alloc%';
 
253
Variable_name   Value
 
254
innodb_use_sys_malloc   ON
 
255
query_alloc_block_size  8192
 
256
query_prealloc_size     8192
 
257
range_alloc_block_size  
 
258
transaction_alloc_block_size    8192
 
259
transaction_prealloc_size       4096
 
260
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
 
261
VARIABLE_NAME   VARIABLE_VALUE
 
262
INNODB_USE_SYS_MALLOC   ON
 
263
QUERY_ALLOC_BLOCK_SIZE  8192
 
264
QUERY_PREALLOC_SIZE     8192
 
265
RANGE_ALLOC_BLOCK_SIZE  
 
266
TRANSACTION_ALLOC_BLOCK_SIZE    8192
 
267
TRANSACTION_PREALLOC_SIZE       4096
 
268
SELECT @@version LIKE 'non-existent';
 
269
@@version LIKE 'non-existent'
 
270
0
 
271
SELECT @@version_compile_os LIKE 'non-existent';
 
272
@@version_compile_os LIKE 'non-existent'
 
273
0
 
274
set unknown_variable=1;
 
275
ERROR HY000: Unknown system variable 'unknown_variable'
 
276
set max_join_size="hello";
 
277
ERROR 42000: Incorrect argument type to variable 'max_join_size'
 
278
set storage_engine=UNKNOWN_TABLE_TYPE;
 
279
ERROR 42000: Unknown table engine 'UNKNOWN_TABLE_TYPE'
 
280
set GLOBAL storage_engine=DEFAULT;
 
281
ERROR 42000: Variable 'storage_engine' doesn't have a default value
 
282
set global autocommit=1;
 
283
ERROR HY000: Variable 'autocommit' is a SESSION variable and can't be used with SET GLOBAL
 
284
select @@global.timestamp;
 
285
ERROR HY000: Variable 'timestamp' is a SESSION variable
 
286
set @@version='';
 
287
ERROR HY000: Variable 'version' is a read only variable
 
288
set myisam_max_sort_file_size=100;
 
289
ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
 
290
set @@SQL_WARNINGS=NULL;
 
291
ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'NULL'
 
292
set autocommit=1;
 
293
select @@autocommit;
 
294
@@autocommit
 
295
1
 
296
set bulk_insert_buffer_size=100;
 
297
set join_buffer_size=100;
 
298
Warnings:
 
299
Error   1292    Truncated incorrect join_buffer_size value: '100'
 
300
set last_insert_id=1;
 
301
set max_allowed_packet=100;
 
302
Warnings:
 
303
Error   1292    Truncated incorrect max_allowed_packet value: '100'
 
304
set global max_connect_errors=100;
 
305
set max_heap_table_size=100;
 
306
Warnings:
 
307
Error   1292    Truncated incorrect max_heap_table_size value: '100'
 
308
set max_join_size=100;
 
309
set max_sort_length=100;
 
310
set global max_write_lock_count=100;
 
311
set global myisam_sort_buffer_size=100;
 
312
Warnings:
 
313
Error   1292    Truncated incorrect sort_buffer_size value: '100'
 
314
set global oldlibdrizzle_buffer_length=100;
 
315
Warnings:
 
316
Error   1292    Truncated incorrect buffer_length value: '100'
 
317
set read_buffer_size=100;
 
318
Warnings:
 
319
Error   1292    Truncated incorrect read_buffer_size value: '100'
 
320
set read_rnd_buffer_size=100;
 
321
set global server_id=100;
 
322
set sort_buffer_size=100;
 
323
Warnings:
 
324
Error   1292    Truncated incorrect sort_buffer_size value: '100'
 
325
set sql_big_selects=1;
 
326
set sql_buffer_result=1;
 
327
set sql_safe_updates=1;
 
328
set sql_select_limit=1;
 
329
set sql_select_limit=default;
 
330
set sql_warnings=1;
 
331
set global table_open_cache=100;
 
332
set storage_engine=myisam;
 
333
set timestamp=1, timestamp=default;
 
334
set tmp_table_size=100;
 
335
Warnings:
 
336
Error   1292    Truncated incorrect tmp_table_size value: '100'
 
337
set tx_isolation="READ-COMMITTED";
 
338
create temporary table t1 (a int not null auto_increment, primary key(a));
 
339
create temporary table t2 (a int not null auto_increment, primary key(a));
 
340
insert into t1 values(null),(null),(null);
 
341
insert into t2 values(null),(null),(null);
 
342
set global key_buffer_size=100000;
 
343
select @@key_buffer_size;
 
344
@@key_buffer_size
 
345
98304
 
346
select * from t1 where a=2;
 
347
a
 
348
2
 
349
select * from t2 where a=3;
 
350
a
 
351
3
 
352
check table t1,t2;
 
353
Table   Op      Msg_type        Msg_text
 
354
test.t1 check   status  OK
 
355
test.t2 check   status  OK
 
356
select max(a) +1, max(a) +2 into @xx,@yy from t1;
 
357
drop table t1,t2;
 
358
select @@xxxxxxxxxx;
 
359
ERROR HY000: Unknown system variable 'xxxxxxxxxx'
 
360
select 1;
 
361
1
 
362
1
 
363
select @@session.key_buffer_size;
 
364
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable
 
365
set global myisam_max_sort_file_size=4294967296;
 
366
show global variables like 'myisam_max_sort_file_size';
 
367
Variable_name   Value
 
368
myisam_max_sort_file_size       MAX_FILE_SIZE
 
369
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
 
370
VARIABLE_NAME   VARIABLE_VALUE
 
371
MYISAM_MAX_SORT_FILE_SIZE       MAX_FILE_SIZE
 
372
set global myisam_max_sort_file_size=default;
 
373
set @@global.global.key_buffer_size= 1;
 
374
ERROR HY000: Unknown system variable 'global'
 
375
set GLOBAL global.key_buffer_size= 1;
 
376
ERROR HY000: Unknown system variable 'global'
 
377
SELECT @@global.global.key_buffer_size;
 
378
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'key_buffer_size' at line 1
 
379
SELECT @@global.session.key_buffer_size;
 
380
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'key_buffer_size' at line 1
 
381
SELECT @@global.local.key_buffer_size;
 
382
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'key_buffer_size' at line 1
 
383
create temporary table t1 (
 
384
c1 int,
 
385
c2 int,
 
386
c3 int,
 
387
c4 int,
 
388
c5 bigint);
 
389
show create table t1;
 
390
Table   Create Table
 
391
t1      CREATE TEMPORARY TABLE `t1` (
 
392
  `c1` int DEFAULT NULL,
 
393
  `c2` int DEFAULT NULL,
 
394
  `c3` int DEFAULT NULL,
 
395
  `c4` int DEFAULT NULL,
 
396
  `c5` bigint DEFAULT NULL
 
397
) ENGINE=MyISAM
 
398
drop table t1;
 
399
set @arg00= 8, @arg01= 8.8, @arg02= 'a string', @arg03= 0.2e0;
 
400
create temporary table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4;
 
401
show create table t1;
 
402
Table   Create Table
 
403
t1      CREATE TEMPORARY TABLE `t1` (
 
404
  `c1` bigint DEFAULT NULL,
 
405
  `c2` decimal(65,30) DEFAULT NULL,
 
406
  `c3` text,
 
407
  `c4` double DEFAULT NULL
 
408
) ENGINE=MyISAM
 
409
drop table t1;
 
410
SET GLOBAL table_open_cache=-1;
 
411
Warnings:
 
412
Error   1292    Truncated incorrect table_open_cache value: '18446744073709551615'
 
413
SHOW VARIABLES LIKE 'table_open_cache';
 
414
Variable_name   Value
 
415
table_open_cache        100
 
416
SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
 
417
VARIABLE_NAME   VARIABLE_VALUE
 
418
TABLE_OPEN_CACHE        100
 
419
SET GLOBAL table_open_cache=DEFAULT;
 
420
*** Various tests with LC_TIME_NAMES
 
421
*** LC_TIME_NAMES: testing case insensitivity
 
422
set @@lc_time_names='ru_ru';
 
423
select @@lc_time_names;
 
424
@@lc_time_names
 
425
ru_RU
 
426
*** LC_TIME_NAMES: testing with a user variable
 
427
set @lc='JA_JP';
 
428
set @@lc_time_names=@lc;
 
429
select @@lc_time_names;
 
430
@@lc_time_names
 
431
ja_JP
 
432
*** LC_TIME_NAMES: testing with string expressions
 
433
set lc_time_names=concat('de','_','DE');
 
434
select @@lc_time_names;
 
435
@@lc_time_names
 
436
de_DE
 
437
set lc_time_names=concat('de','+','DE');
 
438
ERROR HY000: Unknown locale: 'de+DE'
 
439
select @@lc_time_names;
 
440
@@lc_time_names
 
441
de_DE
 
442
LC_TIME_NAMES: testing with numeric expressions
 
443
set @@lc_time_names=1+2;
 
444
select @@lc_time_names;
 
445
@@lc_time_names
 
446
sv_SE
 
447
set @@lc_time_names=1/0;
 
448
ERROR 42000: Incorrect argument type to variable 'lc_time_names'
 
449
select @@lc_time_names;
 
450
@@lc_time_names
 
451
sv_SE
 
452
set lc_time_names=en_US;
 
453
LC_TIME_NAMES: testing NULL and a negative number:
 
454
set lc_time_names=NULL;
 
455
ERROR 42000: Variable 'lc_time_names' can't be set to the value of 'NULL'
 
456
set lc_time_names=-1;
 
457
ERROR HY000: Unknown locale: '-1'
 
458
select @@lc_time_names;
 
459
@@lc_time_names
 
460
en_US
 
461
LC_TIME_NAMES: testing locale with the last ID:
 
462
set lc_time_names=108;
 
463
select @@lc_time_names;
 
464
@@lc_time_names
 
465
zh_HK
 
466
LC_TIME_NAMES: testing a number beyond the valid ID range:
 
467
set lc_time_names=109;
 
468
ERROR HY000: Unknown locale: '109'
 
469
select @@lc_time_names;
 
470
@@lc_time_names
 
471
zh_HK
 
472
LC_TIME_NAMES: testing that 0 is en_US:
 
473
set lc_time_names=0;
 
474
select @@lc_time_names;
 
475
@@lc_time_names
 
476
en_US
 
477
select @@global.lc_time_names, @@lc_time_names;
 
478
@@global.lc_time_names  @@lc_time_names
 
479
en_US   en_US
 
480
set @@global.lc_time_names=fr_FR;
 
481
select @@global.lc_time_names, @@lc_time_names;
 
482
@@global.lc_time_names  @@lc_time_names
 
483
fr_FR   en_US
 
484
New connection
 
485
select @@global.lc_time_names, @@lc_time_names;
 
486
@@global.lc_time_names  @@lc_time_names
 
487
fr_FR   fr_FR
 
488
set @@lc_time_names=ru_RU;
 
489
select @@global.lc_time_names, @@lc_time_names;
 
490
@@global.lc_time_names  @@lc_time_names
 
491
fr_FR   ru_RU
 
492
Returnung to default connection
 
493
select @@global.lc_time_names, @@lc_time_names;
 
494
@@global.lc_time_names  @@lc_time_names
 
495
fr_FR   en_US
 
496
set lc_time_names=default;
 
497
select @@global.lc_time_names, @@lc_time_names;
 
498
@@global.lc_time_names  @@lc_time_names
 
499
fr_FR   fr_FR
 
500
set @@global.lc_time_names=default;
 
501
select @@global.lc_time_names, @@lc_time_names;
 
502
@@global.lc_time_names  @@lc_time_names
 
503
en_US   fr_FR
 
504
set @@lc_time_names=default;
 
505
select @@global.lc_time_names, @@lc_time_names;
 
506
@@global.lc_time_names  @@lc_time_names
 
507
en_US   en_US
 
508
set @test = @@query_prealloc_size;
 
509
set @@query_prealloc_size = @test;
 
510
select @@query_prealloc_size = @test;
 
511
@@query_prealloc_size = @test
 
512
1
 
513
End of 4.1 tests
 
514
create temporary table t1 (a int);
 
515
select a into @x from t1;
 
516
Warnings:
 
517
Warning 1329    No data - zero rows fetched, selected, or processed
 
518
show warnings;
 
519
Level   Code    Message
 
520
Warning 1329    No data - zero rows fetched, selected, or processed
 
521
drop table t1;
 
522
set @@warning_count=1;
 
523
ERROR HY000: Variable 'warning_count' is a read only variable
 
524
set @@global.error_count=1;
 
525
ERROR HY000: Variable 'error_count' is a read only variable
 
526
select @@character_set_system;
 
527
ERROR HY000: Unknown system variable 'character_set_system'
 
528
set global character_set_system = utf8;
 
529
ERROR HY000: Unknown system variable 'character_set_system'
 
530
set @@global.version_compile_os='234';
 
531
ERROR HY000: Variable 'version_compile_os' is a read only variable
 
532
set @@global.character_set_filesystem=utf8;
 
533
ERROR HY000: Unknown system variable 'character_set_filesystem'
 
534
set character_set_filesystem=utf8;
 
535
ERROR HY000: Unknown system variable 'character_set_filesystem'
 
536
set @old_sql_big_selects = @@sql_big_selects;
 
537
set @@sql_big_selects = 1;
 
538
show variables like 'sql_big_selects';
 
539
Variable_name   Value
 
540
sql_big_selects ON
 
541
set @@sql_big_selects = @old_sql_big_selects;
 
542
set @@sql_notes = 0, @@sql_warnings = 0;
 
543
show variables like 'sql_notes';
 
544
Variable_name   Value
 
545
sql_notes       OFF
 
546
show variables like 'sql_warnings';
 
547
Variable_name   Value
 
548
sql_warnings    OFF
 
549
set @@sql_notes = 1, @@sql_warnings = 1;
 
550
show variables like 'sql_notes';
 
551
Variable_name   Value
 
552
sql_notes       ON
 
553
show variables like 'sql_warnings';
 
554
Variable_name   Value
 
555
sql_warnings    ON
 
556
select @@version, @@version_comment, @@version_compile_machine,
 
557
@@version_compile_os;
 
558
@@version       @@version_comment       @@version_compile_machine       @@version_compile_os
 
559
#       #       #       #
 
560
select @@basedir, @@datadir, @@tmpdir;
 
561
@@basedir       @@datadir       @@tmpdir
 
562
#       #       #
 
563
show variables like 'basedir';
 
564
Variable_name   Value
 
565
basedir #
 
566
show variables like 'datadir';
 
567
Variable_name   Value
 
568
datadir #
 
569
show variables like 'tmpdir';
 
570
Variable_name   Value
 
571
tmpdir  #
 
572
select @@"";
 
573
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '""' at line 1
 
574
select @@&;
 
575
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '&' at line 1
 
576
select @@@;
 
577
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '@' at line 1
 
578
select @@hostname;
 
579
@@hostname
 
580
#
 
581
set @@hostname= "anothername";
 
582
ERROR HY000: Variable 'hostname' is a read only variable
 
583
show variables like 'hostname';
 
584
Variable_name   Value
 
585
hostname        #
 
586
End of 5.0 tests
 
587
set global flush_time                =@my_flush_time;
 
588
ERROR HY000: Unknown system variable 'flush_time'
 
589
set global key_buffer_size           =@my_key_buffer_size;
 
590
set global max_connect_errors        =@my_max_connect_errors;
 
591
set global max_heap_table_size       =@my_max_heap_table_size;
 
592
set global max_join_size             =@my_max_join_size;
 
593
set global max_write_lock_count      =default;
 
594
set global myisam_data_pointer_size  =@my_myisam_data_pointer_size;
 
595
ERROR 42000: Incorrect argument type to variable 'myisam_data_pointer_size'
 
596
set global oldlibdrizzle_buffer_length= @my_oldlibdrizzle_buffer_length;
 
597
set global server_id                 =@my_server_id;
 
598
set global storage_engine            =@my_storage_engine;
 
599
set global thread_cache_size         =@my_thread_cache_size;
 
600
ERROR HY000: Unknown system variable 'thread_cache_size'
 
601
set global myisam_sort_buffer_size   =@my_myisam_sort_buffer_size;
 
602
show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';
 
603
Variable_name   Value
 
604
table_definition_cache  #
 
605
table_lock_wait_timeout #