From fd59fb1031bfcf0d0154f192fe8d8895a2f69b5a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 11 Mar 2003 19:40:49 +0200 Subject: A bug fix for multi-table updates with InnoDB storage engine --- mysql-test/r/innodb.result | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mysql-test/r/innodb.result') diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index d65e90a6cc0..e577ddb9ecd 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1074,3 +1074,20 @@ id select * from t2; id t1_id drop table t1,t2; +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; +CREATE TABLE t2(id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id) ) TYPE=INNODB; +INSERT INTO t1 VALUES(1); +INSERT INTO t2 VALUES(1, 1); +SELECT * from t1; +id +1 +UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1; +SELECT * from t1; +id +2 +UPDATE t1,t2 SET t1.id=t1.id+1; +SELECT * from t1; +id +3 +DROP TABLE IF EXISTS t1,t2; -- cgit v1.2.1 From cbbe5e8e2b45d20fbf06c3110e86d3faa5ba5542 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2003 14:34:07 +0200 Subject: A little bit improved test case --- mysql-test/r/innodb.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r/innodb.result') diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index e577ddb9ecd..66e748579de 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1086,7 +1086,7 @@ UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1; SELECT * from t1; id 2 -UPDATE t1,t2 SET t1.id=t1.id+1; +UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id; SELECT * from t1; id 3 -- cgit v1.2.1 From da9d94997cd63c746cb1201e8ccf44a437cb1dde Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2003 20:33:41 +0200 Subject: making sure that test works. --- mysql-test/r/innodb.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r/innodb.result') diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 66e748579de..caf3e10be80 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1090,4 +1090,4 @@ UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id; SELECT * from t1; id 3 -DROP TABLE IF EXISTS t1,t2; +DROP TABLE t1,t2; -- cgit v1.2.1