diff options
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r-- | sql/sql_list.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h index ff21663576a..2450b2051f2 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -33,6 +33,8 @@ public: { return (void*) sql_alloc((uint) size); } + static void *operator new(size_t size, MEM_ROOT *mem_root) + { return (void*) alloc_root(mem_root, (uint) size); } static void operator delete(void *ptr, size_t size) {} /*lint -e715 */ static void operator delete[](void *ptr, size_t size) {} #ifdef HAVE_purify @@ -190,6 +192,7 @@ public: inline void *replace(void *element) { // Return old element void *tmp=current->info; + DBUG_ASSERT(current->info != 0); current->info=element; return tmp; } |