1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-19123 Change default charset from latin1 to utf8mb4

Changing the default server character set from latin1 to utf8mb4.
This commit is contained in:
Alexander Barkov
2024-05-28 09:08:51 +04:00
parent a2a5ba14a8
commit 36eba98817
1713 changed files with 31563 additions and 30549 deletions

View File

@ -10,7 +10,7 @@ Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(10) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci UNION=(`t1`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci UNION=(`t1`)
flush tables;
alter table t1 modify a varchar(10) not null;
show create table t2;
@ -18,5 +18,5 @@ Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(10) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci UNION=(`t1`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci UNION=(`t1`)
drop table if exists t1, t2;

View File

@ -1,3 +1,4 @@
ALTER DATABASE test CHARACTER SET latin1 COLLATE latin1_swedish_ci;
set @save_default_storage_engine=@@global.default_storage_engine;
set global default_storage_engine=myisam;
set session default_storage_engine=myisam;
@ -185,7 +186,7 @@ ERROR HY000: Unable to open underlying table which is differently defined or of
flush tables;
select * from t4;
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
create database mysqltest;
create database mysqltest character set latin1;
create table mysqltest.t6 (a int not null primary key auto_increment, message char(20));
create table t5 (a int not null, b char(20), key(a)) engine=MERGE UNION=(test.t1,mysqltest.t6);
show create table t5;
@ -2312,7 +2313,7 @@ SHOW CREATE TABLE `test/1`.m1;
Table Create Table
m1 CREATE TABLE `m1` (
`a` int(11) DEFAULT NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci UNION=(`t/1`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci UNION=(`t/1`)
DROP TABLE `test/1`.m1;
DROP TABLE `test/1`.`t/1`;
CREATE TEMPORARY TABLE `test/1`.`t/1`(a INT);
@ -2332,7 +2333,7 @@ SHOW CREATE TABLE `test/1`.m1;
Table Create Table
m1 CREATE TEMPORARY TABLE `m1` (
`a` int(11) DEFAULT NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci UNION=(`t/1`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci UNION=(`t/1`)
DROP TABLE `test/1`.m1;
DROP TABLE `test/1`.`t/1`;
DROP DATABASE `test/1`;
@ -4002,3 +4003,4 @@ UPDATE v1 SET a=0;
DROP VIEW v1;
DROP TABLE t1;
# End of 11.1 tests
ALTER DATABASE test CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;

View File

@ -2,6 +2,8 @@
# Test of MERGE TABLES
#
--source include/test_db_charset_latin1.inc
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc
@ -65,7 +67,7 @@ select * from t4;
#
# Test tables in different databases
#
create database mysqltest;
create database mysqltest character set latin1;
create table mysqltest.t6 (a int not null primary key auto_increment, message char(20));
create table t5 (a int not null, b char(20), key(a)) engine=MERGE UNION=(test.t1,mysqltest.t6);
show create table t5;
@ -2960,3 +2962,5 @@ DROP VIEW v1;
DROP TABLE t1;
--echo # End of 11.1 tests
--source include/test_db_charset_restore.inc