diff options
author | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2021-02-15 01:39:37 +0530 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-05-19 06:48:36 +0200 |
commit | 2fdb556e045e9918410086eeaac5a94a4c028626 (patch) | |
tree | 1420013b4e76b3192cb8ac33406c818d3ecfc3af /client/mysqldump.c | |
parent | c366845a0b5c08285c958cf1500b3b7906ecf8d4 (diff) | |
download | mariadb-git-2fdb556e045e9918410086eeaac5a94a4c028626.tar.gz |
MDEV-8334: Rename utf8 to utf8mb3
This patch changes the main name of 3 byte character set from utf8 to
utf8mb3. New old_mode UTF8_IS_UTF8MB3 is added and set TRUE by default,
so that utf8 would mean utf8mb3. If not set, utf8 would mean utf8mb4.
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 13ecd205d9e..4fa15096777 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1327,7 +1327,8 @@ static int get_options(int *argc, char ***argv) } if (strcmp(default_charset, MYSQL_AUTODETECT_CHARSET_NAME) && !(charset_info= get_charset_by_csname(default_charset, - MY_CS_PRIMARY, MYF(MY_WME)))) + MY_CS_PRIMARY, + MYF(MY_UTF8_IS_UTF8MB3 | MY_WME)))) exit(1); if ((*argc < 1 && (!opt_alldbs && !opt_system)) || (*argc > 0 && opt_alldbs)) { @@ -1638,7 +1639,7 @@ static int switch_db_collation(FILE *sql_file, char quoted_db_buf[NAME_LEN * 2 + 3]; char *quoted_db_name= quote_name(db_name, quoted_db_buf, FALSE); - CHARSET_INFO *db_cl= get_charset_by_name(required_db_cl_name, MYF(0)); + CHARSET_INFO *db_cl= get_charset_by_name(required_db_cl_name, MYF(MY_UTF8_IS_UTF8MB3)); if (!db_cl) return 1; @@ -1669,7 +1670,7 @@ static int restore_db_collation(FILE *sql_file, char quoted_db_buf[NAME_LEN * 2 + 3]; char *quoted_db_name= quote_name(db_name, quoted_db_buf, FALSE); - CHARSET_INFO *db_cl= get_charset_by_name(db_cl_name, MYF(0)); + CHARSET_INFO *db_cl= get_charset_by_name(db_cl_name, MYF(MY_UTF8_IS_UTF8MB3)); if (!db_cl) return 1; |