summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-bugs.test
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-02-13 08:35:14 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-02-13 08:35:14 -0200
commita4dd7f95c8a355009f317cff214568f220f0b6db (patch)
treeff0312e29ff55b850e224fbc33104bdb65a315ed /mysql-test/t/sp-bugs.test
parentd7797f51ecb1c841ba0779887bfc04a873be3a34 (diff)
downloadmariadb-git-a4dd7f95c8a355009f317cff214568f220f0b6db.tar.gz
Bug#50624: crash in check_table_access during call procedure
This bug is just one facet of stored routines not being able to detect changes in meta-data (WL#4179). This particular problem can be triggered within a single session due to the improper management of the pre-locking list if the view is expanded after the pre-locking list is calculated. Since the overall solution for the meta-data detection issue is planned for a later release, for now a workaround is used to fix this particular aspect that only involves a single session. The workaround is to flush the thread-local stored routine cache every time a view is created or modified, causing locally cached routines to be re-evaluated upon invocation.
Diffstat (limited to 'mysql-test/t/sp-bugs.test')
-rw-r--r--mysql-test/t/sp-bugs.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/sp-bugs.test b/mysql-test/t/sp-bugs.test
index 1eb283f7874..8aa0791e265 100644
--- a/mysql-test/t/sp-bugs.test
+++ b/mysql-test/t/sp-bugs.test
@@ -80,4 +80,25 @@ CALL p1 ();
DROP TABLE t1;
DROP PROCEDURE p1;
+--echo #
+--echo # Bug#50423: Crash on second call of a procedure dropping a trigger
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TRIGGER IF EXISTS tr1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+CREATE TABLE t1 (f1 INTEGER);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @aux = 1;
+CREATE PROCEDURE p1 () DROP TRIGGER tr1;
+
+CALL p1 ();
+--error ER_TRG_DOES_NOT_EXIST
+CALL p1 ();
+
+DROP TABLE t1;
+DROP PROCEDURE p1;
+
--echo End of 5.1 tests