Bug #3265 Complex REPLACE statement crashes mysqld
Submitted: 22 Mar 2004 15:46 Modified: 27 Apr 2004 17:14
Reporter: Dean Ellis Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.19 OS:Linux (Linux)
Assigned to: Michael Widenius CPU Architecture:Any

[22 Mar 2004 15:46] Dean Ellis
Description:
A complex REPLACE statement with LEFT joins and various string functions crashes mysqld.

How to repeat:
The SQL and tables will be attached.  Simply execute the query.

Does not crash as a SELECT; does not crash with LIMIT 1.

Suggested fix:
n/a
[22 Mar 2004 16:18] Dean Ellis
Table location

Attachment: tablelocation (application/octet-stream, text), 86 bytes.

[23 Mar 2004 6:25] Alexey Botchkov
4.1 works with no error here
[27 Apr 2004 17:14] Michael Widenius
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:

This bug did not only affect REPLACE but also INSERT ... SELECT and CREATE ... SELECT.

The problem was a stack overrun when the GROUP BY part contained a NULL value.

The bug was fixed in 4.1. I have now also fixed this in 4.0

The fix will appear in 4.0.19