mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
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.
This commit is contained in:
parent
b4c7f5e670
commit
b600671f75
3 changed files with 4 additions and 23 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue