mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-38991: mysql system schema using my.cnf(configuration) character set
instead of utf8mb3 Analysis: When loading database options, missing values falls back to the dynamic server variable thd->variables.collation_server and hence it takes incorrect value. Fix: In case of missing values it should just take the default characterset.
This commit is contained in:
2
mysql-test/main/mdev_38991.opt
Normal file
2
mysql-test/main/mdev_38991.opt
Normal file
@@ -0,0 +1,2 @@
|
||||
--character-set-server=latin1
|
||||
--collation-server=latin1_swedish_ci
|
||||
9
mysql-test/main/mdev_38991.result
Normal file
9
mysql-test/main/mdev_38991.result
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# MDEV-38991: mysql system schema using my.cnf(configuration) character set instead of utf8mb3
|
||||
#
|
||||
SELECT schema_name, DEFAULT_CHARACTER_SET_NAME, default_collation_name FROM information_schema.schemata WHERE schema_name IN ('sys', 'information_schema', 'mysql', 'performance_schema');
|
||||
schema_name DEFAULT_CHARACTER_SET_NAME default_collation_name
|
||||
sys utf8mb3 utf8mb3_general_ci
|
||||
performance_schema utf8mb3 utf8mb3_general_ci
|
||||
mysql latin1 latin1_swedish_ci
|
||||
information_schema utf8mb3 utf8mb3_general_ci
|
||||
5
mysql-test/main/mdev_38991.test
Normal file
5
mysql-test/main/mdev_38991.test
Normal file
@@ -0,0 +1,5 @@
|
||||
--echo #
|
||||
--echo # MDEV-38991: mysql system schema using my.cnf(configuration) character set instead of utf8mb3
|
||||
--echo #
|
||||
|
||||
SELECT schema_name, DEFAULT_CHARACTER_SET_NAME, default_collation_name FROM information_schema.schemata WHERE schema_name IN ('sys', 'information_schema', 'mysql', 'performance_schema');
|
||||
@@ -671,7 +671,7 @@ err2:
|
||||
mysql_file_close(file, MYF(0));
|
||||
err1:
|
||||
if (!create->default_table_charset) // In case of error
|
||||
create->default_table_charset= thd->variables.collation_server;
|
||||
create->default_table_charset= default_charset_info;
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user