diff options
author | Arun Kuruvila <arun.kuruvila@oracle.com> | 2014-06-25 11:42:41 +0530 |
---|---|---|
committer | Arun Kuruvila <arun.kuruvila@oracle.com> | 2014-06-25 11:42:41 +0530 |
commit | 1177d3402dde1af7d18eb67595b283f27d078ed0 (patch) | |
tree | 879ebfbb540d932a713d11750ee68aae524e0e32 /sql-bench | |
parent | 119984db0c1e406c48fda48680c2d97c0d4cd177 (diff) | |
download | mariadb-git-1177d3402dde1af7d18eb67595b283f27d078ed0.tar.gz |
Bug #18463911 : SERVER CRASHES ON CREATING A TEMP TABLE
WITH CERTAIN MAX_HEAP_TABLE_SIZE VALUES
Description:
When the system variable 'max_heap_table_size'
is set to 20GB, the server crashes on creation of a
temporary tables or tables using MEMORY storage engine.
Analysis:
The variable 'max_record' determines the amount heap
allocated for the records of the table. This value
is determined using the 'max_heap_table_size' variable.
'records_in_block' in turn uses the max_records to
determine the number of records per block.
When the 'max_heap_table_size' is set to 20GB, then
the 'records_in_block' is calculated to a value of
2^28.
The size of the block determined by multiplying the
'records_in_block' and 'recbuffer' results in overflow
and hence the value becomes zero. As a result, zero bytes
of the heap is allocated for the table. This will
result in a server crash when the table is accessed.
Fix:
The variables 'records_in_block' and 'recbuffer' are
typecasted to 'unsigned long' while calculating the
size of the block.
Diffstat (limited to 'sql-bench')
0 files changed, 0 insertions, 0 deletions