[MDEV-26107] Cannot set character_set variables in my.ini Created: 2021-07-07 Updated: 2023-10-04 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Variables |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Olivier Bertrand | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
According to the documentation, trying to set the variable character_set_results should done by something like:
But trying to start the server fails:
This happens with all character set variables. Other variables can be set without problems. |
| Comments |
| Comment by Alice Sherepa [ 2021-07-08 ] | |
|
This is because character-set-results does not exist as a command-line or a config-file option, it is only a global/session variable. In the documentation, the absence of a command-line/config-file capability can be recognized by not having a line "Commandline" in the description, e.g. here ( https://mariadb.com/kb/en/server-system-variables/#character_set_results ), while the next one - character_set_server - has "Commandline: --character-set-server" | |
| Comment by Olivier Bertrand [ 2021-07-08 ] | |
|
Well, I understand. However, it is needed for C# client applications (see | |
| Comment by Sergei Golubchik [ 2021-07-08 ] | |
|
for mysql command line client it's the option --default-character=set that sets character_set_result. For mysql-conector-net supposedly one can specify charset as a connection option, like "server=127.0.0.1;uid=root;pwd=12345;charset=utf8mb4". | |
| Comment by Olivier Bertrand [ 2021-07-08 ] | |
|
Of course it is a client option. Trying to set --default-character-set when starting the server fails. Specifying character set
Note that resultsets still are returned in the character set of the data returned. |