summaryrefslogtreecommitdiff
path: root/mysql-test/t/trigger_notembedded.test
diff options
context:
space:
mode:
authorHorst.Hunger <horst.hunger@sun.com>2010-11-08 16:35:46 +0100
committerHorst.Hunger <horst.hunger@sun.com>2010-11-08 16:35:46 +0100
commit8e0f8d438bd0bf97c43cee1f8c81a14b6de4f979 (patch)
treee161d2386ba62934b37dc7a1a0a9e9de8d8a75ac /mysql-test/t/trigger_notembedded.test
parentbf10c4a583a93997988b0e7fb01d9dda14bbe325 (diff)
parent83e40f9634f860d8fbb1c4877b370003ca693618 (diff)
downloadmariadb-git-8e0f8d438bd0bf97c43cee1f8c81a14b6de4f979.tar.gz
due to merge.
Diffstat (limited to 'mysql-test/t/trigger_notembedded.test')
-rw-r--r--mysql-test/t/trigger_notembedded.test48
1 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/t/trigger_notembedded.test b/mysql-test/t/trigger_notembedded.test
index 7a7e6c6bc85..387944ffb47 100644
--- a/mysql-test/t/trigger_notembedded.test
+++ b/mysql-test/t/trigger_notembedded.test
@@ -932,4 +932,52 @@ disconnect con1;
DROP USER 'no_rights'@'localhost';
DROP DATABASE db1;
+#
+# Bug#55421 Protocol::end_statement(): Assertion `0' on multi-table UPDATE IGNORE
+# To reproduce a crash we need to provoke a trigger execution with
+# the following conditions:
+# - active SELECT statement during trigger execution
+# (i.e. LEX::current_select != NULL);
+# - IGNORE option (i.e. LEX::current_select->no_error == TRUE);
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest_db1;
+--enable_warnings
+
+CREATE DATABASE mysqltest_db1;
+USE mysqltest_db1;
+
+GRANT ALL ON mysqltest_db1.* TO mysqltest_u1@localhost;
+
+--connect(con1,localhost,mysqltest_u1,,mysqltest_db1)
+
+CREATE TABLE t1 (
+ a1 int,
+ a2 int
+);
+INSERT INTO t1 VALUES (1, 20);
+
+CREATE TRIGGER mysqltest_db1.upd_t1
+BEFORE UPDATE ON t1 FOR EACH ROW SET new.a2 = 200;
+
+CREATE TABLE t2 (
+ a1 int
+);
+
+INSERT INTO t2 VALUES (2);
+
+--connection default
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE IGNORE t1, t2 SET t1.a1 = 2, t2.a1 = 3 WHERE t1.a1 = 1 AND t2.a1 = 2;
+# Cleanup
+
+DROP DATABASE mysqltest_db1;
+DROP USER mysqltest_u1@localhost;
+
+--disconnect con1
+--connection default
+USE test;
+
--echo End of 5.1 tests.