mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Enable support of access to tables from triggers. Thus fix bug #8406 "Triggers
crash if referencing a table" and several other related bugs. Fix for bug #11834 "Re-execution of prepared statement with dropped function crashes server." which was spotted during work on previous bugs. Also couple of nice cleanups: - Replaced two separate hashes for stored routines used by statement with one. - Now instead of doing one pass through all routines used in statement for caching them and then doing another pass for adding their tables to table list, we do only one pass during which do both things.
This commit is contained in:
@@ -986,3 +986,25 @@ create procedure p() execute stmt;
|
||||
create function f() returns int begin execute stmt;
|
||||
deallocate prepare stmt;
|
||||
|
||||
#
|
||||
# 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;
|
||||
|
||||
Reference in New Issue
Block a user