summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-09-06 13:00:24 +0300
committerunknown <bell@sanja.is.com.ua>2004-09-06 13:00:24 +0300
commit77ee831d3d9230912136d7b91f027f48df84431a (patch)
treeb1c0219bf6f5857be815d6ae8e7d32b071352708 /sql/item.cc
parent1230daf8f281bbb1ca07364b9a8c18ea4aa02a4d (diff)
downloadmariadb-git-77ee831d3d9230912136d7b91f027f48df84431a.tar.gz
fixed temporary table processing expresions of subqueries and removed wrong restrictions of field resolving (BUG#5326)
mysql-test/r/subselect.result: tests of fields resolving mysql-test/t/subselect.test: tests of fields resolving sql/item.cc: fixed fild resolving sql/item_subselect.cc: removed aneed call sql/sql_base.cc: fixed case whan we scan un-fixfielded fields sql/sql_select.cc: fixed temporary table processing expresions of subqueries
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/item.cc b/sql/item.cc
index e9ef3b6a763..d6ed65589f7 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1271,11 +1271,10 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
prev_subselect_item->parsing_place;
/*
check table fields only if subquery used somewhere out of HAVING
- or SELECT list or outer SELECT do not use groupping (i.e. tables
- are accessable)
+ or outer SELECT do not use groupping (i.e. tables are
+ accessable)
*/
- if (((place != IN_HAVING &&
- place != SELECT_LIST) ||
+ if ((place != IN_HAVING ||
(sl->with_sum_func == 0 && sl->group_list.elements == 0)) &&
(tmp= find_field_in_tables(thd, this,
table_list, &where,
@@ -1952,8 +1951,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference)
or SELECT list or outer SELECT do not use groupping (i.e. tables
are accessable)
*/
- if (((place != IN_HAVING &&
- place != SELECT_LIST) ||
+ if ((place != IN_HAVING ||
(sl->with_sum_func == 0 && sl->group_list.elements == 0)) &&
(tmp= find_field_in_tables(thd, this,
table_list, &where,