summaryrefslogtreecommitdiff
path: root/sql/item_row.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2017-11-08 15:47:49 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2017-11-09 09:31:03 +0100
commitc2c93fc6e460fd32b6ef179686c2b3b2045f75eb (patch)
treee43f37d35eb5633e81cd8e9d42d55626c13ec2ed /sql/item_row.cc
parentca695888e00a4bdace1bc2143d91a0a871f39a6b (diff)
downloadmariadb-git-c2c93fc6e460fd32b6ef179686c2b3b2045f75eb.tar.gz
MDEV-14164: Unknown column error when adding aggregate to function in oracle style procedure FOR loop
Make differentiation between pullout for merge and pulout of outer field during exists2in transformation. In last case the field was outer and so we can safely start from name resolution context of the SELECT where it was pulled. Old behavior lead to inconsistence between list of tables and outer name resolution context (which skips one SELECT for merge purposes) which creates problem vor name resolution.
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r--sql/item_row.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc
index b38cffd1ad5..c07ea612850 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -184,14 +184,15 @@ void Item_row::update_used_tables()
}
-void Item_row::fix_after_pullout(st_select_lex *new_parent, Item **ref)
+void Item_row::fix_after_pullout(st_select_lex *new_parent, Item **ref,
+ bool merge)
{
used_tables_cache= 0;
const_item_cache= 1;
not_null_tables_cache= 0;
for (uint i= 0; i < arg_count; i++)
{
- items[i]->fix_after_pullout(new_parent, &items[i]);
+ items[i]->fix_after_pullout(new_parent, &items[i], merge);
used_tables_cache|= items[i]->used_tables();
const_item_cache&= items[i]->const_item();
not_null_tables_cache|= items[i]->not_null_tables();