diff options
author | unknown <antony@ltantony.mysql.com> | 2005-05-07 13:31:37 +0100 |
---|---|---|
committer | unknown <antony@ltantony.mysql.com> | 2005-05-07 13:31:37 +0100 |
commit | bb42494438aa33eba06506724fea1a1485979b1f (patch) | |
tree | 74e4baf3febad432c2835bfd2ef999eb4473bd17 /mysql-test/t/insert_update.test | |
parent | cae0d72898effe5e2e9d620562f01335fe1959ea (diff) | |
download | mariadb-git-bb42494438aa33eba06506724fea1a1485979b1f.tar.gz |
Bug#9725 - "disapearing query/hang" and "unknown error" with "on duplicate key update"
INSERT IGNORE...UPDATE causes break in protocol or unknown error message.
Fix so that protocol doesn't break by properly ignoring dups.
mysql-test/r/insert_update.result:
Test for Bug#9725
mysql-test/t/insert_update.test:
Test for Bug#9725
sql/sql_insert.cc:
Ignore the failure in update_row when IGNORE is set.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysql-test/t/insert_update.test')
-rw-r--r-- | mysql-test/t/insert_update.test | 12 |
1 files changed, 12 insertions, 0 deletions
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; |