summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <antony@ltantony.mysql.com>2005-05-07 14:43:03 +0100
committerunknown <antony@ltantony.mysql.com>2005-05-07 14:43:03 +0100
commit786ba12f3164a6c3246c94776c6a45410e4fa5b5 (patch)
tree65bef7b0ac215ff23d72297790fb56be7910a3ed /mysql-test
parent5a50551504afb19430d9872ad4681b711395b699 (diff)
parentbb42494438aa33eba06506724fea1a1485979b1f (diff)
downloadmariadb-git-786ba12f3164a6c3246c94776c6a45410e4fa5b5.tar.gz
Merge ltantony.mysql.com:/usr/home/antony/work2/p2-bug9725
into ltantony.mysql.com:/usr/home/antony/work2/megapatch-4.1 BitKeeper/etc/logging_ok: auto-union
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/insert_update.result13
-rw-r--r--mysql-test/t/insert_update.test12
2 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result
index ff7ec1ba73f..f78372541f2 100644
--- a/mysql-test/r/insert_update.result
+++ b/mysql-test/r/insert_update.result
@@ -167,3 +167,16 @@ a b c VALUES(a)
2 1 11 NULL
DROP TABLE t1;
DROP TABLE t2;
+create table t1 (a int not null unique);
+insert into t1 values (1),(2);
+insert ignore into t1 select 1 on duplicate key update a=2;
+select * from t1;
+a
+1
+2
+insert ignore into t1 select a from t1 on duplicate key update a=a+1 ;
+select * from t1;
+a
+1
+3
+drop table t1;
diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test
index 188de8a5379..0fa366586b3 100644
--- a/mysql-test/t/insert_update.test
+++ b/mysql-test/t/insert_update.test
@@ -80,3 +80,15 @@ INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=c+VALUES(a);
SELECT *, VALUES(a) FROM t1;
DROP TABLE t1;
DROP TABLE t2;
+
+#
+# Bug#9725 - "disapearing query/hang" and "unknown error" with "on duplicate key update"
+# INSERT INGORE...UPDATE gives bad error or breaks protocol.
+#
+create table t1 (a int not null unique);
+insert into t1 values (1),(2);
+insert ignore into t1 select 1 on duplicate key update a=2;
+select * from t1;
+insert ignore into t1 select a from t1 on duplicate key update a=a+1 ;
+select * from t1;
+drop table t1;