summaryrefslogtreecommitdiff
path: root/mysql-test/t/insert.test
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-08-09 14:11:29 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-08-09 14:11:29 +0200
commitfa69eeb1135e18beeee6f85338a8b208276a425b (patch)
tree8578afc04afde36b010302fa689040e1eda71652 /mysql-test/t/insert.test
parenta0919642873ae7b3172705578d67c8f093fc5fba (diff)
parentd62bfebc7ede98df28ac75ec0d0880fd07f201db (diff)
downloadmariadb-git-fa69eeb1135e18beeee6f85338a8b208276a425b.tar.gz
manual merge from mysql-5.1-bugteam
Diffstat (limited to 'mysql-test/t/insert.test')
-rw-r--r--mysql-test/t/insert.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 4f918504597..2bf543511ac 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -525,3 +525,28 @@ drop table t1;
--echo #
--echo # End of 5.4 tests
--echo #
+
+--echo #
+--echo # Bug#54106 assert in Protocol::end_statement,
+--echo # INSERT IGNORE ... SELECT ... UNION SELECT ...
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (a INT);
+
+--error ER_FIELD_SPECIFIED_TWICE
+INSERT INTO t1 (a, a) VALUES (1, 1);
+# Verify that ER_FIELD_SPECIFIED_TWICE is not ignorable
+--error ER_FIELD_SPECIFIED_TWICE
+INSERT IGNORE t1 (a, a) VALUES (1, 1);
+
+--error ER_FIELD_SPECIFIED_TWICE
+INSERT IGNORE t1 (a, a) SELECT 1,1;
+# Used to cause an assert
+--error ER_FIELD_SPECIFIED_TWICE
+INSERT IGNORE t1 (a, a) SELECT 1,1 UNION SELECT 2,2;
+
+DROP TABLE t1;