Bug #4271 prepared explain complex select, second executes crashes the server
Submitted: 24 Jun 2004 14:56 Modified: 25 Jun 2004 14:38
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:Linux (linux)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[24 Jun 2004 14:56] Matthias Leich
Description:
I have a very complex (non sense) select. If I perform the following sequence
  1. prepare stmt1 from <explain complex select> ;
  2. execute stmt1 ;
  3. execute stmt1 ;
the second execute crashes the mysqld server.

The attached file master.err contains the error log of the server.

I do NOT claim that the my select statements make sense in the real world
and I do NOT think that this bug is very important. But may be that
somebody can catch the same bug with a simple, non artificial select. 

My environment: Intel PC with Linux(SuSE 9.0),
   MySQL 4.1 source distrib.(last bk pull 2004-06-22)

How to repeat:
Please use my test file, copy it to mysql-test/t
  ./mysql-test-run ml_err7

The structure of ml_err7:
-------------------------
There are 14 versions of my bad explain select. The original and
most complex version is at the end of the file. The most simple
version is at the beginning of the file. That means the complexity
increases from the beginning to the end of the test case file. 
I hope this accelerates the bug fixing process.
[24 Jun 2004 14:58] Matthias Leich
test case

Attachment: ml_err7.test (application/octet-stream, text), 7.08 KiB.

[24 Jun 2004 15:00] Matthias Leich
server log

Attachment: master.err (application/octet-stream, text), 3.85 KiB.

[25 Jun 2004 10:38] Oleksandr Byelkin
ChangeSet 
  1.1989 04/06/25 11:37:43 bell@sanja.is.com.ua +4 -0 
  fixed EXPLAIN behaviour with prepared statements (BUG#4271)
[25 Jun 2004 14:38] Oleksandr Byelkin
Thank you for bugreport! Patch is pushed to source repository now.