mariadb/storage/heap
Arun Kuruvila 774095a59b 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.
2014-06-25 11:42:41 +05:30
..
_check.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
_rectest.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
ChangeLog Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
CMakeLists.txt Updated/added copyright headers 2011-06-30 17:37:13 +02:00
ha_heap.cc Bug#11759349 -- Merge of patch from mysql-5.1. 2011-09-27 17:44:31 +05:30
ha_heap.h Updated/added copyright headers 2011-07-04 01:25:49 +02:00
heapdef.h Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_block.c Bug #18463911 : SERVER CRASHES ON CREATING A TEMP TABLE 2014-06-25 11:42:41 +05:30
hp_clear.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_close.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_create.c Bug #18463911 : SERVER CRASHES ON CREATING A TEMP TABLE 2014-06-25 11:42:41 +05:30
hp_delete.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_extra.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_hash.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_info.c Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
hp_open.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_panic.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_rename.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_rfirst.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_rkey.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_rlast.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_rnext.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_rprev.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_rrnd.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_rsame.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_scan.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_static.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_test1.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_test2.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
hp_update.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
hp_write.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00