[CONC-461] Can mariadb send CLIENT_DEPRECATE_EOF flag during handshake? Created: 2020-03-10 Updated: 2023-12-06 Resolved: 2021-05-03 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 3.1.7 |
| Fix Version/s: | N/A |
| Type: | New Feature | Priority: | Critical |
| Reporter: | Bibek Shrestha | Assignee: | Georg Richter |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | Compatibility | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Description |
| Comments |
| Comment by Georg Richter [ 2020-07-08 ] | ||||||||||||||||||||||
|
While it is a good idea to deliver session tracking information, it is quite a bad idea to remove the intermediate EOF packet, since applications which use unbuffered result sets will break ( text and binary protocol) Simple example:
Output:without CLIENT_DEPRECATED_EOF: with CLIENT_DEPRECATED_EOF: | ||||||||||||||||||||||
| Comment by Bibek Shrestha [ 2020-07-08 ] | ||||||||||||||||||||||
|
As per the docs, this works with unbuffered fetch too. The reason for the bad result above is you're not fetching results as per the docs. The mysql_use_result docs say: > When using mysql_use_result(), you must execute mysql_fetch_row() until a NULL value is returned, otherwise, the unfetched rows are returned as part of the result set for your next query. The C API gives the error Commands out of sync; you can't run this command now if you forget to do this! The following code returns right results with unbuffered fetch for example:
Output:
I tested this with my PR with CLIENT_DEPRECATE_EOF support in https://github.com/mariadb-corporation/mariadb-connector-c/pull/131. | ||||||||||||||||||||||
| Comment by Georg Richter [ 2020-07-08 ] | ||||||||||||||||||||||
|
I know that it works when fetching all rows to get the last ok packet, but this will break a lot of applications. | ||||||||||||||||||||||
| Comment by Georg Richter [ 2020-09-09 ] | ||||||||||||||||||||||
|
See also MySQL bug #100279 | ||||||||||||||||||||||
| Comment by Diego Dupin [ 2021-05-03 ] | ||||||||||||||||||||||
|
Won't do, because breaking existing application |