diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-11-19 16:50:09 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-11-26 11:34:17 +0400 |
commit | 54689e1d5c358851c93d928c8ec453c929921f42 (patch) | |
tree | a52d829b99f79ffc1338947b95238eb12ab2dbd9 /sql/sql_list.h | |
parent | 753d1f868c0fd52c2ec44a97fe116c01a38d5ffd (diff) | |
download | mariadb-git-54689e1d5c358851c93d928c8ec453c929921f42.tar.gz |
MDEV-8715 - Obsolete sql_alloc() in favor of THD::alloc() and thd_alloc()
The following left in semi-improved state to keep patch size reasonable:
- Field operator new: left thd_alloc(current_thd)
- Sql_alloc operator new: left thd_alloc(thd_get_current_thd())
- Item_args constructors: left thd_alloc(thd)
- Item_func_interval::fix_length_and_dec(): no THD arg, have to call current_thd
- Item_func_dyncol_exists::val_int(): same
- Item_dyncol_get::val_str(): same
- Item_dyncol_get::val_int(): same
- Item_dyncol_get::val_real(): same
- Item_dyncol_get::val_decimal(): same
- Item_singlerow_subselect::fix_length_and_dec(): same
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r-- | sql/sql_list.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h index 6f01b64df70..718306c2193 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -22,7 +22,8 @@ #include "my_sys.h" /* alloc_root, TRASH, MY_WME, MY_FAE, MY_ALLOW_ZERO_PTR */ #include "m_string.h" /* bfill */ -#include "thr_malloc.h" /* sql_alloc */ + +THD *thd_get_current_thd(); /* mysql standard class memory allocator */ @@ -31,11 +32,11 @@ class Sql_alloc public: static void *operator new(size_t size) throw () { - return sql_alloc(size); + return thd_alloc(thd_get_current_thd(), size); } static void *operator new[](size_t size) throw () { - return sql_alloc(size); + return thd_alloc(thd_get_current_thd(), size); } static void *operator new[](size_t size, MEM_ROOT *mem_root) throw () { return alloc_root(mem_root, size); } |