summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorbar@bar.mysql.r18.ru <>2003-09-23 10:41:58 +0500
committerbar@bar.mysql.r18.ru <>2003-09-23 10:41:58 +0500
commita5cc38fa014aefe7898ad3dc67a7ca63e5402e56 (patch)
treede9b51e4fbd6f3aa828d4285a5e3368f72d46a94 /mysys
parent88a3651d7604a05a50c02843a51bf38cc361f5ee (diff)
downloadmariadb-git-a5cc38fa014aefe7898ad3dc67a7ca63e5402e56.tar.gz
charset.c:
comp_err failed to compile error message file when a character set was not incompiled.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/charset.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysys/charset.c b/mysys/charset.c
index a485835b636..7d0516ac81b 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -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;