Commit c7581bb5 authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

Bug#20730053: BACKPORT BUG#19770858 TO 5.1

Backport from mysql-5.5 to mysql-5.1 of:

Bug19770858: 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.

(cherry picked from commit 540c9f7ebb428bbf9ec028feabe1f7f919fdefd9)

Conflicts:
	mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result
	mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result
	mysql-test/suite/sys_vars/t/disabled.def
	mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test
	sql/sys_vars.cc
parent a2b61067
......@@ -39,20 +39,12 @@ SET @@global.transaction_alloc_block_size = 60020;
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
59392
SET @@global.transaction_alloc_block_size = 4294967295;
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
4294966272
'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------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;
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
4294966272
SET @@session.transaction_alloc_block_size = 65535;
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
......@@ -71,10 +63,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: '135217728'
SELECT @@global.transaction_alloc_block_size;
@@global.transaction_alloc_block_size
123456788480
131072
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.transaction_alloc_block_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
......@@ -102,10 +96,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: '135217728'
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
12345678848
131072
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.transaction_alloc_block_size = ON;
ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size'
......@@ -141,7 +137,9 @@ 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;
SET @@global.transaction_alloc_block_size = 134217728;
Warnings:
Warning 1292 Truncated incorrect transaction_alloc_block_size value: '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;
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
'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#--------------------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;
SELECT @@session.transaction_alloc_block_size;
@@session.transaction_alloc_block_size
64512
'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
'#------------------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
4294966272
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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
4294966272
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
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;
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
......@@ -40,19 +40,11 @@ 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
......@@ -115,10 +107,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
131072
'#------------------FN_DYNVARS_005_06-----------------------#'
SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
......
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
......@@ -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,8 +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 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
......@@ -92,9 +90,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;
--echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
......@@ -112,7 +107,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;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
......@@ -140,7 +135,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;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
......@@ -191,7 +186,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 #
......@@ -77,10 +77,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 #
......@@ -89,8 +85,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;
......@@ -148,7 +142,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;
......@@ -226,4 +220,3 @@ SELECT @@session.transaction_prealloc_size;
#############################################################
# END OF transaction_prealloc_size TESTS #
#############################################################
################################################################################
# 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
......@@ -8,10 +8,9 @@
# Bug#27322 failure to allocate transaction_prealloc_size causes crash
#
#
# Manual (6.0):
# Manual (5.1):
# Platform Bit Size Range Default
# 32 1024-4294967295 (4 Gi - 1) 4096
# 64 1024-18446744073709547520 4096
# 32/64 1024-128k 4096
#
# Observation(mleich):
# 1. - Linux 64 Bit, MySQL 64 Bit, 4 GiB RAM, 8 GiB swap
......
......@@ -7115,12 +7115,12 @@ thread is in the relay logs.",
"Allocation block size for transactions to be stored in binary log.",
&global_system_variables.trans_alloc_block_size,
&max_system_variables.trans_alloc_block_size, 0, GET_ULONG,
REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, 128 * 1024, 0, 1024, 0},
{"transaction_prealloc_size", OPT_TRANS_PREALLOC_SIZE,
"Persistent buffer for transactions to be stored in binary log.",
&global_system_variables.trans_prealloc_size,
&max_system_variables.trans_prealloc_size, 0, GET_ULONG,
REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, 128 * 1024, 0, 1024, 0},
{"thread_handling", OPT_THREAD_HANDLING,
"Define threads usage for handling queries: "
"one-thread-per-connection or no-threads.", 0, 0,
......
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