84
84
show variables like 'max_join_size';
85
85
Variable_name Value
87
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';
88
88
VARIABLE_NAME VARIABLE_VALUE
90
90
show global variables like 'max_join_size';
91
91
Variable_name Value
93
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';
94
94
VARIABLE_NAME VARIABLE_VALUE
96
96
set GLOBAL max_join_size=2000;
97
97
show global variables like 'max_join_size';
98
98
Variable_name Value
100
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';
101
101
VARIABLE_NAME VARIABLE_VALUE
103
103
set max_join_size=DEFAULT;
104
104
show variables like 'max_join_size';
105
105
Variable_name Value
106
106
max_join_size 2000
107
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';
108
108
VARIABLE_NAME VARIABLE_VALUE
110
110
set GLOBAL max_join_size=DEFAULT;
111
111
show global variables like 'max_join_size';
112
112
Variable_name Value
113
113
max_join_size 2147483647
114
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';
115
115
VARIABLE_NAME VARIABLE_VALUE
116
max_join_size 2147483647
116
MAX_JOIN_SIZE 2147483647
117
117
set @@max_join_size=1000, @@global.max_join_size=2000;
118
118
select @@local.max_join_size, @@global.max_join_size;
119
119
@@local.max_join_size @@global.max_join_size
144
144
show variables like 'timed_mutexes';
145
145
Variable_name Value
147
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';
148
148
VARIABLE_NAME VARIABLE_VALUE
150
150
set global timed_mutexes=0;
151
151
show variables like 'timed_mutexes';
152
152
Variable_name Value
153
153
timed_mutexes OFF
154
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';
155
155
VARIABLE_NAME VARIABLE_VALUE
157
set storage_engine=MYISAM, storage_engine="MEMORY";
157
set storage_engine=MYISAM, storage_engine="HEAP";
158
158
show local variables like 'storage_engine';
159
159
Variable_name Value
160
160
storage_engine MEMORY
161
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';
162
162
VARIABLE_NAME VARIABLE_VALUE
163
storage_engine MEMORY
163
STORAGE_ENGINE MEMORY
164
164
show global variables like 'storage_engine';
165
165
Variable_name Value
166
166
storage_engine InnoDB
167
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';
168
168
VARIABLE_NAME VARIABLE_VALUE
169
storage_engine InnoDB
169
STORAGE_ENGINE InnoDB
170
170
set GLOBAL myisam_max_sort_file_size=2000000;
171
171
show global variables like 'myisam_max_sort_file_size';
172
172
Variable_name Value
173
173
myisam_max_sort_file_size 2000000
174
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';
175
175
VARIABLE_NAME VARIABLE_VALUE
176
myisam_max_sort_file_size 2000000
176
MYISAM_MAX_SORT_FILE_SIZE 2000000
177
177
set GLOBAL myisam_max_sort_file_size=default;
178
178
show global variables like 'myisam_max_sort_file_size';
179
179
Variable_name Value
180
180
myisam_max_sort_file_size 2147483647
181
select * from data_dictionary.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 mysql_protocol_buffer_length=1024;
185
show global variables like 'mysql_protocol_buffer_%';
187
mysql_protocol_buffer_length 1024
188
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
189
VARIABLE_NAME VARIABLE_VALUE
190
mysql_protocol_buffer_length 1024
191
show global variables like 'mysql_protocol_buffer_%';
193
mysql_protocol_buffer_length 1024
194
select * from data_dictionary.global_variables where variable_name like 'mysql_protocol_buffer_%';
195
VARIABLE_NAME VARIABLE_VALUE
196
mysql_protocol_buffer_length 1024
197
set global mysql_protocol_buffer_length=1;
199
Error 1524 Error setting mysql_protocol_buffer_length. Given value 1 (< 1024)
200
show variables like 'mysql_protocol_buffer_length';
202
mysql_protocol_buffer_length 1024
203
set global mysql_protocol_buffer_length=2000000000;
205
Error 1524 Error setting mysql_protocol_buffer_length. Given value 2000000000 (> 1048576)
206
show variables like 'mysql_protocol_buffer_length';
208
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 net_buffer_length=1024;
185
set session net_buffer_length=2048;
186
show global variables like 'net_%';
188
net_buffer_length 1024
189
select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
190
VARIABLE_NAME VARIABLE_VALUE
191
NET_BUFFER_LENGTH 1024
192
show session variables like 'net_%';
194
net_buffer_length 2048
195
select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
196
VARIABLE_NAME VARIABLE_VALUE
197
NET_BUFFER_LENGTH 2048
198
set session net_buffer_length=8000;
199
show global variables like 'net_%';
201
net_buffer_length 1024
202
select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
203
VARIABLE_NAME VARIABLE_VALUE
204
NET_BUFFER_LENGTH 1024
205
show session variables like 'net_%';
207
net_buffer_length 7168
208
select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
209
VARIABLE_NAME VARIABLE_VALUE
210
NET_BUFFER_LENGTH 7168
211
set net_buffer_length=1;
213
Error 1292 Truncated incorrect net_buffer_length value: '1'
214
show variables like 'net_buffer_length';
216
net_buffer_length 1024
217
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
218
VARIABLE_NAME VARIABLE_VALUE
219
NET_BUFFER_LENGTH 1024
220
set net_buffer_length=2000000000;
222
Error 1292 Truncated incorrect net_buffer_length value: '2000000000'
223
show variables like 'net_buffer_length';
225
net_buffer_length 1048576
226
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
227
VARIABLE_NAME VARIABLE_VALUE
228
NET_BUFFER_LENGTH 1048576
209
229
show variables like '%alloc%';
210
230
Variable_name Value
211
231
innodb_use_sys_malloc ON
212
232
query_alloc_block_size 8192
213
233
query_prealloc_size 8192
214
range_alloc_block_size 4096
215
select * from data_dictionary.session_variables where variable_name like '%alloc%';
234
range_alloc_block_size
235
transaction_alloc_block_size 8192
236
transaction_prealloc_size 4096
237
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
216
238
VARIABLE_NAME VARIABLE_VALUE
217
innodb_use_sys_malloc ON
218
query_alloc_block_size 8192
219
query_prealloc_size 8192
220
range_alloc_block_size 4096
239
INNODB_USE_SYS_MALLOC ON
240
QUERY_ALLOC_BLOCK_SIZE 8192
241
QUERY_PREALLOC_SIZE 8192
242
RANGE_ALLOC_BLOCK_SIZE
243
TRANSACTION_ALLOC_BLOCK_SIZE 8192
244
TRANSACTION_PREALLOC_SIZE 4096
221
245
set @@range_alloc_block_size=1024*16;
222
246
set @@query_alloc_block_size=1024*17+2;
223
247
set @@query_prealloc_size=1024*18;
248
set @@transaction_alloc_block_size=1024*20-1;
249
set @@transaction_prealloc_size=1024*21-1;
224
250
select @@query_alloc_block_size;
225
251
@@query_alloc_block_size
229
255
innodb_use_sys_malloc ON
230
256
query_alloc_block_size 17408
231
257
query_prealloc_size 18432
232
range_alloc_block_size 16384
233
select * from data_dictionary.session_variables where variable_name like '%alloc%';
258
range_alloc_block_size
259
transaction_alloc_block_size 19456
260
transaction_prealloc_size 20480
261
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
234
262
VARIABLE_NAME VARIABLE_VALUE
235
innodb_use_sys_malloc ON
236
query_alloc_block_size 17408
237
query_prealloc_size 18432
238
range_alloc_block_size 16384
263
INNODB_USE_SYS_MALLOC ON
264
QUERY_ALLOC_BLOCK_SIZE 17408
265
QUERY_PREALLOC_SIZE 18432
266
RANGE_ALLOC_BLOCK_SIZE
267
TRANSACTION_ALLOC_BLOCK_SIZE 19456
268
TRANSACTION_PREALLOC_SIZE 20480
239
269
set @@range_alloc_block_size=default;
240
270
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
271
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
241
272
show variables like '%alloc%';
242
273
Variable_name Value
243
274
innodb_use_sys_malloc ON
244
275
query_alloc_block_size 8192
245
276
query_prealloc_size 8192
246
range_alloc_block_size 4096
247
select * from data_dictionary.session_variables where variable_name like '%alloc%';
277
range_alloc_block_size
278
transaction_alloc_block_size 8192
279
transaction_prealloc_size 4096
280
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
248
281
VARIABLE_NAME VARIABLE_VALUE
249
innodb_use_sys_malloc ON
250
query_alloc_block_size 8192
251
query_prealloc_size 8192
252
range_alloc_block_size 4096
282
INNODB_USE_SYS_MALLOC ON
283
QUERY_ALLOC_BLOCK_SIZE 8192
284
QUERY_PREALLOC_SIZE 8192
285
RANGE_ALLOC_BLOCK_SIZE
286
TRANSACTION_ALLOC_BLOCK_SIZE 8192
287
TRANSACTION_PREALLOC_SIZE 4096
253
288
SELECT @@version LIKE 'non-existent';
254
289
@@version LIKE 'non-existent'
320
356
Error 1292 Truncated incorrect tmp_table_size value: '100'
321
357
set tx_isolation="READ-COMMITTED";
358
create temporary table t1 (a int not null auto_increment, primary key(a));
359
create temporary table t2 (a int not null auto_increment, primary key(a));
360
insert into t1 values(null),(null),(null);
361
insert into t2 values(null),(null),(null);
362
set global key_buffer_size=100000;
363
select @@key_buffer_size;
366
select * from t1 where a=2;
369
select * from t2 where a=3;
373
Table Op Msg_type Msg_text
374
test.t1 check status OK
375
test.t2 check status OK
376
select max(a) +1, max(a) +2 into @xx,@yy from t1;
379
ERROR HY000: Unknown system variable 'xxxxxxxxxx'
383
select @@session.key_buffer_size;
384
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable
322
385
set global myisam_max_sort_file_size=4294967296;
323
386
show global variables like 'myisam_max_sort_file_size';
324
387
Variable_name Value
325
388
myisam_max_sort_file_size MAX_FILE_SIZE
326
select * from data_dictionary.global_variables where variable_name like 'myisam_max_sort_file_size';
389
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
327
390
VARIABLE_NAME VARIABLE_VALUE
328
myisam_max_sort_file_size MAX_FILE_SIZE
391
MYISAM_MAX_SORT_FILE_SIZE MAX_FILE_SIZE
329
392
set global myisam_max_sort_file_size=default;
393
set @@global.global.key_buffer_size= 1;
394
ERROR HY000: Unknown system variable 'global'
395
set GLOBAL global.key_buffer_size= 1;
396
ERROR HY000: Unknown system variable 'global'
397
SELECT @@global.global.key_buffer_size;
398
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
399
SELECT @@global.session.key_buffer_size;
400
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
401
SELECT @@global.local.key_buffer_size;
402
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
330
403
create temporary table t1 (
534
619
set global flush_time =@my_flush_time;
535
620
ERROR HY000: Unknown system variable 'flush_time'
621
set global key_buffer_size =@my_key_buffer_size;
536
622
set global max_connect_errors =@my_max_connect_errors;
537
623
set global max_heap_table_size =@my_max_heap_table_size;
538
624
set global max_join_size =@my_max_join_size;
539
625
set global max_write_lock_count =default;
540
set global mysql_protocol_buffer_length= @my_mysql_protocol_buffer_length;
626
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
627
ERROR 42000: Incorrect argument type to variable 'myisam_data_pointer_size'
628
set global net_buffer_length =@my_net_buffer_length;
541
629
set global server_id =@my_server_id;
542
630
set global storage_engine =@my_storage_engine;
543
631
set global thread_cache_size =@my_thread_cache_size;
544
632
ERROR HY000: Unknown system variable 'thread_cache_size'
545
633
set global myisam_sort_buffer_size =@my_myisam_sort_buffer_size;
546
SHOW GLOBAL VARIABLES LIKE 'max_join_size';
548
max_join_size 2147483647
549
SHOW LOCAL VARIABLES LIKE 'max_join_size';
552
set GLOBAL bulk_insert_buffer_size=DEFAULT;
553
set GLOBAL join_buffer_size=DEFAULT;
554
set GLOBAL max_allowed_packet=DEFAULT;
555
set GLOBAL max_connect_errors=DEFAULT;
556
set GLOBAL max_heap_table_size=DEFAULT;
557
set GLOBAL max_join_size=DEFAULT;
558
set GLOBAL max_sort_length=DEFAULT;
559
set GLOBAL max_write_lock_count=DEFAULT;
560
set GLOBAL myisam_sort_buffer_size=DEFAULT;
561
set GLOBAL mysql_protocol_buffer_length=DEFAULT;
562
set GLOBAL read_buffer_size=DEFAULT;
563
set GLOBAL read_rnd_buffer_size=DEFAULT;
564
set GLOBAL server_id=DEFAULT;
565
set GLOBAL sort_buffer_size=DEFAULT;
566
set GLOBAL table_open_cache=DEFAULT;
567
set GLOBAL storage_engine= @my_storage_engine;
568
set GLOBAL tmp_table_size=DEFAULT;
569
set GLOBAL tx_isolation= @my_tx_isolation;
570
set SESSION bulk_insert_buffer_size=DEFAULT;
571
set SESSION join_buffer_size=DEFAULT;
572
set SESSION max_allowed_packet=DEFAULT;
573
set SESSION max_heap_table_size=DEFAULT;
574
set SESSION max_join_size=DEFAULT;
575
set SESSION max_sort_length=DEFAULT;
576
set SESSION read_buffer_size=DEFAULT;
577
set SESSION read_rnd_buffer_size=DEFAULT;
578
set SESSION sort_buffer_size=DEFAULT;
579
set SESSION sql_big_selects=DEFAULT;
580
set SESSION sql_buffer_result=DEFAULT;
581
set SESSION sql_select_limit=DEFAULT;
582
set SESSION sql_warnings=DEFAULT;
583
set SESSION storage_engine= @my_storage_engine;
584
set SESSION tmp_table_size=DEFAULT;
585
set SESSION tx_isolation= @my_tx_isolation;
586
634
show global variables where variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout';
587
635
Variable_name Value
588
636
table_definition_cache #