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_func.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_func.cc')
-rw-r--r-- | sql/item_func.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 88c2bf824c6..c8d4178e739 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -199,6 +199,7 @@ Item_func::Item_func(THD *thd, Item_func *item) bool Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) { + DBUG_ASSERT(fixed == 0); Item **arg,**arg_end; #ifndef EMBEDDED_LIBRARY // Avoid compiler warning char buff[STACK_BUFF_ALLOC]; // Max argument in function @@ -215,7 +216,7 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) { Item *item; /* We can't yet set item to *arg as fix_fields may change *arg */ - if ((*arg)->fix_fields(thd, tables, arg) || + if ((!(*arg)->fixed && (*arg)->fix_fields(thd, tables, arg)) || (*arg)->check_cols(allowed_arg_cols)) return 1; /* purecov: inspected */ item= *arg; @@ -2172,6 +2173,7 @@ static user_var_entry *get_variable(HASH *hash, LEX_STRING &name, bool Item_func_set_user_var::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) { + DBUG_ASSERT(fixed == 0); /* fix_fields will call Item_func_set_user_var::fix_length_and_dec */ if (Item_func::fix_fields(thd, tables, ref) || !(entry= get_variable(&thd->user_vars, name, 1))) @@ -2741,6 +2743,7 @@ void Item_func_match::init_search(bool no_order) bool Item_func_match::fix_fields(THD *thd, TABLE_LIST *tlist, Item **ref) { + DBUG_ASSERT(fixed == 0); Item *item; LINT_INIT(item); // Safe as arg_count is > 1 |