Bug #11834 Re-execution of prepared statement with dropped function crashes server
Submitted: 9 Jul 2005 14:21 Modified: 10 Jul 2005 15:32
Reporter: Dmitry Lenev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.9 OS:Linux (Linux/x86)
Assigned to: Dmitry Lenev CPU Architecture:Any

[9 Jul 2005 14:21] Dmitry Lenev
Description:
Re-execution of prepared statement which invokes stored function which does not
exist by the moment of re-execution causes server to crash.

How to repeat:
--disable_warnings
drop function if exists f1;
drop function if exists f2;
--enable_warnings
create function f1() returns int return 10;
create function f2() returns int return f1();
prepare stmt from "select f2()";
execute stmt;
execute stmt;
drop function f1;
# The following crashes server
execute stmt;
drop function f2;
[9 Jul 2005 20:11] Dmitry Lenev
Fixed in 5.0.10 by the same patch as bug #8406.
[10 Jul 2005 15:32] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented in 5.0.10 change history; closed.
[11 Jul 2005 5:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/26827