diff options
author | unknown <serg@serg.mylan> | 2004-06-25 15:12:51 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-06-25 15:12:51 +0200 |
commit | b4336ad4e0478f6e5a05ef66ebe68a66deafbbe6 (patch) | |
tree | 1943de46931fe68f5674c4156a4ca938076a2d18 /mysql-test | |
parent | 13b09b10df9a2105a245b3fcad5977c108119c68 (diff) | |
parent | c79039b861eb2dbf2a98a2681a2aaf5bd6d10fd1 (diff) | |
download | mariadb-git-b4336ad4e0478f6e5a05ef66ebe68a66deafbbe6.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/merge.result | 18 | ||||
-rw-r--r-- | mysql-test/t/merge.test | 8 |
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 63e0a228aa5..83f8230f11c 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -544,6 +544,24 @@ insert into t1 values (99,NULL); select * from t4 where a+0 > 90; a b 99 1 +insert t5 values (1,1); +ERROR 23000: Duplicate entry '1-1' for key 1 +insert t6 values (2,1); +ERROR 23000: Duplicate entry '2-1' for key 1 +insert t5 values (1,1) on duplicate key update b=b+10; +insert t6 values (2,1) on duplicate key update b=b+20; +select * from t5 where a < 3; +a b +1 2 +1 3 +1 4 +1 5 +1 11 +2 2 +2 3 +2 4 +2 5 +2 21 drop table t6, t5, t4, t3, t2, t1; CREATE TABLE t1 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', PRIMARY KEY (a,b)) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,1), (2,1); diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 1f61e200613..cf55c26fb69 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -190,6 +190,14 @@ select * from t5 order by a,b; select * from t6 order by a,b; insert into t1 values (99,NULL); select * from t4 where a+0 > 90; +# bug#4008 - cannot determine a unique key that caused "dupl. key error" +--error 1062 +insert t5 values (1,1); +--error 1062 +insert t6 values (2,1); +insert t5 values (1,1) on duplicate key update b=b+10; +insert t6 values (2,1) on duplicate key update b=b+20; +select * from t5 where a < 3; drop table t6, t5, t4, t3, t2, t1; CREATE TABLE t1 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', PRIMARY KEY (a,b)) ENGINE=MyISAM; |