diff options
author | unknown <bell@sanja.is.com.ua> | 2004-03-17 14:26:26 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-03-17 14:26:26 +0200 |
commit | f83cf4144065c12cad4007767e2e70d444fd0e05 (patch) | |
tree | 879e13469f1915539666e702fc32401e7f3a61d2 /sql/item_subselect.cc | |
parent | 8242d1f19dcc00a8ad393485f19a1b3d806b8100 (diff) | |
download | mariadb-git-f83cf4144065c12cad4007767e2e70d444fd0e05.tar.gz |
DBUG_ASSERT(fixed == 0) added to fix_fields()
sql/item.cc:
layout fixed
fixed bug in prepared statements with subqueries and outer references
sql/item.h:
neg_transformer get thd argument to call fix_fields
sql/item_cmpfunc.cc:
DBUG_ASSERT(fixed == 0) added to fix_fields()
fixed Item_in_optimizer fixed flag
neg_arguments(), neg_transformer() call fix_field() on created items to avoid bouble fix field or non-called fixfields()
sql/item_cmpfunc.h:
neg_transformer get thd argument to call fix_fields
fixed forgoten cleanup() call of parent class
sql/item_func.cc:
DBUG_ASSERT(fixed == 0) and fixed flag check added to fix_fields()
sql/item_func.h:
DBUG_ASSERT(fixed == 0) added to fix_fields()
fixed forgoten cleanup() call of parent class
sql/item_row.cc:
DBUG_ASSERT(fixed == 0) added to fix_fields()
added forgoten 'fixed' flag set
sql/item_subselect.cc:
DBUG_ASSERT(fixed == 0) added to fix_fields()
fixed subquery transformation
sql/sql_base.cc:
check of fixed flag added
sql/sql_derived.cc:
fixed cleunup union in derived table during EXPLAIN command processing
sql/sql_select.cc:
thd argument add to function to allow call fix_fields() of new created items
fixed EXPLAIN double preparation
check of fixed flag added
eliminate_not_funcs fixed for corrcet fix_fields call of new created items
sql/sql_select.h:
thd argument add to function to allow call fix_fields() of new created items
sql/sql_union.cc:
union processing fixed
tests/client_test.c:
layout fixed
new test of outer references fron subqueries
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index deb1ebabef9..90070e21953 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -102,6 +102,7 @@ Item_subselect::select_transformer(JOIN *join) bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref) { + DBUG_ASSERT(fixed == 0); engine->set_thd((thd= thd_param)); stmt= thd->current_statement; @@ -125,8 +126,10 @@ bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref) engine->exclude(); substitution= 0; fixed= 1; - thd->where= "checking transformed subquery"; - int ret= (*ref)->fix_fields(thd, tables, ref); + thd->where= "checking transformed subquery"; + int ret= 0; + if (!(*ref)->fixed) + ret= (*ref)->fix_fields(thd, tables, ref); // We can't substitute aggregate functions (like (SELECT (max(i))) if ((*ref)->with_sum_func) { @@ -651,9 +654,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, select_lex->item_list.empty(); select_lex->item_list.push_back(item); - if (item->fix_fields(thd, join->tables_list, - select_lex->item_list.head_ref())) - goto err; + // fix_fields call for 'item' will be made during new subquery fix_fields subs= new Item_singlerow_subselect(select_lex); } |