[MDEV-26105] MariaDB 10.6 cannot be used from C# client applications Created: 2021-07-07 Updated: 2023-03-24 Resolved: 2023-02-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 10.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Olivier Bertrand | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 6 |
| Labels: | regression-10.6 | ||
| Environment: |
Windows & Debian |
||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
This is because the character set 'utf8mb3' is not supported by the .Net Framework.
Setting 'old_mode=' made the t1 table work, but any SHOW commands will crash the client, even a simple command such as:
doesn't work. Note: Setting manually the variable character_set_results to anything other then utf8mb3 (which seems to be its default value) avoids these crashed but this should be also the result of the old_mode setting. It should be also possible to set the character_set_results variables in my.ini but on Windows 10 trying to do this fails. The server cannot be started saying "unknown variable character_set_results" or "unknow variable character-set-results" depending on what was used in my.ini. |
| Comments |
| Comment by Sergei Golubchik [ 2021-07-08 ] | |||
|
This is, of course, a deficiency of mysql-connector-net, not knowing utf8mb3 character set. But the question is, if there is an workaround for our users? If I understand you correctly, C# client can set the result charset, can it? if this is the case, then I would think it's a reasonable workaround, until MySQL adds utf8mb3 to their connector. | |||
| Comment by Olivier Bertrand [ 2021-07-08 ] | |||
|
Sure enough, I did it and it works (still requiring old_mode=) | |||
| Comment by Max Hayman [ 2021-07-28 ] | |||
|
Hello, I am also having this issue. I tried switching completly to utf8mb4 but I cant seem to make this issue disappear when doing something like "SELECT * FROM information_schema.TABLES WHERE TABLE_NAME = 'xxxx'" I tried setting the character set in the connection string but this seemed to happen consistently. I am using docker and have switched back down to 10.5. | |||
| Comment by Olivier Bertrand [ 2021-07-29 ] | |||
|
The system character set is used only internally by MariaDB and does not need to be changed. In my client program written in C# here is what I did after connecting to make it work with MariaDB 10.6:
in this command utf8 was defaulted to utf8mb4 by MariaDB due to the old_mode setting. That is the results charset that was causing problem with my program. | |||
| Comment by Sergei Golubchik [ 2021-11-22 ] | |||
|
Reported to MySQL as Bug #105516 | |||
| Comment by Alex [ 2022-11-29 ] | |||
|
Has been fixed with MySQL Connector/NET 8.0.28 which has been released 2022-01-18: https://dev.mysql.com/doc/relnotes/connector-net/en/news-8-0-28.html |