83
84
show variables like 'max_join_size';
84
85
Variable_name Value
86
select * from data_dictionary.session_variables where variable_name like 'max_join_size';
87
select * from information_schema.session_variables where variable_name like 'max_join_size';
87
88
VARIABLE_NAME VARIABLE_VALUE
89
90
show global variables like 'max_join_size';
90
91
Variable_name Value
92
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
93
select * from information_schema.global_variables where variable_name like 'max_join_size';
93
94
VARIABLE_NAME VARIABLE_VALUE
95
96
set GLOBAL max_join_size=2000;
96
97
show global variables like 'max_join_size';
97
98
Variable_name Value
99
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
100
select * from information_schema.global_variables where variable_name like 'max_join_size';
100
101
VARIABLE_NAME VARIABLE_VALUE
102
103
set max_join_size=DEFAULT;
103
104
show variables like 'max_join_size';
104
105
Variable_name Value
105
106
max_join_size 2000
106
select * from data_dictionary.session_variables where variable_name like 'max_join_size';
107
select * from information_schema.session_variables where variable_name like 'max_join_size';
107
108
VARIABLE_NAME VARIABLE_VALUE
109
110
set GLOBAL max_join_size=DEFAULT;
110
111
show global variables like 'max_join_size';
111
112
Variable_name Value
112
113
max_join_size 2147483647
113
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
114
select * from information_schema.global_variables where variable_name like 'max_join_size';
114
115
VARIABLE_NAME VARIABLE_VALUE
115
max_join_size 2147483647
116
MAX_JOIN_SIZE 2147483647
116
117
set @@max_join_size=1000, @@global.max_join_size=2000;
117
118
select @@local.max_join_size, @@global.max_join_size;
118
119
@@local.max_join_size @@global.max_join_size
143
144
show variables like 'timed_mutexes';
144
145
Variable_name Value
146
select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
147
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
147
148
VARIABLE_NAME VARIABLE_VALUE
149
150
set global timed_mutexes=0;
150
151
show variables like 'timed_mutexes';
151
152
Variable_name Value
152
153
timed_mutexes OFF
153
select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
154
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
154
155
VARIABLE_NAME VARIABLE_VALUE
156
set storage_engine=MYISAM, storage_engine="MEMORY";
157
set storage_engine=MYISAM, storage_engine="HEAP";
157
158
show local variables like 'storage_engine';
158
159
Variable_name Value
159
160
storage_engine MEMORY
160
select * from data_dictionary.session_variables where variable_name like 'storage_engine';
161
select * from information_schema.session_variables where variable_name like 'storage_engine';
161
162
VARIABLE_NAME VARIABLE_VALUE
162
storage_engine MEMORY
163
STORAGE_ENGINE MEMORY
163
164
show global variables like 'storage_engine';
164
165
Variable_name Value
165
166
storage_engine InnoDB
166
select * from data_dictionary.global_variables where variable_name like 'storage_engine';
167
select * from information_schema.global_variables where variable_name like 'storage_engine';
167
168
VARIABLE_NAME VARIABLE_VALUE
168
storage_engine InnoDB
169
STORAGE_ENGINE InnoDB
169
170
set GLOBAL myisam_max_sort_file_size=2000000;
170
171
show global variables like 'myisam_max_sort_file_size';
171
172
Variable_name Value
172
173
myisam_max_sort_file_size 2000000
173
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
174
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
174
175
VARIABLE_NAME VARIABLE_VALUE
175
myisam_max_sort_file_size 2000000
176
MYISAM_MAX_SORT_FILE_SIZE 2000000
176
177
set GLOBAL myisam_max_sort_file_size=default;
177
178
show global variables like 'myisam_max_sort_file_size';
178
179
Variable_name Value
179
180
myisam_max_sort_file_size 2147483647
180
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
181
VARIABLE_NAME VARIABLE_VALUE
182
myisam_max_sort_file_size 2147483647
183
set global mysql_protocol_buffer_length=1024;
184
show global variables like 'mysql_protocol_buffer_%';
186
mysql_protocol_buffer_length 1024
187
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
188
VARIABLE_NAME VARIABLE_VALUE
189
mysql_protocol_buffer_length 1024
190
show global variables like 'mysql_protocol_buffer_%';
192
mysql_protocol_buffer_length 1024
193
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
194
VARIABLE_NAME VARIABLE_VALUE
195
mysql_protocol_buffer_length 1024
196
set global mysql_protocol_buffer_length=1;
198
Error 1524 Error setting mysql_protocol_buffer_length. Given value 1 (< 1024)
199
show variables like 'mysql_protocol_buffer_length';
201
mysql_protocol_buffer_length 1024
202
set global mysql_protocol_buffer_length=2000000000;
204
Error 1524 Error setting mysql_protocol_buffer_length. Given value 2000000000 (> 1048576)
205
show variables like 'mysql_protocol_buffer_length';
207
mysql_protocol_buffer_length 1024
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_%';
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_%';
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;
199
Error 1292 Truncated incorrect buffer_length value: '1'
200
show variables like 'oldlibdrizzle_buffer_length';
202
oldlibdrizzle_buffer_length 1024
203
set global oldlibdrizzle_buffer_length=2000000000;
205
Error 1292 Truncated incorrect buffer_length value: '2000000000'
206
show variables like 'oldlibdrizzle_buffer_length';
208
oldlibdrizzle_buffer_length 1048576
208
209
show variables like '%alloc%';
209
210
Variable_name Value
210
211
innodb_use_sys_malloc ON
211
212
query_alloc_block_size 8192
212
213
query_prealloc_size 8192
213
range_alloc_block_size 4096
214
select * from data_dictionary.session_variables where variable_name like '%alloc%';
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;
215
218
VARIABLE_NAME VARIABLE_VALUE
216
innodb_use_sys_malloc ON
217
query_alloc_block_size 8192
218
query_prealloc_size 8192
219
range_alloc_block_size 4096
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
220
225
set @@range_alloc_block_size=1024*16;
221
226
set @@query_alloc_block_size=1024*17+2;
222
227
set @@query_prealloc_size=1024*18;
228
set @@transaction_alloc_block_size=1024*20-1;
229
set @@transaction_prealloc_size=1024*21-1;
223
230
select @@query_alloc_block_size;
224
231
@@query_alloc_block_size
228
235
innodb_use_sys_malloc ON
229
236
query_alloc_block_size 17408
230
237
query_prealloc_size 18432
231
range_alloc_block_size 16384
232
select * from data_dictionary.session_variables where variable_name like '%alloc%';
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;
233
242
VARIABLE_NAME VARIABLE_VALUE
234
innodb_use_sys_malloc ON
235
query_alloc_block_size 17408
236
query_prealloc_size 18432
237
range_alloc_block_size 16384
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
238
249
set @@range_alloc_block_size=default;
239
250
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
251
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
240
252
show variables like '%alloc%';
241
253
Variable_name Value
242
254
innodb_use_sys_malloc ON
243
255
query_alloc_block_size 8192
244
256
query_prealloc_size 8192
245
range_alloc_block_size 4096
246
select * from data_dictionary.session_variables where variable_name like '%alloc%';
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;
247
261
VARIABLE_NAME VARIABLE_VALUE
248
innodb_use_sys_malloc ON
249
query_alloc_block_size 8192
250
query_prealloc_size 8192
251
range_alloc_block_size 4096
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
252
268
SELECT @@version LIKE 'non-existent';
253
269
@@version LIKE 'non-existent'
318
336
Error 1292 Truncated incorrect tmp_table_size value: '100'
319
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;
346
select * from t1 where a=2;
349
select * from t2 where a=3;
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;
359
ERROR HY000: Unknown system variable 'xxxxxxxxxx'
363
select @@session.key_buffer_size;
364
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable
320
365
set global myisam_max_sort_file_size=4294967296;
321
366
show global variables like 'myisam_max_sort_file_size';
322
367
Variable_name Value
323
368
myisam_max_sort_file_size MAX_FILE_SIZE
324
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
369
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
325
370
VARIABLE_NAME VARIABLE_VALUE
326
myisam_max_sort_file_size MAX_FILE_SIZE
371
MYISAM_MAX_SORT_FILE_SIZE MAX_FILE_SIZE
327
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
328
383
create temporary table t1 (
334
389
show create table t1;
335
390
Table Create Table
336
391
t1 CREATE TEMPORARY TABLE `t1` (
337
`c1` INT DEFAULT NULL,
338
`c2` INT DEFAULT NULL,
339
`c3` INT DEFAULT NULL,
340
`c4` INT DEFAULT NULL,
341
`c5` BIGINT DEFAULT NULL
342
) ENGINE=MyISAM COLLATE = utf8_general_ci
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
344
399
set @arg00= 8, @arg01= 8.8, @arg02= 'a string', @arg03= 0.2e0;
345
400
create temporary table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4;
346
401
show create table t1;
347
402
Table Create Table
348
403
t1 CREATE TEMPORARY TABLE `t1` (
349
`c1` BIGINT DEFAULT NULL,
350
`c2` DECIMAL(65,30) DEFAULT NULL,
351
`c3` TEXT COLLATE utf8_general_ci,
352
`c4` DOUBLE DEFAULT NULL
353
) ENGINE=MyISAM COLLATE = utf8_general_ci
404
`c1` bigint DEFAULT NULL,
405
`c2` decimal(65,30) DEFAULT NULL,
407
`c4` double DEFAULT NULL
355
410
SET GLOBAL table_open_cache=-1;
532
599
set global flush_time =@my_flush_time;
533
600
ERROR HY000: Unknown system variable 'flush_time'
601
set global key_buffer_size =@my_key_buffer_size;
602
set global max_connect_errors =@my_max_connect_errors;
534
603
set global max_heap_table_size =@my_max_heap_table_size;
535
604
set global max_join_size =@my_max_join_size;
536
605
set global max_write_lock_count =default;
537
set global mysql_protocol_buffer_length= @my_mysql_protocol_buffer_length;
606
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
607
ERROR 42000: Incorrect argument type to variable 'myisam_data_pointer_size'
608
set global oldlibdrizzle_buffer_length= @my_oldlibdrizzle_buffer_length;
538
609
set global server_id =@my_server_id;
539
610
set global storage_engine =@my_storage_engine;
540
611
set global thread_cache_size =@my_thread_cache_size;
541
612
ERROR HY000: Unknown system variable 'thread_cache_size'
542
613
set global myisam_sort_buffer_size =@my_myisam_sort_buffer_size;
543
SHOW GLOBAL VARIABLES LIKE 'max_join_size';
545
max_join_size 2147483647
546
SHOW LOCAL VARIABLES LIKE 'max_join_size';
549
set GLOBAL bulk_insert_buffer_size=DEFAULT;
550
set GLOBAL join_buffer_size=DEFAULT;
551
set GLOBAL max_allowed_packet=DEFAULT;
552
set GLOBAL max_heap_table_size=DEFAULT;
553
set GLOBAL max_join_size=DEFAULT;
554
set GLOBAL max_sort_length=DEFAULT;
555
set GLOBAL max_write_lock_count=DEFAULT;
556
set GLOBAL myisam_sort_buffer_size=DEFAULT;
557
set GLOBAL mysql_protocol_buffer_length=DEFAULT;
558
set GLOBAL read_buffer_size=DEFAULT;
559
set GLOBAL read_rnd_buffer_size=DEFAULT;
560
set GLOBAL server_id=DEFAULT;
561
set GLOBAL sort_buffer_size=DEFAULT;
562
set GLOBAL table_open_cache=DEFAULT;
563
set GLOBAL storage_engine= @my_storage_engine;
564
set GLOBAL tmp_table_size=DEFAULT;
565
set GLOBAL tx_isolation= @my_tx_isolation;
566
set SESSION bulk_insert_buffer_size=DEFAULT;
567
set SESSION join_buffer_size=DEFAULT;
568
set SESSION max_allowed_packet=DEFAULT;
569
set SESSION max_heap_table_size=DEFAULT;
570
set SESSION max_join_size=DEFAULT;
571
set SESSION max_sort_length=DEFAULT;
572
set SESSION read_buffer_size=DEFAULT;
573
set SESSION read_rnd_buffer_size=DEFAULT;
574
set SESSION sort_buffer_size=DEFAULT;
575
set SESSION sql_big_selects=DEFAULT;
576
set SESSION sql_buffer_result=DEFAULT;
577
set SESSION sql_select_limit=DEFAULT;
578
set SESSION sql_warnings=DEFAULT;
579
set SESSION storage_engine= @my_storage_engine;
580
set SESSION tmp_table_size=DEFAULT;
581
set SESSION tx_isolation= @my_tx_isolation;
582
614
show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';
583
615
Variable_name Value
584
616
table_definition_cache #