summaryrefslogtreecommitdiff
path: root/mysql-test/t/update.test
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2005-12-01 23:22:20 +0300
committerevgen@moonbone.local <>2005-12-01 23:22:20 +0300
commit3f72e7645f93454ed34cbd8b0ca9cdbae05a59d0 (patch)
tree3c4c81ee2c0591a8486928fe1acc499756cec8e9 /mysql-test/t/update.test
parentf57dffe4539bde8a4c4494fdb4e09af6ca7c83ae (diff)
downloadmariadb-git-3f72e7645f93454ed34cbd8b0ca9cdbae05a59d0.tar.gz
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.
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r--mysql-test/t/update.test17
1 files changed, 17 insertions, 0 deletions
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