mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
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.
This commit is contained in:
parent
ff9ef52294
commit
2a2a53bdc8
2 changed files with 4 additions and 2 deletions
|
@ -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: */
|
||||
|
|
Loading…
Reference in a new issue