Commit 7a408dbd authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

Bug#19770858: MYSQLD CAN BE DRIVEN TO OOM WITH TWO SIMPLE SESSION VARS

The problem was that the maximum value of the transaction_prealloc_size
session system variable was ULONG_MAX which meant that it was possible
to cause the server to allocate excessive amounts of memory.

This patch fixes the problem by reducing the maxmimum value of
transaction_prealloc_size and transaction_alloc_block_size down
to 128K.

Note that transactions will still be able to allocate more than
128K if needed, this patch just reduces the amount that can be
preallocated - as well as the maximum size of the incremental
allocation blocks.
parent 70f5d81a
......@@ -41,23 +41,11 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '60020'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
59392
SET @@global.transaction_alloc_block_size = 4294967295;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
4294966272
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.transaction_alloc_block_size = 1024;
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
1024
SET @@session.transaction_alloc_block_size =4294967295;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
4294966272
SET @@session.transaction_alloc_block_size = 65535;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '65535'
......@@ -77,12 +65,12 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '-1024'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
SET @@global.transaction_alloc_block_size = 123456789201;
SET @@global.transaction_alloc_block_size = 135217728;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '123456789201'
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
4294966272
134217728
SET @@global.transaction_alloc_block_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@global.transaction_alloc_block_size = OFF;
......@@ -109,12 +97,12 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1000'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
SET @@session.transaction_alloc_block_size = 12345678901;
SET @@session.transaction_alloc_block_size = 135217728;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '12345678901'
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728'
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
4294966272
134217728
SET @@session.transaction_alloc_block_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@session.transaction_alloc_block_size = OFF;
......@@ -149,9 +137,7 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size';
1
'#---------------------FN_DYNVARS_001_08----------------------#'
SET @@transaction_alloc_block_size = 1024;
SET @@global.transaction_alloc_block_size = 4294967295;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
SET @@global.transaction_alloc_block_size = 134217728;
SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size;
@@transaction_alloc_block_size = @@global.transaction_alloc_block_size
0
......
SET @start_global_value = @@global.transaction_alloc_block_size;
SELECT @start_global_value;
@start_global_value
8192
SET @start_session_value = @@session.transaction_alloc_block_size;
SELECT @start_session_value;
@start_session_value
8192
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.transaction_alloc_block_size = 100;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '100'
SET @@global.transaction_alloc_block_size = DEFAULT;
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
8192
SET @@session.transaction_alloc_block_size = 200;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '200'
SET @@session.transaction_alloc_block_size = DEFAULT;
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
8192
'#--------------------FN_DYNVARS_005_02-------------------------#'
SET @@global.transaction_alloc_block_size = DEFAULT;
SELECT @@global.transaction_alloc_block_size = 8192;
@@global.transaction_alloc_block_size = 8192
1
SET @@session.transaction_alloc_block_size = DEFAULT;
SELECT @@session.transaction_alloc_block_size = 8192;
@@session.transaction_alloc_block_size = 8192
1
'#--------------------FN_DYNVARS_005_03-------------------------#'
SET @@global.transaction_alloc_block_size = 1024;
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
SET @@global.transaction_alloc_block_size = 60020;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '60020'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
59392
SET @@global.transaction_alloc_block_size = 4294967295;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
4294966272
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.transaction_alloc_block_size = 1024;
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
1024
SET @@session.transaction_alloc_block_size =4294967295;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
4294966272
SET @@session.transaction_alloc_block_size = 65535;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '65535'
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
64512
'#------------------FN_DYNVARS_005_05-----------------------#'
SET @@global.transaction_alloc_block_size = 0;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
SET @@global.transaction_alloc_block_size = -1024;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '-1024'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
SET @@global.transaction_alloc_block_size = 123456789201;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '123456789201'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
123456788480
SET @@global.transaction_alloc_block_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@global.transaction_alloc_block_size = OFF;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@global.transaction_alloc_block_size = True;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
SET @@global.transaction_alloc_block_size = False;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
SET @@global.transaction_alloc_block_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@global.transaction_alloc_block_size ="Test";
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@global.transaction_alloc_block_size = 1000;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1000'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
1024
SET @@session.transaction_alloc_block_size = 12345678901;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '12345678901'
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
12345678848
SET @@session.transaction_alloc_block_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@session.transaction_alloc_block_size = OFF;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@session.transaction_alloc_block_size = True;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1'
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
1024
SET @@session.transaction_alloc_block_size = False;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0'
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
1024
SET @@session.transaction_alloc_block_size = "Test";
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
SET @@session.transaction_alloc_block_size = 'test';
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
'#------------------FN_DYNVARS_005_06-----------------------#'
SELECT @@global.transaction_alloc_block_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='transaction_alloc_block_size';
@@global.transaction_alloc_block_size = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_005_07-----------------------#'
SELECT @@session.transaction_alloc_block_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='transaction_alloc_block_size';
@@session.transaction_alloc_block_size = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_001_08----------------------#'
SET @@transaction_alloc_block_size = 1024;
SET @@global.transaction_alloc_block_size = 4294967295;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295'
SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size;
@@transaction_alloc_block_size = @@global.transaction_alloc_block_size
0
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@transaction_alloc_block_size = 100;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '100'
SELECT @@transaction_alloc_block_size = @@local.transaction_alloc_block_size;
@@transaction_alloc_block_size = @@local.transaction_alloc_block_size
1
SELECT @@local.transaction_alloc_block_size = @@session.transaction_alloc_block_size;
@@local.transaction_alloc_block_size = @@session.transaction_alloc_block_size
1
'#---------------------FN_DYNVARS_001_10----------------------#'
SET transaction_alloc_block_size = 1027;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1027'
SELECT @@transaction_alloc_block_size;
@@transaction_alloc_block_size
1024
SELECT local.transaction_alloc_block_size;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.transaction_alloc_block_size;
ERROR 42S02: Unknown table 'session' in field list
SELECT transaction_alloc_block_size = @@session.transaction_alloc_block_size;
ERROR 42S22: Unknown column 'transaction_alloc_block_size' in 'field list'
SET @@global.transaction_alloc_block_size = @start_global_value;
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
8192
SET @@session.tmp_table_size = @start_session_value;
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
1024
......@@ -6,7 +6,6 @@ SET @start_session_value = @@session.transaction_prealloc_size;
SELECT @start_session_value;
@start_session_value
4096
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.transaction_prealloc_size = 100;
Warnings:
......@@ -37,23 +36,19 @@ SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
1024
SET @@global.transaction_prealloc_size = 60020;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '60020'
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
59392
SET @@global.transaction_prealloc_size = 4294966272;
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
4294966272
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.transaction_prealloc_size = 1024;
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
1024
SET @@session.transaction_prealloc_size =4294966272;
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
4294966272
SET @@session.transaction_prealloc_size = 65535;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '65535'
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
64512
......@@ -70,7 +65,6 @@ Warning 1292 Truncated incorrect transaction_prealloc_size value: '-1024'
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
1024
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.transaction_prealloc_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
SET @@global.transaction_prealloc_size = OFF;
......@@ -115,10 +109,12 @@ SELECT @@session.transaction_prealloc_size;
1024
SET @@session.transaction_prealloc_size = "Test";
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
SET @@session.transaction_prealloc_size = 123456789031;
SET @@session.transaction_prealloc_size = 135217728;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '135217728'
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
123456788480
134217728
'#------------------FN_DYNVARS_005_06-----------------------#'
SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
......@@ -151,6 +147,8 @@ SELECT @@local.transaction_prealloc_size = @@session.transaction_prealloc_size;
1
'#---------------------FN_DYNVARS_001_11----------------------#'
SET transaction_prealloc_size = 1027;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '1027'
SELECT @@transaction_prealloc_size;
@@transaction_prealloc_size
1024
......
SET @start_global_value = @@global.transaction_prealloc_size;
SELECT @start_global_value;
@start_global_value
4096
SET @start_session_value = @@session.transaction_prealloc_size;
SELECT @start_session_value;
@start_session_value
4096
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.transaction_prealloc_size = 100;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '100'
SET @@global.transaction_prealloc_size = DEFAULT;
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
4096
SET @@session.transaction_prealloc_size = 200;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '200'
SET @@session.transaction_prealloc_size = DEFAULT;
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
4096
'#--------------------FN_DYNVARS_005_02-------------------------#'
SET @@global.transaction_prealloc_size = DEFAULT;
SELECT @@global.transaction_prealloc_size = 4096;
@@global.transaction_prealloc_size = 4096
1
SET @@session.transaction_prealloc_size = DEFAULT;
SELECT @@session.transaction_prealloc_size = 4096;
@@session.transaction_prealloc_size = 4096
1
'#--------------------FN_DYNVARS_005_03-------------------------#'
SET @@global.transaction_prealloc_size = 1024;
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
1024
SET @@global.transaction_prealloc_size = 60020;
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
59392
SET @@global.transaction_prealloc_size = 4294966272;
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
4294966272
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.transaction_prealloc_size = 1024;
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
1024
SET @@session.transaction_prealloc_size =4294966272;
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
4294966272
SET @@session.transaction_prealloc_size = 65535;
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
64512
'#------------------FN_DYNVARS_005_05-----------------------#'
SET @@global.transaction_prealloc_size = 0;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '0'
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
1024
SET @@global.transaction_prealloc_size = -1024;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '-1024'
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
1024
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.transaction_prealloc_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
SET @@global.transaction_prealloc_size = OFF;
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
SET @@global.transaction_prealloc_size = True;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '1'
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
1024
SET @@global.transaction_prealloc_size = False;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '0'
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
1024
SET @@global.transaction_prealloc_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
SET @@global.transaction_prealloc_size ="Test";
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
SET @@global.transaction_prealloc_size = 1000;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '1000'
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
1024
SET @@session.transaction_prealloc_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
SET @@session.transaction_prealloc_size = OFF;
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
SET @@session.transaction_prealloc_size = True;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '1'
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
1024
SET @@session.transaction_prealloc_size = False;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '0'
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
1024
SET @@session.transaction_prealloc_size = "Test";
ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size'
SET @@session.transaction_prealloc_size = 123456789031;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '123456789031'
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
4294966272
'#------------------FN_DYNVARS_005_06-----------------------#'
SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='transaction_prealloc_size';
@@global.transaction_prealloc_size = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_005_07-----------------------#'
SELECT @@session.transaction_prealloc_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='transaction_prealloc_size';
@@session.transaction_prealloc_size = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.transaction_prealloc_size = 1024;
SET @@global.transaction_prealloc_size = 10;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '10'
SELECT @@transaction_prealloc_size = @@global.transaction_prealloc_size;
@@transaction_prealloc_size = @@global.transaction_prealloc_size
0
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@transaction_prealloc_size = 100;
Warnings:
Warning 1292 Truncated incorrect transaction_prealloc_size value: '100'
SELECT @@transaction_prealloc_size = @@local.transaction_prealloc_size;
@@transaction_prealloc_size = @@local.transaction_prealloc_size
1
SELECT @@local.transaction_prealloc_size = @@session.transaction_prealloc_size;
@@local.transaction_prealloc_size = @@session.transaction_prealloc_size
1
'#---------------------FN_DYNVARS_001_11----------------------#'
SET transaction_prealloc_size = 1027;
SELECT @@transaction_prealloc_size;
@@transaction_prealloc_size
1024
SELECT local.transaction_prealloc_size;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.transaction_prealloc_size;
ERROR 42S02: Unknown table 'session' in field list
SELECT transaction_prealloc_size = @@session.transaction_prealloc_size;
ERROR 42S22: Unknown column 'transaction_prealloc_size' in 'field list'
SET @@global.transaction_prealloc_size = @start_global_value;
SELECT @@global.transaction_prealloc_size;
@@global.transaction_prealloc_size
4096
SET @@session.transaction_prealloc_size = @start_session_value;
SELECT @@session.transaction_prealloc_size;
@@session.transaction_prealloc_size
4096
......@@ -9,8 +9,6 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
transaction_prealloc_size_basic_32 : Bug#11748572
transaction_prealloc_size_basic_64 : Bug#11748572
query_cache_size_basic_32 : Bug#13535584
query_cache_size_basic_64 : Bug#11748572
#thread_cache_size_func : Bug#11750172: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads
......
......@@ -5,7 +5,7 @@
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 8192 #
# Range: 1024-4294967295 #
# Range: 1024-134217728 #
# #
# #
# Creation Date: 2008-02-14 #
......@@ -80,9 +80,6 @@ SELECT @@global.transaction_alloc_block_size;
SET @@global.transaction_alloc_block_size = 60020;
SELECT @@global.transaction_alloc_block_size;
SET @@global.transaction_alloc_block_size = 4294967295;
SELECT @@global.transaction_alloc_block_size;
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
###################################################################
# Change the value of variable to a valid value for SESSION Scope #
......@@ -91,9 +88,6 @@ SELECT @@global.transaction_alloc_block_size;
SET @@session.transaction_alloc_block_size = 1024;
SELECT @@session.transaction_alloc_block_size;
SET @@session.transaction_alloc_block_size =4294967295;
SELECT @@session.transaction_alloc_block_size;
SET @@session.transaction_alloc_block_size = 65535;
SELECT @@session.transaction_alloc_block_size;
......@@ -110,7 +104,7 @@ SET @@global.transaction_alloc_block_size = -1024;
SELECT @@global.transaction_alloc_block_size;
SET @@global.transaction_alloc_block_size = 123456789201;
SET @@global.transaction_alloc_block_size = 135217728;
SELECT @@global.transaction_alloc_block_size;
-- Error ER_WRONG_TYPE_FOR_VAR
......@@ -136,7 +130,7 @@ SET @@global.transaction_alloc_block_size ="Test";
SET @@global.transaction_alloc_block_size = 1000;
SELECT @@global.transaction_alloc_block_size;
SET @@session.transaction_alloc_block_size = 12345678901;
SET @@session.transaction_alloc_block_size = 135217728;
SELECT @@session.transaction_alloc_block_size;
-- Error ER_WRONG_TYPE_FOR_VAR
......@@ -185,7 +179,7 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size';
###########################################################################
SET @@transaction_alloc_block_size = 1024;
SET @@global.transaction_alloc_block_size = 4294967295;
SET @@global.transaction_alloc_block_size = 134217728;
SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size;
......
################################################################################
# Created by Horst Hunger 2008-05-07 #
# #
# Wrapper for 32 bit machines #
################################################################################
--source include/have_32bit.inc
--source suite/sys_vars/inc/transaction_alloc_block_size_basic.inc
################################################################################
# Created by Horst Hunger 2008-05-07 #
# #
# Wrapper for 64 bit machines #
################################################################################
--source include/have_64bit.inc
--source suite/sys_vars/inc/transaction_alloc_block_size_basic.inc
......@@ -5,7 +5,7 @@
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 4096 #
# Range: #
# Range: 1024-134217728 #
# #
# #
# Creation Date: 2008-02-14 #
......@@ -75,10 +75,6 @@ SELECT @@global.transaction_prealloc_size;
SET @@global.transaction_prealloc_size = 60020;
SELECT @@global.transaction_prealloc_size;
SET @@global.transaction_prealloc_size = 4294966272;
SELECT @@global.transaction_prealloc_size;
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
###################################################################
# Change the value of variable to a valid value for SESSION Scope #
......@@ -87,8 +83,6 @@ SELECT @@global.transaction_prealloc_size;
SET @@session.transaction_prealloc_size = 1024;
SELECT @@session.transaction_prealloc_size;
SET @@session.transaction_prealloc_size =4294966272;
SELECT @@session.transaction_prealloc_size;
SET @@session.transaction_prealloc_size = 65535;
SELECT @@session.transaction_prealloc_size;
......@@ -144,7 +138,7 @@ SELECT @@session.transaction_prealloc_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.transaction_prealloc_size = "Test";
SET @@session.transaction_prealloc_size = 123456789031;
SET @@session.transaction_prealloc_size = 135217728;
SELECT @@session.transaction_prealloc_size;
......
################################################################################
# Created by Horst Hunger 2008-05-07 #
# #
# Wrapper for 32 bit machines #
################################################################################
--source include/have_32bit.inc
--source suite/sys_vars/inc/transaction_prealloc_size_basic.inc
################################################################################
# Created by Horst Hunger 2008-05-07 #
# #
# Wrapper for 64 bit machines #
################################################################################
--source include/have_64bit.inc
--source suite/sys_vars/inc/transaction_prealloc_size_basic.inc
/* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -1836,7 +1836,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, ULONG_MAX), DEFAULT(QUERY_ALLOC_BLOCK_SIZE),
VALID_RANGE(1024, 128 * 1024 * 1024), DEFAULT(QUERY_ALLOC_BLOCK_SIZE),
BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_trans_mem_root));
......@@ -1844,7 +1844,7 @@ static Sys_var_ulong Sys_trans_prealloc_size(
"transaction_prealloc_size",
"Persistent buffer for transactions to be stored in binary log",
SESSION_VAR(trans_prealloc_size), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(1024, ULONG_MAX), DEFAULT(TRANS_ALLOC_PREALLOC_SIZE),
VALID_RANGE(1024, 128 * 1024 * 1024), DEFAULT(TRANS_ALLOC_PREALLOC_SIZE),
BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_trans_mem_root));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment