Bug #117608 | Connector/C 9.1 reports wrong sizes for TEXT columns | ||
---|---|---|---|
Submitted: | 2 Mar 17:10 | Modified: | 23 Mar 7:13 |
Reporter: | Sruli Ganor | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | Connector / C | Severity: | S1 (Critical) |
Version: | 9.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[2 Mar 17:10]
Sruli Ganor
[4 Mar 10:41]
Sruli Ganor
The issue occurs in both Windows and Linux.
[4 Mar 10:47]
Sruli Ganor
We tried connector 9.2 and got the same results.
[6 Mar 16:59]
MySQL Verification Team
Hi, I am checking if this is improperly documented incompatible change or a bug. If you can share the test source code it will speed things up, thanks.
[23 Mar 7:13]
Sruli Ganor
Hi, could you please update what is the status of this issue? It's still blocking us from using versions 9.x of the Connector. On the other hand, we can't continue using the earlier versions due to their known vulnerabilities. Thanks
[23 Mar 10:45]
MySQL Verification Team
Behavior is verified but connector team has not decided how to go about it as these changes are related to standardization and this change was intentional. The connector team will update the report when they have the decision. Nothing about it will happen quickly.
[24 Mar 10:35]
Rafal Somla
Posted by developer: We agree there is a regression in column size reporting. This is most likely due to a recent change in how the driver handles translation of character data to the connection charset. We changed it to do the conversions in the server rather than by the driver but, apparently, it has these unwanted side effects. We will look into how to fix this. Note that connection charset should be configured using CHARSET connection option, not by setting character_set_xxx session variables (or by SET NAMES). Changing these session variables can produce inconsistent results. Note also that connection charset can be configured only for the ANSI variant of the driver. For Unicode variant the connection charset is always UTF8 and can not be modified (the driver converts it to UTF16 for wide character strings as needed). If you want to receive raw character data without any conversions you must use ANSI driver with CHARSET=binary option and bind your buffers as binary.
[24 Mar 10:38]
Rafal Somla
Posted by developer: Note: We also believe that if you follow the advice and use the ANSI driver with CHARSET=binary then the reported column sizes should be more as you expect. So this could be a workaround for you.