diff options
author | unknown <evgen@moonbone.local> | 2005-10-12 03:32:14 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-10-12 03:32:14 +0400 |
commit | b455f7c575383787b27db9c8ae52fb9799a0a5e7 (patch) | |
tree | a09394ef99d7c7d90d08beb454232ef5e10cce48 /sql/item.cc | |
parent | ab7ec7ee8f4ac8c751c6f0d84d8314154146bf10 (diff) | |
parent | f3f84ed8a08a7c19442cdbacc9c23fbc5d38323b (diff) | |
download | mariadb-git-b455f7c575383787b27db9c8ae52fb9799a0a5e7.tar.gz |
Manual merge, fix for bug #7672
mysql-test/r/select.result:
Manual merge
mysql-test/t/select.test:
Manual merge
sql/item.cc:
Manual merge
sql/sql_lex.cc:
Manual merge
sql/sql_lex.h:
Manual merge
sql/sql_select.cc:
Manual merge
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc index 010189c321c..3c3a6d273fe 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1760,6 +1760,16 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) if ((tmp= find_field_in_tables(thd, this, tables, &where, 0)) == not_found_field) { + if (thd->lex.select_lex.is_item_list_lookup) + { + Item** res= find_item_in_list(this, thd->lex.select_lex.item_list); + if (res && *res && (*res)->type() == Item::FIELD_ITEM) + { + set_field((*((Item_field**)res))->field); + return 0; + } + } + /* We can't find table field in table list of current select, consequently we have to find it in outer subselect(s). |