summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-error.test
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2005-07-11 12:46:42 +0200
committerunknown <pem@mysql.com>2005-07-11 12:46:42 +0200
commiteb314af4921f4e14157464bda721e472c2bda9d2 (patch)
treed67cd58e2977dc6b30f461bf33e0e344d16d7446 /mysql-test/t/sp-error.test
parenta50621e886c14970bb13d78df8ed98eb24df3e10 (diff)
parent83772bc5765719dde16f3bd19d61f82f26df7e55 (diff)
downloadmariadb-git-eb314af4921f4e14157464bda721e472c2bda9d2.tar.gz
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0 mysql-test/r/sp-error.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/sp-error.test: Auto merged mysql-test/t/sp.test: Auto merged sql/sp.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'mysql-test/t/sp-error.test')
-rw-r--r--mysql-test/t/sp-error.test25
1 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index 34300cc4737..7750071c715 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -1025,4 +1025,27 @@ end|
--error 1424
call bug11394(2, 1)|
drop procedure bug11394|
-delimiter |;
+delimiter ;|
+
+#
+# Bug#11834 "Re-execution of prepared statement with dropped function
+# crashes server". Also tests handling of prepared stmts which use
+# stored functions but does not require prelocking.
+#
+--disable_warnings
+drop function if exists bug11834_1;
+drop function if exists bug11834_2;
+--enable_warnings
+create function bug11834_1() returns int return 10;
+create function bug11834_2() returns int return bug11834_1();
+prepare stmt from "select bug11834_2()";
+execute stmt;
+# Re-execution of statement should not crash server.
+execute stmt;
+drop function bug11834_1;
+# Attempt to execute statement should return proper error and
+# should not crash server.
+--error ER_SP_DOES_NOT_EXIST
+execute stmt;
+deallocate prepare stmt;
+drop function bug11834_2;