summaryrefslogtreecommitdiff
path: root/sql/thr_malloc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/thr_malloc.cc')
-rw-r--r--sql/thr_malloc.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/thr_malloc.cc b/sql/thr_malloc.cc
index 4ad99bba7b5..d43e7c4c9b5 100644
--- a/sql/thr_malloc.cc
+++ b/sql/thr_malloc.cc
@@ -17,7 +17,7 @@
/* Mallocs for used in threads */
-#include <my_global.h>
+#include "mariadb.h"
#include "sql_priv.h"
#include "unireg.h"
#include "thr_malloc.h"
@@ -27,7 +27,7 @@ extern "C" {
void sql_alloc_error_handler(void)
{
THD *thd= current_thd;
- if (thd)
+ if (likely(thd))
{
if (! thd->is_error())
{
@@ -58,10 +58,11 @@ extern "C" {
}
}
-void init_sql_alloc(MEM_ROOT *mem_root, uint block_size, uint pre_alloc,
- myf my_flags)
+void init_sql_alloc(MEM_ROOT *mem_root,
+ const char *area_name __attribute__((unused)),
+ uint block_size, uint pre_alloc, myf my_flags)
{
- init_alloc_root(mem_root, block_size, pre_alloc, my_flags);
+ init_alloc_root(mem_root, area_name, block_size, pre_alloc, my_flags);
mem_root->error_handler=sql_alloc_error_handler;
}