83
89
show variables like 'max_join_size';
84
90
Variable_name Value
86
select * from data_dictionary.session_variables where variable_name like 'max_join_size';
92
select * from information_schema.session_variables where variable_name like 'max_join_size';
87
93
VARIABLE_NAME VARIABLE_VALUE
89
95
show global variables like 'max_join_size';
90
96
Variable_name Value
92
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
98
select * from information_schema.global_variables where variable_name like 'max_join_size';
93
99
VARIABLE_NAME VARIABLE_VALUE
95
101
set GLOBAL max_join_size=2000;
96
102
show global variables like 'max_join_size';
97
103
Variable_name Value
98
104
max_join_size 2000
99
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
105
select * from information_schema.global_variables where variable_name like 'max_join_size';
100
106
VARIABLE_NAME VARIABLE_VALUE
102
108
set max_join_size=DEFAULT;
103
109
show variables like 'max_join_size';
104
110
Variable_name Value
105
111
max_join_size 2000
106
select * from data_dictionary.session_variables where variable_name like 'max_join_size';
112
select * from information_schema.session_variables where variable_name like 'max_join_size';
107
113
VARIABLE_NAME VARIABLE_VALUE
109
115
set GLOBAL max_join_size=DEFAULT;
110
116
show global variables like 'max_join_size';
111
117
Variable_name Value
112
118
max_join_size 2147483647
113
select * from data_dictionary.global_variables where variable_name like 'max_join_size';
119
select * from information_schema.global_variables where variable_name like 'max_join_size';
114
120
VARIABLE_NAME VARIABLE_VALUE
115
max_join_size 2147483647
121
MAX_JOIN_SIZE 2147483647
116
122
set @@max_join_size=1000, @@global.max_join_size=2000;
117
123
select @@local.max_join_size, @@global.max_join_size;
118
124
@@local.max_join_size @@global.max_join_size
143
149
show variables like 'timed_mutexes';
144
150
Variable_name Value
146
select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
152
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
147
153
VARIABLE_NAME VARIABLE_VALUE
149
155
set global timed_mutexes=0;
150
156
show variables like 'timed_mutexes';
151
157
Variable_name Value
152
158
timed_mutexes OFF
153
select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
159
select * from information_schema.session_variables where variable_name like 'timed_mutexes';
154
160
VARIABLE_NAME VARIABLE_VALUE
156
set storage_engine=MYISAM, storage_engine="MEMORY";
162
set storage_engine=MYISAM, storage_engine="HEAP";
157
163
show local variables like 'storage_engine';
158
164
Variable_name Value
159
165
storage_engine MEMORY
160
select * from data_dictionary.session_variables where variable_name like 'storage_engine';
166
select * from information_schema.session_variables where variable_name like 'storage_engine';
161
167
VARIABLE_NAME VARIABLE_VALUE
162
storage_engine MEMORY
168
STORAGE_ENGINE MEMORY
163
169
show global variables like 'storage_engine';
164
170
Variable_name Value
165
171
storage_engine InnoDB
166
select * from data_dictionary.global_variables where variable_name like 'storage_engine';
172
select * from information_schema.global_variables where variable_name like 'storage_engine';
167
173
VARIABLE_NAME VARIABLE_VALUE
168
storage_engine InnoDB
174
STORAGE_ENGINE InnoDB
169
175
set GLOBAL myisam_max_sort_file_size=2000000;
170
176
show global variables like 'myisam_max_sort_file_size';
171
177
Variable_name Value
172
178
myisam_max_sort_file_size 2000000
173
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
179
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
174
180
VARIABLE_NAME VARIABLE_VALUE
175
myisam_max_sort_file_size 2000000
181
MYISAM_MAX_SORT_FILE_SIZE 2000000
176
182
set GLOBAL myisam_max_sort_file_size=default;
177
183
show global variables like 'myisam_max_sort_file_size';
178
184
Variable_name Value
179
185
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
186
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
187
VARIABLE_NAME VARIABLE_VALUE
188
MYISAM_MAX_SORT_FILE_SIZE 2147483647
189
set global net_retry_count=10, session net_retry_count=10;
190
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
191
set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600;
192
show global variables like 'net_%';
194
net_buffer_length 1024
197
net_write_timeout 200
198
select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
199
VARIABLE_NAME VARIABLE_VALUE
200
NET_BUFFER_LENGTH 1024
203
NET_WRITE_TIMEOUT 200
204
show session variables like 'net_%';
206
net_buffer_length 2048
209
net_write_timeout 500
210
select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
211
VARIABLE_NAME VARIABLE_VALUE
212
NET_BUFFER_LENGTH 2048
215
NET_WRITE_TIMEOUT 500
216
set session net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000;
217
show global variables like 'net_%';
219
net_buffer_length 1024
222
net_write_timeout 1000
223
select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
224
VARIABLE_NAME VARIABLE_VALUE
225
NET_BUFFER_LENGTH 1024
228
NET_WRITE_TIMEOUT 1000
229
show session variables like 'net_%';
231
net_buffer_length 7168
234
net_write_timeout 500
235
select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
236
VARIABLE_NAME VARIABLE_VALUE
237
NET_BUFFER_LENGTH 7168
240
NET_WRITE_TIMEOUT 500
241
set net_buffer_length=1;
243
Warning 1292 Truncated incorrect net_buffer_length value: '1'
244
show variables like 'net_buffer_length';
246
net_buffer_length 1024
247
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
248
VARIABLE_NAME VARIABLE_VALUE
249
NET_BUFFER_LENGTH 1024
250
set net_buffer_length=2000000000;
252
Warning 1292 Truncated incorrect net_buffer_length value: '2000000000'
253
show variables like 'net_buffer_length';
255
net_buffer_length 1048576
256
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
257
VARIABLE_NAME VARIABLE_VALUE
258
NET_BUFFER_LENGTH 1048576
208
259
show variables like '%alloc%';
209
260
Variable_name Value
210
innodb_use_sys_malloc ON
211
261
query_alloc_block_size 8192
212
262
query_prealloc_size 8192
213
range_alloc_block_size 4096
214
select * from data_dictionary.session_variables where variable_name like '%alloc%';
263
range_alloc_block_size
264
transaction_alloc_block_size 8192
265
transaction_prealloc_size 4096
266
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
215
267
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
268
QUERY_ALLOC_BLOCK_SIZE 8192
269
QUERY_PREALLOC_SIZE 8192
270
RANGE_ALLOC_BLOCK_SIZE
271
TRANSACTION_ALLOC_BLOCK_SIZE 8192
272
TRANSACTION_PREALLOC_SIZE 4096
220
273
set @@range_alloc_block_size=1024*16;
221
274
set @@query_alloc_block_size=1024*17+2;
222
275
set @@query_prealloc_size=1024*18;
276
set @@transaction_alloc_block_size=1024*20-1;
277
set @@transaction_prealloc_size=1024*21-1;
223
278
select @@query_alloc_block_size;
224
279
@@query_alloc_block_size
226
281
show variables like '%alloc%';
227
282
Variable_name Value
228
innodb_use_sys_malloc ON
229
283
query_alloc_block_size 17408
230
284
query_prealloc_size 18432
231
range_alloc_block_size 16384
232
select * from data_dictionary.session_variables where variable_name like '%alloc%';
285
range_alloc_block_size
286
transaction_alloc_block_size 19456
287
transaction_prealloc_size 20480
288
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
233
289
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
290
QUERY_ALLOC_BLOCK_SIZE 17408
291
QUERY_PREALLOC_SIZE 18432
292
RANGE_ALLOC_BLOCK_SIZE
293
TRANSACTION_ALLOC_BLOCK_SIZE 19456
294
TRANSACTION_PREALLOC_SIZE 20480
238
295
set @@range_alloc_block_size=default;
239
296
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
297
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
240
298
show variables like '%alloc%';
241
299
Variable_name Value
242
innodb_use_sys_malloc ON
243
300
query_alloc_block_size 8192
244
301
query_prealloc_size 8192
245
range_alloc_block_size 4096
246
select * from data_dictionary.session_variables where variable_name like '%alloc%';
302
range_alloc_block_size
303
transaction_alloc_block_size 8192
304
transaction_prealloc_size 4096
305
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
247
306
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
307
QUERY_ALLOC_BLOCK_SIZE 8192
308
QUERY_PREALLOC_SIZE 8192
309
RANGE_ALLOC_BLOCK_SIZE
310
TRANSACTION_ALLOC_BLOCK_SIZE 8192
311
TRANSACTION_PREALLOC_SIZE 4096
252
312
SELECT @@version LIKE 'non-existent';
253
313
@@version LIKE 'non-existent'
280
340
set bulk_insert_buffer_size=100;
341
set global connect_timeout=100;
342
select @@delay_key_write;
345
set global delay_key_write="OFF";
346
select @@delay_key_write;
349
set global delay_key_write=ALL;
350
set global delay_key_write=1;
351
select @@delay_key_write;
354
set interactive_timeout=100;
281
355
set join_buffer_size=100;
283
Error 1292 Truncated incorrect join_buffer_size value: '100'
357
Warning 1292 Truncated incorrect join_buffer_size value: '100'
284
358
set last_insert_id=1;
359
set global local_infile=1;
285
360
set max_allowed_packet=100;
287
Error 1292 Truncated incorrect max_allowed_packet value: '100'
362
Warning 1292 Truncated incorrect max_allowed_packet value: '100'
363
set global max_connect_errors=100;
364
set global max_connections=100;
288
365
set max_heap_table_size=100;
290
Error 1292 Truncated incorrect max_heap_table_size value: '100'
367
Warning 1292 Truncated incorrect max_heap_table_size value: '100'
291
368
set max_join_size=100;
292
369
set max_sort_length=100;
370
set max_tmp_tables=100;
293
371
set global max_write_lock_count=100;
294
372
set global myisam_sort_buffer_size=100;
296
Error 1524 Error setting myisam_sort_buffer_size. Given value 100 (< 1024)
297
set global mysql_protocol_buffer_length=100;
374
Warning 1292 Truncated incorrect sort_buffer_size value: '100'
375
set net_buffer_length=100;
299
Error 1524 Error setting mysql_protocol_buffer_length. Given value 100 (< 1024)
377
Warning 1292 Truncated incorrect net_buffer_length value: '100'
378
set net_read_timeout=100;
379
set net_write_timeout=100;
300
380
set read_buffer_size=100;
302
Error 1292 Truncated incorrect read_buffer_size value: '100'
382
Warning 1292 Truncated incorrect read_buffer_size value: '100'
303
383
set read_rnd_buffer_size=100;
304
384
set global server_id=100;
385
set global slow_launch_time=100;
305
386
set sort_buffer_size=100;
307
Error 1292 Truncated incorrect sort_buffer_size value: '100'
388
Warning 1292 Truncated incorrect sort_buffer_size value: '100'
308
389
set sql_big_selects=1;
309
390
set sql_buffer_result=1;
391
set sql_safe_updates=1;
310
392
set sql_select_limit=1;
311
393
set sql_select_limit=default;
312
394
set sql_warnings=1;
315
397
set timestamp=1, timestamp=default;
316
398
set tmp_table_size=100;
318
Error 1292 Truncated incorrect tmp_table_size value: '100'
400
Warning 1292 Truncated incorrect tmp_table_size value: '100'
319
401
set tx_isolation="READ-COMMITTED";
402
set wait_timeout=100;
403
create table t1 (a int not null auto_increment, primary key(a));
404
create table t2 (a int not null auto_increment, primary key(a));
405
insert into t1 values(null),(null),(null);
406
insert into t2 values(null),(null),(null);
407
set global key_buffer_size=100000;
408
select @@key_buffer_size;
411
select * from t1 where a=2;
414
select * from t2 where a=3;
418
Table Op Msg_type Msg_text
419
test.t1 check status OK
420
test.t2 check status OK
421
select max(a) +1, max(a) +2 into @xx,@yy from t1;
424
ERROR HY000: Unknown system variable 'xxxxxxxxxx'
428
select @@session.key_buffer_size;
429
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable
430
set init_connect = NULL;
431
ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
432
set global init_connect = NULL;
320
433
set global myisam_max_sort_file_size=4294967296;
321
434
show global variables like 'myisam_max_sort_file_size';
322
435
Variable_name Value
323
436
myisam_max_sort_file_size MAX_FILE_SIZE
324
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
437
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
325
438
VARIABLE_NAME VARIABLE_VALUE
326
myisam_max_sort_file_size MAX_FILE_SIZE
439
MYISAM_MAX_SORT_FILE_SIZE MAX_FILE_SIZE
327
440
set global myisam_max_sort_file_size=default;
328
create temporary table t1 (
441
set @@global.global.key_buffer_size= 1;
442
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= 1' at line 1
443
set GLOBAL global.key_buffer_size= 1;
444
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= 1' at line 1
445
SELECT @@global.global.key_buffer_size;
446
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
447
SELECT @@global.session.key_buffer_size;
448
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
449
SELECT @@global.local.key_buffer_size;
450
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
529
664
Variable_name Value
667
set global connect_timeout =@my_connect_timeout;
668
set global flush =@my_flush;
532
669
set global flush_time =@my_flush_time;
533
670
ERROR HY000: Unknown system variable 'flush_time'
671
set global key_buffer_size =@my_key_buffer_size;
672
set global max_connect_errors =@my_max_connect_errors;
673
set global max_connections =@my_max_connections;
534
674
set global max_heap_table_size =@my_max_heap_table_size;
535
675
set global max_join_size =@my_max_join_size;
536
676
set global max_write_lock_count =default;
537
set global mysql_protocol_buffer_length= @my_mysql_protocol_buffer_length;
677
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
678
ERROR 42000: Incorrect argument type to variable 'myisam_data_pointer_size'
679
set global net_buffer_length =@my_net_buffer_length;
680
set global net_write_timeout =@my_net_write_timeout;
681
set global net_read_timeout =@my_net_read_timeout;
538
682
set global server_id =@my_server_id;
683
set global slow_launch_time =@my_slow_launch_time;
539
684
set global storage_engine =@my_storage_engine;
540
685
set global thread_cache_size =@my_thread_cache_size;
541
686
ERROR HY000: Unknown system variable 'thread_cache_size'
542
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
show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';
584
table_definition_cache #
585
table_lock_wait_timeout #