mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
charset.c:
comp_err failed to compile error message file when a character set was not incompiled. mysys/charset.c: comp_err failed to compile error message file when a character set was not incompiled.
This commit is contained in:
parent
cdd3acc7e1
commit
2d7beead44
1 changed files with 14 additions and 0 deletions
|
@ -307,9 +307,23 @@ static int add_collation(CHARSET_INFO *cs)
|
|||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
We need the below to make get_charset_name()
|
||||
and get_charset_number() working even if a
|
||||
character set has not been really incompiled.
|
||||
The above functions are used for example
|
||||
in error message compiler extra/comp_err.c.
|
||||
If a character set was compiled, this information
|
||||
will get lost and overwritten in add_compiled_collation().
|
||||
*/
|
||||
CHARSET_INFO *dst= all_charsets[cs->number];
|
||||
dst->number= cs->number;
|
||||
if (cs->comment)
|
||||
dst->comment= my_once_strdup(cs->comment,MYF(MY_WME));
|
||||
if (cs->csname)
|
||||
dst->csname= my_once_strdup(cs->csname,MYF(MY_WME));
|
||||
if (cs->name)
|
||||
dst->name= my_once_strdup(cs->name,MYF(MY_WME));
|
||||
}
|
||||
cs->number= 0;
|
||||
cs->primary_number= 0;
|
||||
|
|
Loading…
Reference in a new issue