summaryrefslogtreecommitdiff
path: root/mysql-test/t/trigger.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/trigger.test')
-rw-r--r--mysql-test/t/trigger.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test
index f3b9d6bb91e..7ff61bd96e1 100644
--- a/mysql-test/t/trigger.test
+++ b/mysql-test/t/trigger.test
@@ -2489,3 +2489,28 @@ DROP TRIGGER trg1;
DROP TRIGGER trg2;
DROP TABLE t1;
+
+--echo #
+--echo # Bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive
+--echo # on TRIGGER + TEMP table".
+--echo #
+
+--disable_warnings
+drop trigger if exists t1_bi;
+drop temporary table if exists t1;
+drop table if exists t1;
+--enable_warnings
+
+create table t1 (i int);
+create trigger t1_bi before insert on t1 for each row set @a:=1;
+--echo # Create temporary table which shadows base table with trigger.
+create temporary table t1 (j int);
+--echo # Dropping of trigger should succeed.
+drop trigger t1_bi;
+select trigger_name from information_schema.triggers
+ where event_object_schema = 'test' and event_object_table = 't1';
+--echo # Clean-up.
+drop temporary table t1;
+drop table t1;
+
+--echo End of 6.0 tests.