WL#10299: Change Server General tests to run with new default charset

Affects: Server-8.0   —   Status: Complete

We have added a new utf8mb4 collation, utf8mb4_800_ci_ai, which implemented the latest UCA (Unicode Collation Algorithm), UCA8.0.0. MySQL will use utf8mb4 as the new default character set. Most of the existing test cases assume the default character set is latin1 and default collation is latin1_swedish_ci. These tests either need to be recorded again or modified accordingly to run with the new default value, or made to run with latin1 if they cannot run with utf8mb4.

The low level design specification contains the list of all the failing tests. These tests need to modified to successfully run with the new default charset. The following MTR setting can be made:

In the mysql-test/include/default_mysqld.cnf, the following setting needs to be added: character-set-server= utf8mb4.

And in mysql-test/include/default_client.cnf replace all instances of default-character-set=latin1 with default-character-set=utf8mb4.

And in mysql-test/mysql-test-run.pl, the following diff needs to be applied:

diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index e784f8f..d70e892 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -4024,7 +4024,7 @@ sub mysql_install_db {
 
   # Create test database
   mtr_tofile($bootstrap_sql_file,
-            "CREATE DATABASE test;\n");
+            "CREATE DATABASE test DEFAULT CHARACTER SET utf8mb4;\n");
 
   # Create mtr database
   mtr_tofile($bootstrap_sql_file,

The test listed below fail due to result content mismatch of the charset, which is expected. The result needs to be verified before it is recorded.

S.No Test name Reason of failure Details Developer notes
2 sys_vars.character_set_client_basic Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
3 sys_vars.character_set_connection_basic Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
4 sys_vars.character_set_connection_func Result content mismatch Mismatch in the character_set_connection value. Fixed
5 sys_vars.character_set_database_basic Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
6 sys_vars.character_set_results_basic Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
7 sys_vars.character_set_results_func Result content mismatch Mismatch in the character_set_results value. Result needs to be updated. Fixed with --character_set latin1 in the test
8 sys_vars.character_set_server_basic Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
9 sys_vars.character_set_server_func Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
10 sys_vars.collation_connection_basic Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
11 sys_vars.collation_database_basic Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
12 sys_vars.collation_database_func Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
13 sys_vars.collation_server_basic Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
14 main.grant Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed in WL#10353
15 main.grant2 Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Result recorded
16 main.grant4 Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Result recorded
20 i_main.mysqlbinlog_ssl Result content mismatch Mismatch in the collation_server printed by mysqlbinlog.inc. Result needs to be updated. Result recorded in WL#10353
21 main.reset_connection Result content mismatch Mismatch in the charset. Result needs to be updated. Result recorded
22 main.mysqlpump_basic Result content mismatch Mismatch in the charset. Result needs to be updated. Result recorded
23 main.mysqlpump_extended Result content mismatch Mismatch in the charset. Result needs to be updated. Result recorded
24 main.plugin Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
25 test_service_sql_api.test_sql_sqlmode Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
26 test_service_sql_api.test_sql_stmt Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
27 test_service_sql_api.test_sql_views_triggers Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
28 main.ipv4_as_ipv6 Result content mismatch Mismatch in the charset value. Result needs to be updated. Some tables created with latin1
30 main.bug46760 Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
31 main.skip_grants Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
32 main.func_time Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
33 sys_vars.character_set_database_func Result content mismatch Mismatch in the charset value. Result needs to be updated. Fixed
34 main.func_system Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
35 i_main.partition_admin Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
36 main.func_test Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
37 sys_vars.default_tmp_storage_engine_basic Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
38 sys_vars.sql_quote_show_create_func Result content mismatch Mismatch in the charset printed by SHOW CREATE TABLE. Result needs to be updated. Fixed with --record on WL#7554 branch. commit 9bd6857
39 main.sp-ucs2 Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
40 main.parser_bug21114_innodb Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
41 perfschema.csv_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
42 main.constraints Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
43 main.ssl Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
44 perfschema.innodb_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
45 perfschema.indexed_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
46 main.ssl_compress Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
47 perfschema.memory_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
48 perfschema.merge_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
49 perfschema.multi_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
50 perfschema.view_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
51 perfschema.myisam_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
52 perfschema.part_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
53 perfschema.rollback_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
54 perfschema.temp_table_io Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
55 sysschema.pr_execute_prepared_stmt Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
56 sysschema.pr_ps_trace_statement_digest Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
57 main.func_gconcat Result content mismatch Mismatch in the charset value. Result needs to be updated. Fixed by setting --character_set latin1 in the test.
58 main.user_var Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
59 perfschema.binlog_edge_mix Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
60 perfschema.binlog_edge_stmt Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
61 perfschema.misc Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
62 sys_vars.character_set_client_func Syntax error Syntax error in the character used Used --character_set in the test
63 sys_vars.collation_server_func Syntax error Syntax error in the character used Used --character_set in the test
64 sys_vars.foreign_key_checks_basic Syntax error Syntax error in the character used Used --character_set in the test
65 sys_vars.innodb_table_locks_basic Syntax error Syntax error in the character used Used --character_set in the test
66 sys_vars.pseudo_slave_mode_basic Syntax error Syntax error in the character used Used --character_set in the test
67 sys_vars.query_cache_wlock_invalidate_basic Syntax error Syntax error in the character used Used --character_set in the test
68 sys_vars.sql_big_selects_basic Syntax error Syntax error in the character used Used --character_set in the test
69 sys_vars.sql_buffer_result_basic Syntax error Syntax error in the character used Used --character_set in the test
70 sys_vars.sql_log_bin_basic Syntax error Syntax error in the character used Used --character_set in the test
71 sys_vars.sql_log_off_basic Syntax error Syntax error in the character used Used --character_set in the test
72 sys_vars.sql_notes_basic Syntax error Syntax error in the character used Used --character_set in the test
73 sys_vars.sql_quote_show_create_basic Syntax error Syntax error in the character used Used --character_set in the test
74 sys_vars.sql_safe_updates_basic Syntax error Syntax error in the character used Used --character_set in the test
75 main.warnings Result content mismatch Mismatch in the charset value. Result needs to be updated. Result recorded
76 sys_vars.sql_warnings_basic Result content mismatch Test file needs to be recoded to utf8 Recoded test file

Tests that need further analysis:

S.No Test name Reason of failure Details Developer notes
2 sys_vars.collation_connection_func Result content mismatch Mismatch in the collation_connection value. Needs to be looked at to verify whether the expected value is printed. Fixed using --character_set latin1 in the test
3 test_service_sql_api.test_sql_complex Result content mismatch Mismatch in the charset and length. Must be looked at. Result recorded
5 main.func_group Result content mismatch Mismatch in EXPLAIN output Result recorded
7 sys_vars.max_sort_length_func Result content mismatch Mismatch in characters Result recorded
8 main.packet Mysqltest failure DELETE succeeded, should have failed Fixed
9 main.compare Result content mismatch Mismatch in the result Result recorded
10 main.sp-vars Result content mismatch Mismatch in warnings Result recorded
11 main.endspace Result content mismatch Mismatch in order of result Tables created with latin1
12 main.errors Result content mismatch Mismatch in errors Result recorded
13 main.func_aes Query failed UPDATE failed. Incorrect string value Fixed with
14 main.func_aes_misc Query failed INSERT failed. Incorrect string value Table created with latin1