summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/trigger.result14
-rw-r--r--mysql-test/t/trigger.test26
2 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result
index 23f15f618f2..4476735735c 100644
--- a/mysql-test/r/trigger.result
+++ b/mysql-test/r/trigger.result
@@ -2073,4 +2073,18 @@ select @a, @b;
drop trigger trg1;
drop trigger trg2;
drop table t1, t2;
+CREATE TABLE t1 ( a INT, b INT );
+CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY, b INT );
+INSERT INTO t1 (a) VALUES (1);
+CREATE TRIGGER tr1
+BEFORE INSERT ON t2
+FOR EACH ROW
+BEGIN
+UPDATE a_nonextisting_table SET a = 1;
+END//
+CREATE TABLE IF NOT EXISTS t2 ( a INT, b INT ) SELECT a, b FROM t1;
+ERROR 42S02: Table 'test.a_nonextisting_table' doesn't exist
+SELECT * FROM t2;
+a b
+DROP TABLE t1, t2;
End of 5.1 tests.
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test
index 9a5556c518d..1e55f9d5993 100644
--- a/mysql-test/t/trigger.test
+++ b/mysql-test/t/trigger.test
@@ -2370,4 +2370,30 @@ drop trigger trg1;
drop trigger trg2;
drop table t1, t2;
+#
+# Bug#44653: Server crash noticed when executing random queries with partitions.
+#
+CREATE TABLE t1 ( a INT, b INT );
+CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY, b INT );
+
+INSERT INTO t1 (a) VALUES (1);
+
+delimiter //;
+CREATE TRIGGER tr1
+BEFORE INSERT ON t2
+FOR EACH ROW
+BEGIN
+ UPDATE a_nonextisting_table SET a = 1;
+END//
+delimiter ;//
+
+--disable_abort_on_error
+CREATE TABLE IF NOT EXISTS t2 ( a INT, b INT ) SELECT a, b FROM t1;
+--enable_abort_on_error
+
+# Caused failed assertion
+SELECT * FROM t2;
+
+DROP TABLE t1, t2;
+
--echo End of 5.1 tests.