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/sql_union.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/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index a05fa44cfc9..d45b867b197 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -203,6 +203,8 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, } } + item_list.empty(); + // it is not single select if (first_select->next_select()) { union_result->tmp_table_param.field_count= types.elements; @@ -222,14 +224,17 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, result_table_list.table= table; union_result->set_table(table); - item_list.empty(); thd_arg->lex->current_select= lex_select_save; { Field **field; for (field= table->field; *field; field++) { - if (item_list.push_back(new Item_field(*field))) + Item_field *item= new Item_field(*field); + if (item_list.push_back(item)) DBUG_RETURN(-1); +#ifndef DBUG_OFF + item->double_fix= 0; +#endif } } } |