summaryrefslogtreecommitdiff
path: root/mysql-test/t/update.test
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2005-12-01 23:22:20 +0300
committerunknown <evgen@moonbone.local>2005-12-01 23:22:20 +0300
commit136c81732a36c3410c8a30aa64652b3c18679a0f (patch)
tree3c4c81ee2c0591a8486928fe1acc499756cec8e9 /mysql-test/t/update.test
parent2a1ae3a5e3cbc7bb076c91ba0f8b5e6242319b28 (diff)
downloadmariadb-git-136c81732a36c3410c8a30aa64652b3c18679a0f.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. sql/sql_update.cc: Fix bug#15028 Multitable update returns different numbers of matched rows depending on table order multi_update::send_data() now counts only unique rows. mysql-test/t/update.test: Test case for bug#15028 Multitable update returns different numbers of matched rows depending on table order mysql-test/r/update.result: Test case for bug#15028 Multitable update returns different numbers of matched rows depending on table order
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