summaryrefslogtreecommitdiff
path: root/mysql-test/t/insert.test
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-08-18 11:48:38 +0400
committerAlexander Nozdrin <alik@sun.com>2010-08-18 11:48:38 +0400
commite28d6ee66a8404dd0f8fe3aaabb9d72544e5d42e (patch)
treeca30b82c7f6cd44e80283058f48c8e2d0603e3c5 /mysql-test/t/insert.test
parent932285774ba4ad10c199953d47fc0f688fd12c10 (diff)
parent8c4d4cc3a6f1fd9852e11e16926a5e98cca5ee03 (diff)
downloadmariadb-git-e28d6ee66a8404dd0f8fe3aaabb9d72544e5d42e.tar.gz
Auto-merge from mysql-5.5.
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;