Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3.32, 10.4.22, 10.5.13, 10.6.5
-
None
-
None
Description
The real default value of character_set_system is not shown in information_schema.SYSTEM_VARIABLES.
For example, see the following output on 10.6:
MariaDB [(none)]> SELECT VARIABLE_NAME, GLOBAL_VALUE, DEFAULT_VALUE FROM information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='character_set_system'\G |
*************************** 1. row ***************************
|
VARIABLE_NAME: CHARACTER_SET_SYSTEM
|
GLOBAL_VALUE: utf8mb3
|
DEFAULT_VALUE: NULL |
1 row in set (0.001 sec) |
The real default values are:
- Up to 10.5: "utf8"
- 10.6 and above: "utf8mb3"
This probably occurs because the code sets the default value to 0:
https://github.com/MariaDB/server/blob/mariadb-10.6.4/sql/sys_vars.cc#L787
And then the value is actually set during startup:
https://github.com/MariaDB/server/blob/mariadb-10.6.4/sql/mysqld.cc#L5454
Can the actual default be shown in information_schema.SYSTEM_VARIABLES?