[CONC-67] Prepared statements failure: The statement (3) has no open cursor Created: 2014-01-22 Updated: 2014-01-25 Resolved: 2014-01-25 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Brad House (Inactive) | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 12.04LTS (though not limited to environment) |
||
| Attachments: |
|
| Description |
|
I have an application which has been tested against the mysql 5.0, 5.1, and 5.5 client libraries. Last year, we started testing the mariadb client for C, and were on revision 42 and the application worked properly there too. Trying to replicate testing on the current revision 109, mysql_stmt_fetch() fails with error code 1421 with the message: "The statement (3) has no open cursor" After further research, the issue appears to have been introduced in revision 62, as up to revision 61 works fine. I have not yet produced a minimal test case for this, but in general, the application follows what I believe is a fairly standard flow (psuedo code to give general idea): stmt = mysql_stmt_init() I haven't yet tried to determine what in the commit caused the change as there seems to be a bit to go through due to whitespace cleanups being mixed in. |
| Comments |
| Comment by Georg Richter [ 2014-01-22 ] |
|
Hi Brad, thanks for your bug report. Which server version do you use? |
| Comment by Brad House (Inactive) [ 2014-01-22 ] |
|
I'm currently just running the mysql server that comes with ubuntu 12.04LTS for testing: |
| Comment by Brad House (Inactive) [ 2014-01-24 ] |
|
test case to reproduce issue |
| Comment by Brad House (Inactive) [ 2014-01-24 ] |
|
After further investigation (in writing the test case), the issue seems to be the response code returned by mysql_stmt_fetch() is no longer MYSQL_NO_DATA after all data has been fetched, but rather an error condition. So it does successfully fetch one row of data in the test case, but then when it goes to fetch another row which should indicate the fetch is complete, it throws an error instead. |
| Comment by Georg Richter [ 2014-01-25 ] |
|
Thanks for your bug report and test case. |