Bug #11183 mysql_stmt_reset() doesn't reset information about error
Submitted: 8 Jun 2005 19:35 Modified: 21 Jul 2005 5:12
Reporter: Alexey Stroganov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.12, 5.0.7/5.0.8 OS:Any (All)
Assigned to: Andrey Hristov CPU Architecture:Any

[8 Jun 2005 19:35] Alexey Stroganov
Description:
Working with mysql ะก PS API I found follow issue:

If error occurred during mysql_stmt_execute() one should call mysql_stmt_reset() to 
return statement to state after mysql_stmt_prepare(). But after that call information 
about error not cleared properly.

How to repeat:
Complie attached C file like:

gcc -g -I /path/to/mysql/include mysql_stmt_reset_bug.c  -L/path/to/mysql/libs -lmysqlclient -lz -lm -lssl -lcrypto -lcrypt -o mysql_stmt_reset_bug
[8 Jun 2005 19:37] Alexey Stroganov
mysql_stmt_reset issue

Attachment: mysql_stmt_reset_bug.c (text/x-csrc), 2.55 KiB.

[14 Jul 2005 10:21] 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/27058
[14 Jul 2005 14:54] 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/27081
[14 Jul 2005 14:57] Konstantin Osipov
The fix and a test case merged into one patch and pushed into 4.1 (tagged 4.1.14), merged
into 5.1.10
[21 Jul 2005 5:12] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 4.1.14 and 5.0.10 changelogs. Closed.