summaryrefslogtreecommitdiff
path: root/mysql-test/t/update.test
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-10-06 19:14:33 +0300
committermonty@mysql.com <>2004-10-06 19:14:33 +0300
commit62f3cd6a31d3c1ffe7ad17d9de862a3c0859f56a (patch)
tree4e2cfa6a6a8032773454e22aa802b2798b2935b8 /mysql-test/t/update.test
parent96458f8f64641d5b974a17733af8c709b513bfe0 (diff)
parent0944bed7fcb59fb38230a750bd820a22b3b6b476 (diff)
downloadmariadb-git-62f3cd6a31d3c1ffe7ad17d9de862a3c0859f56a.tar.gz
Merge with 4.0 for 4.1 release
Noteworthy: - New HANDLER code - New multi-update-grant-check code - Table lock code in ha_innodb.cc was not applied
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r--mysql-test/t/update.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test
index 6ca75cf0c26..aeefa3c33f5 100644
--- a/mysql-test/t/update.test
+++ b/mysql-test/t/update.test
@@ -128,3 +128,36 @@ insert into t1 (F1,F2,F3,cnt,groupid) values ('0','0','0',1,6),
delete from m1 using t1 m1,t1 m2 where m1.groupid=m2.groupid and (m1.cnt < m2.cnt or m1.cnt=m2.cnt and m1.F3>m2.F3);
select * from t1;
drop table t1;
+
+#
+# Bug#5553 - Multi table UPDATE IGNORE fails on duplicate keys
+#
+
+CREATE TABLE t1 (
+ `colA` int(10) unsigned NOT NULL auto_increment,
+ `colB` int(11) NOT NULL default '0',
+ PRIMARY KEY (`colA`)
+);
+INSERT INTO t1 VALUES (4433,5424);
+CREATE TABLE t2 (
+ `colC` int(10) unsigned NOT NULL default '0',
+ `colA` int(10) unsigned NOT NULL default '0',
+ `colD` int(10) unsigned NOT NULL default '0',
+ `colE` int(10) unsigned NOT NULL default '0',
+ `colF` int(10) unsigned NOT NULL default '0',
+ PRIMARY KEY (`colC`,`colA`,`colD`,`colE`)
+);
+INSERT INTO t2 VALUES (3,4433,10005,495,500);
+INSERT INTO t2 VALUES (3,4433,10005,496,500);
+INSERT INTO t2 VALUES (3,4433,10009,494,500);
+INSERT INTO t2 VALUES (3,4433,10011,494,500);
+INSERT INTO t2 VALUES (3,4433,10005,497,500);
+INSERT INTO t2 VALUES (3,4433,10013,489,500);
+INSERT INTO t2 VALUES (3,4433,10005,494,500);
+INSERT INTO t2 VALUES (3,4433,10005,493,500);
+INSERT INTO t2 VALUES (3,4433,10005,492,500);
+UPDATE IGNORE t2,t1 set t2.colE = t2.colE + 1,colF=0 WHERE t1.colA = t2.colA AND (t1.colB & 4096) > 0 AND (colE + 1) < colF;
+SELECT * FROM t2;
+DROP TABLE t1;
+DROP TABLE t2;
+