[CONC-462] mysql_optionsv option MYSQL_SET_CHARSET_NAME does not work for auto detection (MYSQL_AUTODETECT_CHARSET_NAME) Created: 2020-03-12 Updated: 2020-03-12 Resolved: 2020-03-12 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 3.1.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | David Ritter | Assignee: | Georg Richter |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows |
||
| Description |
| Comments |
| Comment by Georg Richter [ 2020-03-12 ] | |
|
The correct name for the character set is "auto", but not "MYSQL_AUTODETECT_CHARSET_NAME" - this is valid for MySQL and MariaDB: In the sources of MySQL you will find:
Your example seems to work with MySQL, since if the specified character set could not be found, the default character set will be used. For MySQL it's utf8mb4, for MariaDB it's latin1. Feel free to file a bug on bugs.mysql.com, since the documentation is wrong or misleading. | |
| Comment by David Ritter [ 2020-03-12 ] | |
|
My apologies. That is a typo on my part. I had been using the macro MYSQL_AUTODETECT_CHARSET_NAME and then switched to the string "auto" and when I posted the example forgot to remove the quotes when I switched it back. (I have updated the example accordingly) The output I pasted is from using the actual macro value and not the string "MYSQL_AUTODETECT_CHARSET_NAME" Additionally I am using a MySQL 5.7 server where latin1 was still the default character set. Do you still feel MySQL is in error? | |
| Comment by David Ritter [ 2020-03-12 ] | |
|
I have found the change in Connector/C version 3.0 that change the behavior. |