1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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
This commit is contained in:
unknown
2005-05-09 01:59:10 +03:00
parent 930644731d
commit a6b1546676
8 changed files with 130 additions and 23 deletions

View File

@@ -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);
}
}