Bug #11281 mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY filter "in <subquery>" server crash
Submitted: 13 Jun 2005 9:34 Modified: 1 Jul 2005 13:40
Reporter: Berto van de Kraats Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.7-beta-nightly-20050607-debug OS:Linux (Linux)
Assigned to: Konstantin Osipov CPU Architecture:Any

[13 Jun 2005 9:34] Berto van de Kraats
Description:
If cursors are enabled, a query with an "in" filter on a subquery
cause a crash of the server during the fetch call.

How to repeat:
Compile and run the attached program (which is an automatically generated trace
of our mysql database driver). The problem reproduces if the program silently
runs and has exit status 0.
The trace contains a call to mysql_stmt_fetch that returns 1 because the
server crashed (search for pattern "ERROR:" in attached program).
[13 Jun 2005 9:38] Berto van de Kraats
Cpp trace of problem

Attachment: bug11281.cpp (text/plain), 28.22 KiB.

[30 Jun 2005 9:17] Georg Richter
see also bug #11656
[1 Jul 2005 13:40] Konstantin Osipov
Peter, thank you very much for your bug report(s).
However, your old test cases were much better :)
These new cpp traces take half an hour each to patch to work in my environment.
For example, I always use a unix socket connection, so I have to rewrite all connection strings
in the test.
Then I need to remove the database name from all queries, and rewrite the code to use
strlen() instead of the hard coded string lengths.
Them I go over every assert(mysql_ret == 1) and fix it to assert(mysql_ret == 0).