diff options
author | Monty <monty@mariadb.org> | 2015-08-24 14:42:07 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2015-08-27 22:21:08 +0300 |
commit | 3cb578c001b2feabd2410f281d20eb6566371453 (patch) | |
tree | 4e3781e38f6531ea91ff127c024869c6b88c5849 /sql/opt_table_elimination.cc | |
parent | ba340d8c47657774ba6d69bfc918dbebaaef6086 (diff) | |
download | mariadb-git-3cb578c001b2feabd2410f281d20eb6566371453.tar.gz |
MDEV-6152: Remove calls to current_thd while creating Item
- Part 3: Adding mem_root to push_back() and push_front()
Other things:
- Added THD as an argument to some partition functions.
- Added memory overflow checking for XML tag's in read_xml()
Diffstat (limited to 'sql/opt_table_elimination.cc')
-rw-r--r-- | sql/opt_table_elimination.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc index 75aced382f2..912ef4a7df7 100644 --- a/sql/opt_table_elimination.cc +++ b/sql/opt_table_elimination.cc @@ -1018,6 +1018,7 @@ public: bool Dep_analysis_context::setup_equality_modules_deps(List<Dep_module> *bound_modules) { + THD *thd= current_thd; DBUG_ENTER("setup_equality_modules_deps"); /* @@ -1042,7 +1043,7 @@ bool Dep_analysis_context::setup_equality_modules_deps(List<Dep_module> } void *buf; - if (!(buf= current_thd->alloc(bitmap_buffer_size(offset))) || + if (!(buf= thd->alloc(bitmap_buffer_size(offset))) || my_bitmap_init(&expr_deps, (my_bitmap_map*)buf, offset, FALSE)) { DBUG_RETURN(TRUE); /* purecov: inspected */ @@ -1084,7 +1085,7 @@ bool Dep_analysis_context::setup_equality_modules_deps(List<Dep_module> } if (!eq_mod->unbound_args) - bound_modules->push_back(eq_mod); + bound_modules->push_back(eq_mod, thd->mem_root); } DBUG_RETURN(FALSE); @@ -1255,7 +1256,7 @@ void build_eq_mods_for_cond(THD *thd, Dep_analysis_context *ctx, { Dep_value_field *field_val; if ((field_val= ctx->get_field_value(equal_field))) - fvl->push_back(field_val); + fvl->push_back(field_val, thd->mem_root); } else { |