Bug #10794 mysql_stmt_attr_set no open cursor after mysql_stmt_execute
Submitted: 23 May 2005 8:43 Modified: 25 Jul 2005 22:19
Reporter: Berto van de Kraats
Status: Closed
Category:Server Severity:S1 (Critical)
Version:5.0.6-beta-nightly-20050515-debug OS:Linux (linux)
Assigned to: Konstantin Osipov Target Version:

[23 May 2005 8: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 8:44] Berto van de Kraats
bug11.c

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

[23 May 2005 14:54] Miguel Solorzano
Thank you for the bug report and test case.
[30 Jun 2005 14:17] Konstantin Osipov
Fixed in 5.0 tree, which is currently marked 5.0.9
[30 Jun 2005 14: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 22: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>