- Changed default values of query_prealloc_size and query_alloc_block_size
so that a simple query with one join would not have to call my_malloc. - Allow lower limites for query_prealloc_size for testing. - Fixed wrong initialization of trans_alloc_block_size
This commit is contained in:
parent
9127784d5c
commit
070a6e7a89
@ -1298,14 +1298,14 @@ preload-buffer-size 32768
|
||||
profiling-history-size 15
|
||||
progress-report-time 5
|
||||
protocol-version 10
|
||||
query-alloc-block-size 8192
|
||||
query-alloc-block-size 16384
|
||||
query-cache-limit 1048576
|
||||
query-cache-min-res-unit 4096
|
||||
query-cache-size 0
|
||||
query-cache-strip-comments FALSE
|
||||
query-cache-type ON
|
||||
query-cache-wlock-invalidate FALSE
|
||||
query-prealloc-size 8192
|
||||
query-prealloc-size 24576
|
||||
range-alloc-block-size 4096
|
||||
read-buffer-size 131072
|
||||
read-only FALSE
|
||||
|
@ -317,8 +317,8 @@ SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
|
||||
'query_alloc_block_size', 'query_prealloc_size',
|
||||
'transaction_alloc_block_size', 'transaction_prealloc_size');
|
||||
Variable_name Value
|
||||
query_alloc_block_size 8192
|
||||
query_prealloc_size 8192
|
||||
query_alloc_block_size 16384
|
||||
query_prealloc_size 24576
|
||||
range_alloc_block_size 4096
|
||||
transaction_alloc_block_size 8192
|
||||
transaction_prealloc_size 4096
|
||||
@ -328,8 +328,8 @@ WHERE variable_name IN ('range_alloc_block_size',
|
||||
'query_alloc_block_size', 'query_prealloc_size',
|
||||
'transaction_alloc_block_size', 'transaction_prealloc_size') ORDER BY 1;
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
QUERY_ALLOC_BLOCK_SIZE 8192
|
||||
QUERY_PREALLOC_SIZE 8192
|
||||
QUERY_ALLOC_BLOCK_SIZE 16384
|
||||
QUERY_PREALLOC_SIZE 24576
|
||||
RANGE_ALLOC_BLOCK_SIZE 4096
|
||||
TRANSACTION_ALLOC_BLOCK_SIZE 8192
|
||||
TRANSACTION_PREALLOC_SIZE 4096
|
||||
@ -410,8 +410,8 @@ SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
|
||||
'query_alloc_block_size', 'query_prealloc_size',
|
||||
'transaction_alloc_block_size', 'transaction_prealloc_size');
|
||||
Variable_name Value
|
||||
query_alloc_block_size 8192
|
||||
query_prealloc_size 8192
|
||||
query_alloc_block_size 16384
|
||||
query_prealloc_size 24576
|
||||
range_alloc_block_size 4096
|
||||
transaction_alloc_block_size 8192
|
||||
transaction_prealloc_size 4096
|
||||
|
@ -1,11 +1,11 @@
|
||||
SET @start_global_value = @@global.query_alloc_block_size;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
8192
|
||||
16384
|
||||
SET @start_session_value = @@session.query_alloc_block_size;
|
||||
SELECT @start_session_value;
|
||||
@start_session_value
|
||||
8192
|
||||
16384
|
||||
'#--------------------FN_DYNVARS_130_01-------------------------#'
|
||||
SET @@global.query_alloc_block_size = 10000;
|
||||
Warnings:
|
||||
@ -13,22 +13,22 @@ Warning 1292 Truncated incorrect query_alloc_block_size value: '10000'
|
||||
SET @@global.query_alloc_block_size = DEFAULT;
|
||||
SELECT @@global.query_alloc_block_size;
|
||||
@@global.query_alloc_block_size
|
||||
8192
|
||||
16384
|
||||
SET @@session.query_alloc_block_size = 20000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect query_alloc_block_size value: '20000'
|
||||
SET @@session.query_alloc_block_size = DEFAULT;
|
||||
SELECT @@session.query_alloc_block_size;
|
||||
@@session.query_alloc_block_size
|
||||
8192
|
||||
16384
|
||||
'#--------------------FN_DYNVARS_130_02-------------------------#'
|
||||
SET @@global.query_alloc_block_size = DEFAULT;
|
||||
SELECT @@global.query_alloc_block_size = 8192;
|
||||
@@global.query_alloc_block_size = 8192
|
||||
SELECT @@global.query_alloc_block_size = 16384;
|
||||
@@global.query_alloc_block_size = 16384
|
||||
1
|
||||
SET @@session.query_alloc_block_size = DEFAULT;
|
||||
SELECT @@session.query_alloc_block_size = 8192;
|
||||
@@session.query_alloc_block_size = 8192
|
||||
SELECT @@session.query_alloc_block_size = 16384;
|
||||
@@session.query_alloc_block_size = 16384
|
||||
1
|
||||
'#--------------------FN_DYNVARS_130_03-------------------------#'
|
||||
SET @@global.query_alloc_block_size = 1024;
|
||||
@ -177,8 +177,8 @@ ERROR 42S22: Unknown column 'query_alloc_block_size' in 'field list'
|
||||
SET @@global.query_alloc_block_size = @start_global_value;
|
||||
SELECT @@global.query_alloc_block_size;
|
||||
@@global.query_alloc_block_size
|
||||
8192
|
||||
16384
|
||||
SET @@session.query_alloc_block_size = @start_session_value;
|
||||
SELECT @@session.query_alloc_block_size;
|
||||
@@session.query_alloc_block_size
|
||||
8192
|
||||
16384
|
||||
|
@ -1,11 +1,11 @@
|
||||
SET @start_global_value = @@global.query_prealloc_size ;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
8192
|
||||
24576
|
||||
SET @start_session_value = @@session.query_prealloc_size ;
|
||||
SELECT @start_session_value;
|
||||
@start_session_value
|
||||
8192
|
||||
24576
|
||||
'#--------------------FN_DYNVARS_005_01-------------------------#'
|
||||
SET @@global.query_prealloc_size = 100;
|
||||
Warnings:
|
||||
@ -13,22 +13,22 @@ Warning 1292 Truncated incorrect query_prealloc_size value: '100'
|
||||
SET @@global.query_prealloc_size = DEFAULT;
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
24576
|
||||
SET @@session.query_prealloc_size = 200;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect query_prealloc_size value: '200'
|
||||
SET @@session.query_prealloc_size = DEFAULT;
|
||||
SELECT @@session.query_prealloc_size ;
|
||||
@@session.query_prealloc_size
|
||||
8192
|
||||
24576
|
||||
'#--------------------FN_DYNVARS_005_02-------------------------#'
|
||||
SET @@global.query_prealloc_size = DEFAULT;
|
||||
SELECT @@global.query_prealloc_size = 8192;
|
||||
@@global.query_prealloc_size = 8192
|
||||
SELECT @@global.query_prealloc_size = 24576;
|
||||
@@global.query_prealloc_size = 24576
|
||||
1
|
||||
SET @@session.query_prealloc_size = DEFAULT;
|
||||
SELECT @@session.query_prealloc_size = 8192;
|
||||
@@session.query_prealloc_size = 8192
|
||||
SELECT @@session.query_prealloc_size = 24576;
|
||||
@@session.query_prealloc_size = 24576
|
||||
1
|
||||
'#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
SET @@global.query_prealloc_size = 8192;
|
||||
@ -58,53 +58,53 @@ Warnings:
|
||||
Warning 1292 Truncated incorrect query_prealloc_size value: '0'
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@global.query_prealloc_size = 65530.34;
|
||||
ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@global.query_prealloc_size = test;
|
||||
ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@global.query_prealloc_size = "test";
|
||||
ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@global.query_prealloc_size = 'test';
|
||||
ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@global.query_prealloc_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@session.query_prealloc_size = 0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect query_prealloc_size value: '0'
|
||||
SELECT @@session.query_prealloc_size ;
|
||||
@@session.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@session.query_prealloc_size = 65530.34;
|
||||
ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
|
||||
SELECT @@session.query_prealloc_size ;
|
||||
@@session.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@session.query_prealloc_size = test;
|
||||
ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
|
||||
SELECT @@session.query_prealloc_size ;
|
||||
@@session.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@session.query_prealloc_size = "test";
|
||||
ERROR 42000: Incorrect argument type to variable 'query_prealloc_size'
|
||||
SELECT @@session.query_prealloc_size ;
|
||||
@@session.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
'#------------------FN_DYNVARS_005_06-----------------------#'
|
||||
SELECT @@global.query_prealloc_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -123,13 +123,13 @@ Warnings:
|
||||
Warning 1292 Truncated incorrect query_prealloc_size value: '1'
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SET @@global.query_prealloc_size = FALSE;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect query_prealloc_size value: '0'
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
'#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
SET @@global.query_prealloc_size = 10;
|
||||
Warnings:
|
||||
@ -153,7 +153,7 @@ Warnings:
|
||||
Warning 1292 Truncated incorrect query_prealloc_size value: '1'
|
||||
SELECT @@query_prealloc_size ;
|
||||
@@query_prealloc_size
|
||||
8192
|
||||
1024
|
||||
SELECT local.query_prealloc_size ;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
SELECT session.query_prealloc_size ;
|
||||
@ -163,8 +163,8 @@ ERROR 42S22: Unknown column 'query_prealloc_size' in 'field list'
|
||||
SET @@global.query_prealloc_size = @start_global_value;
|
||||
SELECT @@global.query_prealloc_size ;
|
||||
@@global.query_prealloc_size
|
||||
8192
|
||||
24576
|
||||
SET @@session.query_prealloc_size = @start_session_value;
|
||||
SELECT @@session.query_prealloc_size ;
|
||||
@@session.query_prealloc_size
|
||||
8192
|
||||
24576
|
||||
|
@ -60,10 +60,10 @@ SELECT @@session.query_alloc_block_size;
|
||||
###################################################################
|
||||
|
||||
SET @@global.query_alloc_block_size = DEFAULT;
|
||||
SELECT @@global.query_alloc_block_size = 8192;
|
||||
SELECT @@global.query_alloc_block_size = 16384;
|
||||
|
||||
SET @@session.query_alloc_block_size = DEFAULT;
|
||||
SELECT @@session.query_alloc_block_size = 8192;
|
||||
SELECT @@session.query_alloc_block_size = 16384;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_130_03-------------------------#'
|
||||
|
@ -60,10 +60,10 @@ SELECT @@session.query_prealloc_size ;
|
||||
########################################################################
|
||||
|
||||
SET @@global.query_prealloc_size = DEFAULT;
|
||||
SELECT @@global.query_prealloc_size = 8192;
|
||||
SELECT @@global.query_prealloc_size = 24576;
|
||||
|
||||
SET @@session.query_prealloc_size = DEFAULT;
|
||||
SELECT @@session.query_prealloc_size = 8192;
|
||||
SELECT @@session.query_prealloc_size = 24576;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
|
@ -148,9 +148,9 @@
|
||||
#define MYSQLD_NET_RETRY_COUNT 10 ///< Abort read after this many int.
|
||||
#endif
|
||||
|
||||
#define QUERY_ALLOC_BLOCK_SIZE 8192
|
||||
#define QUERY_ALLOC_PREALLOC_SIZE 8192
|
||||
#define TRANS_ALLOC_BLOCK_SIZE 4096
|
||||
#define QUERY_ALLOC_BLOCK_SIZE 16384
|
||||
#define QUERY_ALLOC_PREALLOC_SIZE 24576
|
||||
#define TRANS_ALLOC_BLOCK_SIZE 8192
|
||||
#define TRANS_ALLOC_PREALLOC_SIZE 4096
|
||||
#define RANGE_ALLOC_BLOCK_SIZE 4096
|
||||
#define ACL_ALLOC_BLOCK_SIZE 1024
|
||||
|
@ -2442,7 +2442,7 @@ static Sys_var_ulong Sys_query_prealloc_size(
|
||||
"query_prealloc_size",
|
||||
"Persistent buffer for query parsing and execution",
|
||||
SESSION_VAR(query_prealloc_size), CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(QUERY_ALLOC_PREALLOC_SIZE, UINT_MAX),
|
||||
VALID_RANGE(1024, UINT_MAX),
|
||||
DEFAULT(QUERY_ALLOC_PREALLOC_SIZE),
|
||||
BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
|
||||
ON_UPDATE(fix_thd_mem_root));
|
||||
@ -2533,7 +2533,7 @@ static Sys_var_ulong Sys_trans_alloc_block_size(
|
||||
"transaction_alloc_block_size",
|
||||
"Allocation block size for transactions to be stored in binary log",
|
||||
SESSION_VAR(trans_alloc_block_size), CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(1024, UINT_MAX), DEFAULT(QUERY_ALLOC_BLOCK_SIZE),
|
||||
VALID_RANGE(1024, UINT_MAX), DEFAULT(TRANS_ALLOC_BLOCK_SIZE),
|
||||
BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
|
||||
ON_UPDATE(fix_trans_mem_root));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user