[CONC-301] Using mysql_stmt_bind_result() in prepared queries Created: 2017-12-21 Updated: 2020-12-08 Resolved: 2017-12-22 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 3.0.0, 3.0.1, 3.0.2, 2.3.4, 3.0.3 |
| Fix Version/s: | 3.0.3, 2.3.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kirill Müller | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Compatibility, tests | ||
| Environment: |
Ubuntu 17.10, gcc 7, compiling from source |
||
| Issue Links: |
|
||||||||||||
| Description |
|
The test for The problem seems to be present in 2.3.4 and in the 3.0 branch, and it carries over to RMariaDB. I have a patch that removes the call to mysql_stmt_bind_result(), it works with the current master of Connector/C but fails with everything else: 1. master of RMariaDB:
2. patched RMariaDB, https://github.com/r-dbi/RMariaDB/pull/81:
I haven't found anything related to this change in the release notes. Please advise. For the future: Would you consider adding tests for RMariaDB compiled against your latest development versions to your automated test system? This will ensure smooth operation of RMariaDB, and also adds another rich test suite for Connector/C. |
| Comments |
| Comment by Georg Richter [ 2017-12-22 ] |
|
Hi Kirill, issue confirmed: The correct statement status (MYSQL_STMT_USER_FETCHING) is set after fetch_to_bind, so in case fetch_to_bind fails with truncation the status is not updated correctly and subsequent calls to mysql_stmt_fetch_column will fail. |
| Comment by Kirill Müller [ 2017-12-22 ] |
|
Thanks for your very fast response. That's what I saw when casually stepping into libmariadb with the debugger. |
| Comment by Georg Richter [ 2017-12-22 ] |
|
Fixed in 2.3.5 and 3.0.3 About integrating test framework: Let's discuss it after |
| Comment by Kirill Müller [ 2017-12-22 ] |
|
Thanks, Georg. Confirmed that RMariaDB now works unchanged with current master. RMariaDB is already tested on Travis, so adding a build matrix entry should be easy once you have your tests there. |