[MDEV-16082] character_set_client with MariaDB 10.2.14 Created: 2018-05-03  Updated: 2018-08-10  Resolved: 2018-05-31

Status: Closed
Project: MariaDB Server
Component/s: Configuration, Server
Affects Version/s: 10.2.14
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Aurélien LEQUOY Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Debian 9.4 + 10.2.14-MariaDB-10.2.14+maria~stretch-log



 Description   

in my.cnf

character_set_client = 'latin1'

in MariaDB

MariaDB [(none)]> show global variables like 'character_set_client';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| character_set_client | utf8  |
+----------------------+-------+
1 row in set (0.00 sec)

Why ? (i want put everything in utf-8 except character_set_client but look it's not possible anymore with my.cnf

the workaround :

MariaDB [(none)]> set global character_set_client = 'latin1';
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> show global variables like 'character_set_client';
+----------------------+--------+
| Variable_name        | Value  |
+----------------------+--------+
| character_set_client | latin1 |
+----------------------+--------+
1 row in set (0.00 sec)

full listing : (maybe it's bad, but my goal is only to upgrade the version of MariaDB), and put exactly the same configuration like it's was before.

MariaDB [(none)]> show global variables like 'character_%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | latin1                     |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)



 Comments   
Comment by Elena Stepanova [ 2018-05-31 ]

This is because character_set_client does not exist as a command-line or a config-file option, it is only a global/session variable.
The reason why the server doesn't refuse to start when you provide the non-existing option it is that historically by default it allows non-ambiguous option prefixes, and in this case it matches character-set-client-handshake option. You should be getting a note at the very beginning of the server startup like

2018-05-31 23:53:28 140268625447808 [Note] Using unique option prefix 'character-set-client' is error-prone and can break in the future. Please use the full name 'character-set-client-handshake' instead.

but since notes about options are written before the error log is initialized, they are often easy to miss.

In 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/library/server-system-variables/#character_set_client you see only

Description: Determines the character set for queries arriving from the client. It can be set per session by the client, although the server can be configured to ignore client requests with the --skip-character-set-client-handshake option. If the client does not request a character set, or requests a character set that the server does not support, the global value will be used. utf16, utf32 and ucs2 cannot be used as client character sets.
Scope: Global, Session
Dynamic: Yes
Data Type: string
Default Value: utf8 (>= MariaDB 5.5)

While in the previous option you'll see

bulk_insert_buffer_size¶
Description: Size in bytes of the per-thread cache tree used to speed up bulk inserts into MyISAM and Aria tables. A value of 0 disables the cache tree.
Commandline: --bulk-insert-buffer-size=#
Scope: Global, Session
Dynamic: Yes
Data Type: numeric
Default Value: 8388608
Range - 32 bit: 0 to 4294967295
Range - 64 bit: 0 to 18446744073709547520

Comment by Aurélien LEQUOY [ 2018-08-10 ]

it's should be add as config-file option no ?

Generated at Thu Feb 08 08:26:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.