summaryrefslogtreecommitdiff
path: root/mysql-test/t/default.test
diff options
context:
space:
mode:
authorGeorgi Kodinov <kgeorge@mysql.com>2008-09-10 12:40:58 +0300
committerGeorgi Kodinov <kgeorge@mysql.com>2008-09-10 12:40:58 +0300
commit39fd3c5df7d14156a0a66c5bf984145312171d57 (patch)
treed5fc329f7f917bc22fe582b682bbfe0fa36c3d1f /mysql-test/t/default.test
parent2194850051fc8269274a1561b5890162cac62add (diff)
parent835f3528b860fe0fbb52145d23e36068f5d43d47 (diff)
downloadmariadb-git-clone-5.0.70-build.tar.gz
merged 5.0-5.1.29-rc -> 5.0-bugteamclone-5.0.70-build
Diffstat (limited to 'mysql-test/t/default.test')
-rw-r--r--mysql-test/t/default.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test
index 14aa4b02cfe..b719cb83448 100644
--- a/mysql-test/t/default.test
+++ b/mysql-test/t/default.test
@@ -145,5 +145,24 @@ insert into t1 values(default);
drop view v1;
drop table t1;
+#
+# Bug #39002: crash with
+# INSERT ... SELECT ... ON DUPLICATE KEY UPDATE col=DEFAULT
+#
+
+create table t1 (a int unique);
+create table t2 (b int default 10);
+insert into t1 (a) values (1);
+insert into t2 (b) values (1);
+
+insert into t1 (a) select b from t2 on duplicate key update a=default;
+select * from t1;
+
+insert into t1 (a) values (1);
+insert into t1 (a) select b from t2 on duplicate key update a=default(b);
+select * from t1;
+
+drop table t1, t2;
+
--echo End of 5.0 tests.