branches/zip: Allocate the merge sort buffers from a heap, not stack.
The merge sort can use up to 48KiB of buffers when merging blocks. That can cause a stack overflow, especially on 64-bit systems when not building with inlined functions. This was reported as Issue #462. row_merge_dup_report(): Allocate buf and offsets from a heap. row_merge_heap_create(): Allocate space for buf[3] too. Fix bogus sizeof arithmetics that happened to work, because sizeof(ulint)==sizeof(void*). row_merge_blocks(), row_merge_blocks_copy(): Allocate buf[3] from heap. row_merge_insert_index_tuples(): Allocate buf from graph_heap. rb://258 approved and tested by Sunny Bains
Showing
Please register or sign in to comment