[CONC-641] mysql_stmt_close() interferes with the query results of other statements Created: 2023-03-23 Updated: 2023-03-23 Resolved: 2023-03-23 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | API |
| Affects Version/s: | 3.1.13, 3.3.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Tao Su | Assignee: | Georg Richter |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | foundation | ||
| Environment: |
All plateform |
||
| Attachments: |
|
| Description |
|
Use mysql_stmt_init() to create multiple statements. When one statement A completes its work (that is, fetches all result sets or no result sets) but is not closed, use statement B to query with result sets and succeed. Closing statement A at this point will cause the result set of statement B to disappear. The same problem will occur if statement B is replaced with mysql_query(). Attached is the demo code. |
| Comments |
| Comment by Georg Richter [ 2023-03-23 ] |
|
You have to store a pending result set first before sending further commands to the server. |