diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-09-17 16:22:58 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-09-17 16:22:58 +0500 |
commit | 34fc9b2b568ee9cac49f208d6b046f60907ec544 (patch) | |
tree | 298ca40ac1fef653ffff869aec7c52ecfd043b43 /sql/derror.cc | |
parent | abd0afa368e259da0d63d13bfdc6c0ded1f3edd5 (diff) | |
download | mariadb-git-34fc9b2b568ee9cac49f208d6b046f60907ec544.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; |