summaryrefslogtreecommitdiff
path: root/sql/opt_index_cond_pushdown.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-08-24 14:42:07 +0300
committerMonty <monty@mariadb.org>2015-08-27 22:21:08 +0300
commit3cb578c001b2feabd2410f281d20eb6566371453 (patch)
tree4e3781e38f6531ea91ff127c024869c6b88c5849 /sql/opt_index_cond_pushdown.cc
parentba340d8c47657774ba6d69bfc918dbebaaef6086 (diff)
downloadmariadb-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_index_cond_pushdown.cc')
-rw-r--r--sql/opt_index_cond_pushdown.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/opt_index_cond_pushdown.cc b/sql/opt_index_cond_pushdown.cc
index 848549c3b2d..a6707d458df 100644
--- a/sql/opt_index_cond_pushdown.cc
+++ b/sql/opt_index_cond_pushdown.cc
@@ -202,7 +202,7 @@ static Item *make_cond_for_index(THD *thd, Item *cond, TABLE *table, uint keyno,
Item *fix= make_cond_for_index(thd, item, table, keyno, other_tbls_ok);
if (fix)
{
- new_cond->argument_list()->push_back(fix);
+ new_cond->argument_list()->push_back(fix, thd->mem_root);
used_tables|= fix->used_tables();
}
if (MY_TEST(item->marker == ICP_COND_USES_INDEX_ONLY))
@@ -237,7 +237,7 @@ static Item *make_cond_for_index(THD *thd, Item *cond, TABLE *table, uint keyno,
Item *fix= make_cond_for_index(thd, item, table, keyno, other_tbls_ok);
if (!fix)
return (COND*) 0;
- new_cond->argument_list()->push_back(fix);
+ new_cond->argument_list()->push_back(fix, thd->mem_root);
if (MY_TEST(item->marker == ICP_COND_USES_INDEX_ONLY))
{
n_marked++;
@@ -280,7 +280,7 @@ static Item *make_cond_remainder(THD *thd, Item *cond, TABLE *table, uint keyno,
other_tbls_ok, exclude_index);
if (fix)
{
- new_cond->argument_list()->push_back(fix);
+ new_cond->argument_list()->push_back(fix, thd->mem_root);
tbl_map |= fix->used_tables();
}
}
@@ -308,7 +308,7 @@ static Item *make_cond_remainder(THD *thd, Item *cond, TABLE *table, uint keyno,
other_tbls_ok, FALSE);
if (!fix)
return (COND*) 0;
- new_cond->argument_list()->push_back(fix);
+ new_cond->argument_list()->push_back(fix, thd->mem_root);
tbl_map |= fix->used_tables();
}
new_cond->quick_fix_field();