summaryrefslogtreecommitdiff
path: root/mysql-test/t/insert_select.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/insert_select.test')
-rw-r--r--mysql-test/t/insert_select.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index 834561ed5f7..a6468c52645 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -173,3 +173,17 @@ insert into t1 values (1),(1),(2);
insert into t2(ff1) select f1 from t1 on duplicate key update ff2=ff2+1;
select * from t2;
drop table t1, t2;
+#
+# BUGS #9728 - 'Decreased functionality in "on duplicate key update"'
+# #8147 - 'a column proclaimed ambigous in INSERT ... SELECT .. ON
+# DUPLICATE'
+#
+create table t1 (a int unique);
+create table t2 (a int, b int);
+insert into t1 values (1),(2);
+insert into t2 values (1,2);
+select * from t1;
+insert into t1 select t2.a from t2 on duplicate key update a= a + t2.b;
+select * from t1;
+drop table t1;
+drop table t2;