Bug #10794 mysql_stmt_attr_set no open cursor after mysql_stmt_execute
Submitted: 23 May 2005 6:43 Modified: 25 Jul 2005 20:19
Reporter: Berto van de Kraats Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.6-beta-nightly-20050515-debug OS:Linux (linux)
Assigned to: Konstantin Osipov CPU Architecture:Any

[23 May 2005 6:43] Berto van de Kraats
Description:
If the resultset belonging to the first prepared statement is not completely fetched, the cursor on the second resultset belonging the the second prepared statement is NOT opened after mysql_stmt_execute.

MySQL generated following error: The statement (139268411) has no open cursor

How to repeat:
compile and run the simple c-program
[23 May 2005 6:44] Berto van de Kraats
bug11.c

Attachment: bug11.c (application/octet-stream, text), 4.91 KiB.

[23 May 2005 12:54] Miguel Solorzano
Thank you for the bug report and test case.
[30 Jun 2005 12:17] Konstantin Osipov
Fixed in 5.0 tree, which is currently marked 5.0.9
[30 Jun 2005 12:20] 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/26553
[25 Jul 2005 20:19] Mike Hillyer
Documented in 5.0.9 changelog: 

<listitem><para>If a prepared statement cursor is opened but not completely fetched, attempting to open a cursor for a second prepared statement will fail. (Bug #10794)</para></listitem>