diff options
author | bar@bar.mysql.r18.ru <> | 2003-09-17 16:22:58 +0500 |
---|---|---|
committer | bar@bar.mysql.r18.ru <> | 2003-09-17 16:22:58 +0500 |
commit | 731b8392eee5635bf1628e96f3cd4fac1f75dc29 (patch) | |
tree | 298ca40ac1fef653ffff869aec7c52ecfd043b43 /sql/derror.cc | |
parent | 87fb862ec5db7ed48ce5fb4f4db785d5cf96a108 (diff) | |
download | mariadb-git-731b8392eee5635bf1628e96f3cd4fac1f75dc29.tar.gz |
Charset number is now stored into error.sys by comp_err and loaded by mysqld.
Diffstat (limited to 'sql/derror.cc')
-rw-r--r-- | sql/derror.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/derror.cc b/sql/derror.cc index 7ebe6e4b3c5..1a98b9ce371 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -49,6 +49,7 @@ static void read_texts(const char *file_name,const char ***point, char name[FN_REFLEN]; const char *buff; uchar head[32],*pos; + CHARSET_INFO *cset; DBUG_ENTER("read_texts"); *point=0; // If something goes wrong @@ -65,6 +66,13 @@ static void read_texts(const char *file_name,const char ***point, head[2] != 2 || head[3] != 1) goto err; /* purecov: inspected */ textcount=head[4]; + + if (!(cset= get_charset(head[30],MYF(MY_WME)))) + { + funktpos= 3; + goto err; + } + length=uint2korr(head+6); count=uint2korr(head+8); if (count < error_messages) @@ -104,6 +112,9 @@ Check that the above file is the right version for this program!", err: switch (funktpos) { + case 3: + buff="Character set is not supported for messagefile '%s'"; + break; case 2: buff="Not enough memory for messagefile '%s'"; break; |