Bug #2319 | Library mysqlclient | ||
---|---|---|---|
Submitted: | 8 Jan 2004 7:00 | Modified: | 29 Mar 2004 13:38 |
Reporter: | Dominique DAMBRAIN | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.1 & 5.0 | OS: | Linux (Linux kernel 2.4.21) |
Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[8 Jan 2004 7:00]
Dominique DAMBRAIN
[8 Jan 2004 7:23]
Dean Ellis
A small code sample which demonstrates the problem would be most helpful to ensure that we test your exact situation. Attach it here via the Files tab.
[8 Jan 2004 7:27]
Dominique DAMBRAIN
Thank you, Dean, for so prompt reaction. I'll start NOW development of a small sample program reproducing problem. I'll notify you soon
[8 Jan 2004 8:33]
Dominique DAMBRAIN
Script to compile sample program
Attachment: compile (text/plain), 61 bytes.
[8 Jan 2004 8:33]
Dominique DAMBRAIN
Test program generating crash
Attachment: test.c (text/plain), 6.12 KiB.
[8 Jan 2004 8:39]
Dominique DAMBRAIN
Hi, Dean I've attached two files to the debug report : compile is the script used to compile the program test.c is the test program itself Note : You'll have to adapt (manually) one line in the source : Database on which to connect user name password The program will create a 'test_table' , with 3 columns It'll insert a row into it. It'll prompt you to obtain number of criterias to use : answer 1 or 2 it'll execute test sequence 1- With 1 criteria : all is OK ( SELECT statement is reused ) 2- With 2 citerias, that fails ( idem, but error 2013 under Linux, or crash server under Windows)
[8 Jan 2004 10:22]
Dean Ellis
Verified with 4.1.2. The problem occurs when re-executing a prepared SELECT statement. I tested a seperate program with pstest (a int, b int, c int) and the statement: "SELECT a FROM pstest WHERE b = ?". I can re-execute this without issue, but if anything at all is added to the WHERE clause re-execution crashes mysqld. Examples: "SELECT a FROM pstest WHERE 1 = 1 AND b = ?" "SELECT a FROM pstest WHERE b = ? AND 1 = 1" "SELECT a FROM pstest WHERE b = ? AND c = 1" "SELECT a FROM pstest WHERE b = ? AND c = ?" Attaching some stack traces.
[14 Jan 2004 8:50]
Dominique DAMBRAIN
Hi, Dmitri & Dean If I've correctly interpreted last events about this bug report, Dean has prooved that problem occurs, also with version 4.1.2 What can I do, now, about this problem ? Can I help you more, or only wait a new notification from you ? Kindly yours,
[29 Mar 2004 13:38]
Dmitry Lenev
Hi, Dominique! I can't repeat this behavior with latest 4.1 tree (but it is easily repeatable for 4.1.1). Since there were fixes in code related to prepared statements and exactly related to consequnces of constant propagation in prepared statements recently I believe that you bug is fixed. Please look if you can repeat it with latest bk version or with 4.1.2 when it comes out (look into http://www.mysql.com/doc/en/Installing_source.html for more info about building MySQL from public development source tree) Thank you for your interest in MySQL!
[24 Jun 2004 9:11]
Dominique DAMBRAIN
Hi, Dmitri As suggested, we've tested version 4.1.2 on Windows & Linux The complex WHERE clause seems to work fine, now : Bug fixed ! But we still have problem ( not fully identified ) with prepared statements reused many times : After some use, we receive error 2014. To be continued..... Thanks for help.