Bug #8330 | mysql_stmt_execute crashes | ||
---|---|---|---|
Submitted: | 5 Feb 2005 6:26 | Modified: | 10 Feb 2005 20:25 |
Reporter: | Georg Richter | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.x + 5.0.x | OS: | Any (all) |
Assigned to: | Konstantin Osipov | CPU Architecture: | Any |
[5 Feb 2005 6:26]
Georg Richter
[9 Feb 2005 21:31]
Konstantin Osipov
Subject: bk commit - 4.1 tree (konstantin:1.2165) BUG#8330 ChangeSet 1.2165 05/02/10 00:19:38 konstantin@mysql.com +2 -0 A fix and test case for Bug#8330 "mysql_stmt_execute crashes" (libmysql).
[10 Feb 2005 8:32]
Patrick Galbraith
I have tested and reviewed this patch as follows: Compiled the latest from bk for 4.1, placed the new test that contains the code that exposes this bug into mysql_client_test, and saw that it caused a seg fault, running it three times with the same results. I then patched libmysql.c with the patch, and recompiled both the libmysql and mysql_client_test, reran the test 3 times, the test passing every time. In looking at this patch, the if block that checks the status of the statement handle is in from within cli_stmt_execute, is placed best possible place (right before the call to net_clear which is where without this check, it will segfault) to ensure that if the statement handle is not ready (still dealing with the results of another statement), to not proceed within cli_stmt_execute. This is what prevents the segfault from occurring for the libmysql developer/user. I consider this patch ready to be pushed.
[10 Feb 2005 11:58]
Konstantin Osipov
Pushed into current 4.1 tree, which is tagged 4.1.10
[10 Feb 2005 20:25]
Paul DuBois
Mentioned in 4.1.10 change notes.