diff options
author | unknown <svoj@mysql.com/april.(none)> | 2006-10-05 18:23:53 +0500 |
---|---|---|
committer | unknown <svoj@mysql.com/april.(none)> | 2006-10-05 18:23:53 +0500 |
commit | 2268afedea366951d1f4ac10d1aa8394fb2b5b69 (patch) | |
tree | 817e8e2f7ddc2a3ab3694e3dab6b61c8c188b68b /mysql-test | |
parent | 186573b3d6301532b5d5fa9b470335e19f49769c (diff) | |
download | mariadb-git-2268afedea366951d1f4ac10d1aa8394fb2b5b69.tar.gz |
BUG#21381 - Engine not notified about multi-table UPDATE IGNORE
Though this is not storage engine specific problem, I was able to
repeat this problem with BDB and NDB engines only. That was the
reason to add a test case into ndb_update.test. As a result
different bad things could happen.
BDB has removed duplicate rows which is not expected.
NDB returns an error.
For multi table update notify storage engine about UPDATE IGNORE
as it is done in single table UPDATE.
mysql-test/r/ndb_update.result:
A test case for bug#21381.
mysql-test/t/ndb_update.test:
A test case for bug#21381.
sql/sql_update.cc:
For multi table update notify storage engine about UPDATE IGNORE
as it is done in single table UPDATE.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ndb_update.result | 8 | ||||
-rw-r--r-- | mysql-test/t/ndb_update.test | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/ndb_update.result b/mysql-test/r/ndb_update.result index c2247564e65..4848284b4af 100644 --- a/mysql-test/r/ndb_update.result +++ b/mysql-test/r/ndb_update.result @@ -31,3 +31,11 @@ pk1 b c 12 2 2 14 1 1 DROP TABLE IF EXISTS t1; +CREATE TABLE t1(a INT NOT NULL, UNIQUE(a)) ENGINE=ndbcluster; +INSERT INTO t1 VALUES(1),(2); +UPDATE IGNORE t1, t1 AS t1a SET t1.a=3; +SELECT a FROM t1 ORDER BY a; +a +1 +3 +DROP TABLE t1; diff --git a/mysql-test/t/ndb_update.test b/mysql-test/t/ndb_update.test index 45e3add4639..e7c5fd0c4a5 100644 --- a/mysql-test/t/ndb_update.test +++ b/mysql-test/t/ndb_update.test @@ -33,4 +33,13 @@ select * from t1 order by pk1; DROP TABLE IF EXISTS t1; --enable_warnings +# +# BUG#21381 - Engine not notified about multi-table UPDATE IGNORE +# +CREATE TABLE t1(a INT NOT NULL, UNIQUE(a)) ENGINE=ndbcluster; +INSERT INTO t1 VALUES(1),(2); +UPDATE IGNORE t1, t1 AS t1a SET t1.a=3; +SELECT a FROM t1 ORDER BY a; +DROP TABLE t1; + # End of 4.1 tests |