[MDEV-27166] Default value of character_set_system is not correct in information_schema.SYSTEM_VARIABLES Created: 2021-12-03  Updated: 2021-12-13

Status: Open
Project: MariaDB Server
Component/s: Configuration, Information Schema, Variables
Affects Version/s: 10.3.32, 10.4.22, 10.5.13, 10.6.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: 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?


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