summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authoracurtis@xiphis.org <>2005-08-10 22:17:53 +0100
committeracurtis@xiphis.org <>2005-08-10 22:17:53 +0100
commit445bc1336ece8428a3db3374c1d2b3ce57a61ede (patch)
treee56c88e5c44e91416f40652b7af3a1165c35b4ba /mysql-test
parent9125477df54aff3f7cdaf64637f5867cc8a8d75d (diff)
parent015447b21191ee5dce8f08631ff111595b3533ea (diff)
downloadmariadb-git-445bc1336ece8428a3db3374c1d2b3ce57a61ede.tar.gz
Merge xiphis.org:/usr/home/antony/work2/p2-bug10109.3
into xiphis.org:/usr/home/antony/work2/p2-bug10109.4
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/insert_update.result6
-rw-r--r--mysql-test/t/insert_update.test14
2 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result
index fc157093a7f..dbe5d600a95 100644
--- a/mysql-test/r/insert_update.result
+++ b/mysql-test/r/insert_update.result
@@ -191,3 +191,9 @@ ERROR 23000: Column 'a' in field list is ambiguous
insert ignore into t1 select a from t1 on duplicate key update a=t1.a+1 ;
ERROR 23000: Column 't1.a' in field list is ambiguous
drop table t1;
+CREATE TABLE t1 (
+a BIGINT(20) NOT NULL DEFAULT 0,
+PRIMARY KEY (a)
+) ENGINE=MyISAM;
+INSERT INTO t1 ( a ) SELECT 0 ON DUPLICATE KEY UPDATE a = a + VALUES (a) ;
+DROP TABLE t1;
diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test
index 5948f92d4e0..eda768be1bc 100644
--- a/mysql-test/t/insert_update.test
+++ b/mysql-test/t/insert_update.test
@@ -101,4 +101,18 @@ insert into t1 select a from t1 on duplicate key update a=a+1 ;
insert ignore into t1 select a from t1 on duplicate key update a=t1.a+1 ;
drop table t1;
+#
+# Bug#10109 - INSERT .. SELECT ... ON DUPLICATE KEY UPDATE fails
+# Bogus "Duplicate columns" error message
+#
+
+CREATE TABLE t1 (
+ a BIGINT(20) NOT NULL DEFAULT 0,
+ PRIMARY KEY (a)
+) ENGINE=MyISAM;
+
+INSERT INTO t1 ( a ) SELECT 0 ON DUPLICATE KEY UPDATE a = a + VALUES (a) ;
+
+DROP TABLE t1;
+
# End of 4.1 tests