Bug #10729 mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY
Submitted: 19 May 2005 8:48 Modified: 10 Jun 2005 18:00
Reporter: Berto van de Kraats Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.6-beta-nightly-20050515-debug OS:Linux (linux/windows)
Assigned to: Konstantin Osipov CPU Architecture:Any

[19 May 2005 8:48] Berto van de Kraats
Description:
if cursors are enabled, the first execute of a prepared query returns the correct result. The next executes on the same query return only the last record.

How to repeat:
compile and run the simple test program

the program returns:

0000:aaa
0000:bbb
0000:ccc
no rows found
0001:ccc
0001:ccc
0001:ccc
no rows found
0002:ccc
0002:ccc
0002:ccc
no rows found

however it should return

0000:aaa
0000:bbb
0000:ccc
no rows found
0001:aaa
0001:bbb
0001:ccc
no rows found
0002:aaa
0002:bbb
0002:ccc
no rows found
[19 May 2005 8:49] Berto van de Kraats
bug7.c

Attachment: bug7.c (application/octet-stream, text), 3.46 KiB.

[21 May 2005 4:07] MySQL Verification Team
Verified on Windows also.
[8 Jun 2005 18:27] 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/25770
[8 Jun 2005 21:15] 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/25783
[9 Jun 2005 14:30] Konstantin Osipov
Fixed in 5.0.8
[10 Jun 2005 18:00] Paul DuBois
Noted in 5.0.8 changelog.