diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-09-22 11:11:36 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-09-22 11:11:36 +0500 |
commit | c8cf1e4eae76d6574be4516a6d53fe2af228de79 (patch) | |
tree | a1d98e6177658118fdb465426699d462b11aeaa3 /sql/derror.cc | |
parent | d2989680733c705f85f20add65ed635d96a8c82b (diff) | |
download | mariadb-git-c8cf1e4eae76d6574be4516a6d53fe2af228de79.tar.gz |
Bug 1350 fix
Diffstat (limited to 'sql/derror.cc')
-rw-r--r-- | sql/derror.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sql/derror.cc b/sql/derror.cc index 1a98b9ce371..a35893be4fc 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -67,10 +67,18 @@ static void read_texts(const char *file_name,const char ***point, goto err; /* purecov: inspected */ textcount=head[4]; + if (!head[30]) + { + sql_print_error("No character set information in '%s'. \ +You probably haven't reinstalled the latest file version.",name); + goto err1; + } + if (!(cset= get_charset(head[30],MYF(MY_WME)))) { - funktpos= 3; - goto err; + sql_print_error("Character set #%d is not supported for messagefile '%s'", + (int)head[30],name); + goto err1; } length=uint2korr(head+6); count=uint2korr(head+8); @@ -112,9 +120,6 @@ 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; @@ -125,9 +130,10 @@ err: buff="Can't find messagefile '%s'"; break; } + sql_print_error(buff,name); +err1: if (file != FERR) VOID(my_close(file,MYF(MY_WME))); - sql_print_error(buff,name); unireg_abort(1); } /* read_texts */ |