mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.4' into 10.5
This commit is contained in:
@@ -77,6 +77,9 @@ void init_alloc_root(PSI_memory_key key, MEM_ROOT *mem_root, size_t block_size,
|
||||
mem_root->block_num= 4; /* We shift this with >>2 */
|
||||
mem_root->first_block_usage= 0;
|
||||
mem_root->m_psi_key= key;
|
||||
#ifdef PROTECT_STATEMENT_MEMROOT
|
||||
mem_root->read_only= 0;
|
||||
#endif
|
||||
|
||||
#if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG))
|
||||
if (pre_alloc_size)
|
||||
@@ -216,6 +219,10 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
|
||||
DBUG_PRINT("enter",("root: %p", mem_root));
|
||||
DBUG_ASSERT(alloc_root_inited(mem_root));
|
||||
|
||||
#ifdef PROTECT_STATEMENT_MEMROOT
|
||||
DBUG_ASSERT(mem_root->read_only == 0);
|
||||
#endif
|
||||
|
||||
DBUG_EXECUTE_IF("simulate_out_of_memory",
|
||||
{
|
||||
/* Avoid reusing an already allocated block */
|
||||
|
Reference in New Issue
Block a user