diff options
author | Daniel Black <daniel@mariadb.org> | 2023-03-08 12:27:31 +1100 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2023-03-10 08:53:58 +1100 |
commit | b600671f758cac2ed595b5342033c8f92921eade (patch) | |
tree | d82efb71d4c7bdd8b8c5cbea54429dce413a28da | |
parent | b4c7f5e670f5fa5e59295039937e516f0ab543da (diff) | |
download | mariadb-git-b600671f758cac2ed595b5342033c8f92921eade.tar.gz |
MDEV-30810 errmsg-utf8.txt no longer uses charsets
Charset names in the 'languages' line are not used any more.
Removing to avoid confusion.
All messages in errmsg-utf8.txt are in utf8 now.
Charset names should have been removed in MySQL-5.5 during: https://dev.mysql.com/worklog/task/?id=751
Bump version number.
-rw-r--r-- | extra/comp_err.c | 23 | ||||
-rw-r--r-- | sql/derror.cc | 2 | ||||
-rw-r--r-- | sql/share/errmsg-utf8.txt | 2 |
3 files changed, 4 insertions, 23 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c index 40562aeae5d..455f0d3c0d9 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -37,7 +37,7 @@ #define ERRORS_PER_RANGE 1000 #define MAX_SECTIONS 4 #define HEADER_LENGTH 32 /* Length of header in errmsg.sys */ -#define ERRMSG_VERSION 4 /* Version number of errmsg.sys */ +#define ERRMSG_VERSION 5 /* Version number of errmsg.sys */ #define DEFAULT_CHARSET_DIR "../sql/share/charsets" #define ER_PREFIX "ER_" #define ER_PREFIX2 "MARIA_ER_" @@ -85,7 +85,6 @@ struct languages { char *lang_long_name; /* full name of the language */ char *lang_short_name; /* abbreviation of the lang. */ - char *charset; /* Character set name */ struct languages *next_lang; /* Pointer to next language */ }; @@ -329,7 +328,7 @@ static int create_sys_files(struct languages *lang_head, uint error_count) { FILE *to; - uint csnum= 0, i, row_nr; + uint i, row_nr; ulong length; uchar head[HEADER_LENGTH]; char outfile[FN_REFLEN], *outfile_end; @@ -345,16 +344,6 @@ static int create_sys_files(struct languages *lang_head, */ for (tmp_lang= lang_head; tmp_lang; tmp_lang= tmp_lang->next_lang) { - - /* setting charset name */ - if (!(csnum= get_charset_number(tmp_lang->charset, MY_CS_PRIMARY, - MYF(MY_UTF8_IS_UTF8MB3)))) - { - fprintf(stderr, "Unknown charset '%s' in '%s'\n", tmp_lang->charset, - TXTFILE); - DBUG_RETURN(1); - } - outfile_end= strxmov(outfile, DATADIRECTORY, tmp_lang->lang_long_name, NullS); if (!my_stat(outfile, &stat_info,MYF(0))) @@ -410,7 +399,6 @@ static int create_sys_files(struct languages *lang_head, int2store(head + 10, max_error); /* Max error */ int2store(head + 12, row_nr); int2store(head + 14, section_count); - head[30]= csnum; my_fseek(to, 0l, MY_SEEK_SET, MYF(0)); if (my_fwrite(to, (uchar*) head, HEADER_LENGTH, MYF(MY_WME | MY_FNABP)) || @@ -450,7 +438,6 @@ static void clean_up(struct languages *lang_head, struct errors *error_head) next_language= tmp_lang->next_lang; my_free(tmp_lang->lang_short_name); my_free(tmp_lang->lang_long_name); - my_free(tmp_lang->charset); my_free(tmp_lang); } @@ -1113,12 +1100,6 @@ static struct languages *parse_charset_string(char *str) DBUG_RETURN(0); /* OOM: Fatal error */ DBUG_PRINT("info", ("short_name: %s", new_lang->lang_short_name)); - /* getting the charset name */ - str= skip_delimiters(str); - if (!(new_lang->charset= get_word(&str))) - DBUG_RETURN(0); /* Fatal error */ - DBUG_PRINT("info", ("charset: %s", new_lang->charset)); - /* skipping space, tab or "," */ str= skip_delimiters(str); } diff --git a/sql/derror.cc b/sql/derror.cc index 187d5bc20d2..455e57fd2d7 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -258,7 +258,7 @@ static File open_error_msg_file(const char *file_name, const char *language, goto err; error_pos=2; if (head[0] != (uchar) 254 || head[1] != (uchar) 254 || - head[2] != 2 || head[3] != 4) + head[2] != 2 || head[3] != 5) goto err; /* purecov: inspected */ ret->text_length= uint4korr(head+6); diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 072b1f353f7..7c27fa38ef1 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -1,4 +1,4 @@ -languages bulgarian=bgn cp1251, chinese=chi gbk, czech=cze latin2, danish=dan latin1, dutch=nla latin1, english=eng latin1, estonian=est latin7, french=fre latin1, georgian=geo utf8mb3, german=ger latin1, greek=greek greek, hindi=hindi utf8mb3, hungarian=hun latin2, italian=ita latin1, japanese=jpn ujis, korean=kor euckr, norwegian-ny=norwegian-ny latin1, norwegian=nor latin1, polish=pol latin2, portuguese=por latin1, romanian=rum latin2, russian=rus koi8r, serbian=serbian cp1250, slovak=slo latin2, spanish=spa latin1, swedish=swe latin1, ukrainian=ukr koi8u; +languages bulgarian=bgn, chinese=chi, czech=cze, danish=dan, dutch=nla, english=eng, estonian=est, french=fre, georgian=geo, german=ger, greek=greek, hindi=hindi, hungarian=hun, italian=ita, japanese=jpn, korean=kor, norwegian-ny=norwegian-ny, norwegian=nor, polish=pol, portuguese=por, romanian=rum, russian=rus, serbian=serbian, slovak=slo, spanish=spa, swedish=swe, ukrainian=ukr; default-language eng |