From 3f72e7645f93454ed34cbd8b0ca9cdbae05a59d0 Mon Sep 17 00:00:00 2001 From: "evgen@moonbone.local" <> Date: Thu, 1 Dec 2005 23:22:20 +0300 Subject: Fix bug#15028 Multitable update returns different numbers of matched rows depending on table order multi_update::send_data() was counting updates, not updated rows. Thus if one record have several updates it will be counted several times in 'rows matched' but updated only once. multi_update::send_data() now counts only unique rows. --- mysql-test/t/update.test | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mysql-test/t/update.test') diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test index a21d10b6571..95adb40962c 100644 --- a/mysql-test/t/update.test +++ b/mysql-test/t/update.test @@ -270,4 +270,21 @@ insert into t1 values('2000-01-01'),('0000-00-00'); update t1 set f1='2002-02-02' where f1 is null; select * from t1; drop table t1; + +# +# Bug#15028 Multitable update returns different numbers of matched rows +# depending on table order +create table t1 (f1 int); +create table t2 (f2 int); +insert into t1 values(1),(2); +insert into t2 values(1),(1); +--enable_info +update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1; +--disable_info +update t2 set f2=1; +update t1 set f1=1 where f1=3; +--enable_info +update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1; +--disable_info +drop table t1,t2; # End of 4.1 tests -- cgit v1.2.1