Bug #6384 crash, DELETE/UPDATE with correlated subquery
Submitted: 2 Nov 2004 13:23 Modified: 23 May 2005 2:25
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:
Assigned to: Oleksandr Byelkin

[2 Nov 2004 13:23] Matthias Leich
Description:
I have a simple test case (derived from the NIST tests), which crashes MySQL 5.0 .
MySQL 4.1 works successful.

My environment:
   - Intel PC with Linux(SuSE 9.1)
   - MySQL compiled from source
        Version 5.0 ChangeSet@1.1682, 2004-11-01
        Version 4.1 ChangeSet@1.2070, 2004-11-01

As far as I remember MySQL 5.0 (last Changeset around end of September)
did not show that crash.

How to repeat:
Please use my test file, copy it to mysql-test/t
  ./mysql-test-run ml_err39
[2 Nov 2004 13:24] Matthias Leich
test cases

Attachment: ml_err39.test (application/octet-stream, text), 2.46 KiB.

[8 Mar 2005 19:03] Matthias Leich
I assume that the MySQL manual: 13.1.10. UPDATE Syntax
<cut>
 Currently, you cannot update a table and select from the same table in a subquery.
<cut>
has to be applied.
That means as long as the limitation above is not removed, the server should give
an error message.
[15 May 2005 20:40] 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/24916
[15 May 2005 20:52] Oleksandr Byelkin
ChangeSet
  1.1954 05/05/15 23:39:32 bell@book.sanja.is.com.ua +3 -0
  do not try to use equal field from outer query as field of local join
+(BUG#6384)
[18 May 2005 11:16] 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/25026
[20 May 2005 13:04] Oleksandr Byelkin
pushed to 5.0.7
[23 May 2005 2:25] Paul Dubois
Noted in 5.0.7 changelog.