mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
774095a59b
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. |
||
---|---|---|
.. | ||
_check.c | ||
_rectest.c | ||
ChangeLog | ||
CMakeLists.txt | ||
ha_heap.cc | ||
ha_heap.h | ||
heapdef.h | ||
hp_block.c | ||
hp_clear.c | ||
hp_close.c | ||
hp_create.c | ||
hp_delete.c | ||
hp_extra.c | ||
hp_hash.c | ||
hp_info.c | ||
hp_open.c | ||
hp_panic.c | ||
hp_rename.c | ||
hp_rfirst.c | ||
hp_rkey.c | ||
hp_rlast.c | ||
hp_rnext.c | ||
hp_rprev.c | ||
hp_rrnd.c | ||
hp_rsame.c | ||
hp_scan.c | ||
hp_static.c | ||
hp_test1.c | ||
hp_test2.c | ||
hp_update.c | ||
hp_write.c |