Bug #17595 DROP FUNCTION IF EXISTS f1 crashes server
Submitted: 20 Feb 2006 19:58 Modified: 4 Mar 2006 1:06
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S1 (Critical)
Version:5.0-bk, 5.1-bk OS:Microsoft Windows (Windows)
Assigned to: Bugs System CPU Architecture:Any

[20 Feb 2006 19:58] Shane Bester
Description:
When not using grant tables, the following  query crashes the server.
I only crashed windows version. Linux version didn't crash.

USE test;
DROP FUNCTION IF EXISTS f1;

See attached stack trace from the debug binary.

How to repeat:
start mysqld-debug.exe --console --skip-grant-tables

USE test;
DROP FUNCTION IF EXISTS f1;

Suggested fix:
not sure
[20 Feb 2006 20:00] Shane Bester
stack

Attachment: stack.txt (text/plain), 1.02 KiB.

[20 Feb 2006 20:13] Shane Bester
--debug trace file

Attachment: mysqld.trace.zip (application/x-zip-compressed, text), 17.51 KiB.

[27 Feb 2006 13:28] 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/commits/3185
[2 Mar 2006 18:04] Sergey Vlasenko
Fix is available in 5.0.20
[4 Mar 2006 1:06] Paul Dubois
Looks like this went into 5.0.19, so it's noted in the
5.0.19 changelog.

Using <literal>DROP FUNCTION IF EXISTS
<replaceable>func_name</replaceable></literal> to drop a
user-defined function caused a server crash if the server was
running with the <option>--skip-grant-tables</option> option.
(Bug #17595)