Commit 2a2a53bd authored by marko's avatar marko

branches/zip: Fix some things to allow InnoDB to be built with smaller

UNIV_PAGE_SIZE than the default 16384.

MEM_BLOCK_STANDARD_SIZE: Cap to MEM_MAX_ALLOC_IN_BUF when UNIV_PAGE_SIZE
is less than 16384.

ha_create_func(): Invoke mem_heap_create_in_btr_search() with
ut_min(4096, MEM_MAX_ALLOC_IN_BUF) instead of 4096.  The memory
will be allocated from the buffer pool, and with UNIV_PAGE_SIZE
defined to 4096, there would not be any space for the mem_heap
data structure overhead.
parent ff9ef522
......@@ -47,7 +47,8 @@ ha_create_func(
but in practise it never should in this case, hence the asserts. */
if (n_mutexes == 0) {
table->heap = mem_heap_create_in_btr_search(4096);
table->heap = mem_heap_create_in_btr_search(
ut_min(4096, MEM_MAX_ALLOC_IN_BUF));
ut_a(table->heap);
return(table);
......
......@@ -50,7 +50,8 @@ create. The standard size is the maximum (payload) size of the blocks used for
allocations of small buffers. */
#define MEM_BLOCK_START_SIZE 64
#define MEM_BLOCK_STANDARD_SIZE 8000
#define MEM_BLOCK_STANDARD_SIZE \
(UNIV_PAGE_SIZE >= 16384 ? 8000 : MEM_MAX_ALLOC_IN_BUF)
/* If a memory heap is allowed to grow into the buffer pool, the following
is the maximum size for a single allocated buffer: */
......
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