summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorunknown <bell@book.sanja.is.com.ua>2005-05-09 01:59:10 +0300
committerunknown <bell@book.sanja.is.com.ua>2005-05-09 01:59:10 +0300
commita6b1546676ecb06a1e2d555ab8716d89bd359c31 (patch)
tree8d33320966b89e4ec888a4f4fbd50dc50071ad92 /sql/sql_class.cc
parent930644731d2689929e2372110536c4fbc7330a60 (diff)
downloadmariadb-git-a6b1546676ecb06a1e2d555ab8716d89bd359c31.tar.gz
Item::fix_field need correct pointer on item reference to chnge it if itis need, so support of correct item address added to SP commands (BUG#5963)
some optimisation of IF/NOT IF ptomised to Pem mysql-test/r/sp.result: test for bug#5963 mysql-test/t/sp.test: test for bug#5963 sql/item.cc: new method which return reference on Item for SP variables support sql/item.h: comment fixed method added sql/sp_head.cc: preparation of item made separate function we do not need new constant Item to check IF/IF NOT support of passing correct address of item for fix_fields method sql/sp_rcontext.cc: support of Item address passing to fix_fields sql/sp_rcontext.h: support of correct address passing to fix_fields sql/sql_class.cc: support of correct item address passing to fix_field
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index a6a1f4d60ef..2d5c4722164 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1719,10 +1719,9 @@ bool select_dumpvar::send_data(List<Item> &items)
List_iterator_fast<Item_func_set_user_var> li(vars);
List_iterator_fast<Item_splocal> var_li(local_vars);
List_iterator_fast<my_var> my_li(var_list);
- List_iterator_fast<Item> it(items);
+ List_iterator<Item> it(items);
Item_func_set_user_var *xx;
Item_splocal *yy;
- Item *item;
my_var *zz;
DBUG_ENTER("send_data");
if (unit->offset_limit_cnt)
@@ -1741,13 +1740,13 @@ bool select_dumpvar::send_data(List<Item> &items)
my_message(ER_TOO_MANY_ROWS, ER(ER_TOO_MANY_ROWS), MYF(0));
DBUG_RETURN(1);
}
- while ((zz=my_li++) && (item=it++))
+ while ((zz=my_li++) && (it++))
{
if (zz->local)
{
if ((yy=var_li++))
{
- if (thd->spcont->set_item_eval(yy->get_offset(), item, zz->type))
+ if (thd->spcont->set_item_eval(yy->get_offset(), it.ref(), zz->type))
DBUG_RETURN(1);
}
}