1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +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

@@ -3,6 +3,8 @@ drop table if exists t1;
# Test simple create of s3 table
#
create or replace table t1 (a int, b int, c varchar(1000), key (a), key(c)) engine=aria;
Warnings:
Note 1071 Specified key was too long; max key length is 2300 bytes
insert into t1 select seq, seq+10, repeat(char(65+ mod(seq, 20)),mod(seq,1000)) from seq_1_to_10000;
alter table t1 engine=s3;
show create table t1;
@@ -12,14 +14,14 @@ t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
`c` varchar(1000) DEFAULT NULL,
KEY `a` (`a`),
KEY `c` (`c`)
) ENGINE=S3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
KEY `c` (`c`(575))
) ENGINE=S3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
select * from information_schema.tables where table_schema="database" and table_name="t1";;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
def # t1 BASE TABLE S3 10 Page 10000 567 5677056 # 761856 0 NULL # # # latin1_swedish_ci NULL page_checksum=1 2305843009213685760 #
def # t1 BASE TABLE S3 10 Page 10000 567 5677056 # 385024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL page_checksum=1 2305843009213685760 #
show table status like "t1";
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
t1 S3 10 Page 10000 567 5677056 # 761856 0 NULL # # # latin1_swedish_ci NULL page_checksum=1 # N
t1 S3 10 Page 10000 567 5677056 # 385024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL page_checksum=1 # N
select a,b from t1 limit 10;
a b
1 11
@@ -101,8 +103,8 @@ t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
`c` varchar(1000) DEFAULT NULL,
KEY `a` (`a`),
KEY `c` (`c`)
) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
KEY `c` (`c`(575))
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
select a,b from t1 limit 10;
a b
1 11