fixed incorrect type custing (fixed problem with runing tests with --debug (thanks, Sergei Gluhov spoted it))

mysql-test/r/view.result:
  PS with multiupdate and view with collate
mysql-test/t/view.test:
  PS with multiupdate and view with collate
sql/sql_update.cc:
  fixed incorrect type custing
This commit is contained in:
unknown 2004-10-09 18:51:19 +03:00
parent 1af88dc5f4
commit 13ec43179c
3 changed files with 22 additions and 3 deletions

View File

@ -1329,6 +1329,18 @@ update v1,t1 set v1.s1='c' where t1.s1=v1.s1;
select * from v1;
s1
c
prepare stmt1 from "update v1,t1 set v1.s1=? where t1.s1=v1.s1";
set @arg='d';
execute stmt1 using @arg;
select * from v1;
s1
d
set @arg='e';
execute stmt1 using @arg;
select * from v1;
s1
e
deallocate prepare stmt1;
drop view v1;
drop table t1;
create table t1 (a int);

View File

@ -1297,6 +1297,14 @@ update v1 set s1='b';
select * from v1;
update v1,t1 set v1.s1='c' where t1.s1=v1.s1;
select * from v1;
prepare stmt1 from "update v1,t1 set v1.s1=? where t1.s1=v1.s1";
set @arg='d';
execute stmt1 using @arg;
select * from v1;
set @arg='e';
execute stmt1 using @arg;
select * from v1;
deallocate prepare stmt1;
drop view v1;
drop table t1;

View File

@ -80,9 +80,8 @@ static bool check_fields(THD *thd, List<Item> &items)
we make temporary copy of Item_field, to avoid influence of changing
result_field on Item_ref which refer on this field
*/
field= new Item_field(thd, field);
it.replace(field);
((Item_field *)item)->register_item_tree_changing(it.ref());
it.replace(new Item_field(thd, field));
field->register_item_tree_changing(it.ref());
}
return FALSE;
}