summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 592861e176b..437b11be5bb 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -317,8 +317,8 @@ int handler::ha_open(const char *name, int mode, int test_if_locked)
}
if (!error)
{
-
- if (!(ref=(byte*) my_malloc(ALIGN_SIZE(ref_length)*2,MYF(0))))
+ if (!(ref=(byte*) alloc_root(&table->mem_root,
+ ALIGN_SIZE(ref_length)*2)))
{
close();
error=HA_ERR_OUT_OF_MEM;