summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-09-23 12:58:11 +0200
committerSergei Golubchik <serg@mariadb.org>2018-09-23 12:58:11 +0200
commit1fc5a6f30c3a9c047dcf9a36b00026d98f286f6b (patch)
tree0aa792118101ee3130b25b47316159aaccec52e2 /mysys
parent87dc4e98dda26ff99a3b3aeae2fce9fd2f2fdf24 (diff)
parent1144acbcbdf9b7bdf18c31f88cbe859d99658b53 (diff)
downloadmariadb-git-1fc5a6f30c3a9c047dcf9a36b00026d98f286f6b.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_alloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c
index 1b0ef857afa..276ad080520 100644
--- a/mysys/my_alloc.c
+++ b/mysys/my_alloc.c
@@ -204,6 +204,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
uchar* point;
reg1 USED_MEM *next= 0;
reg2 USED_MEM **prev;
+ size_t original_length = length;
DBUG_ENTER("alloc_root");
DBUG_PRINT("enter",("root: %p", mem_root));
DBUG_ASSERT(alloc_root_inited(mem_root));
@@ -264,7 +265,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
mem_root->used= next;
mem_root->first_block_usage= 0;
}
- TRASH_ALLOC(point, length);
+ TRASH_ALLOC(point, original_length);
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN((void*) point);
#endif