diff options
author | Monty <monty@mariadb.org> | 2016-04-06 01:18:38 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-04-06 01:18:38 +0300 |
commit | c0eebb831eb2fe5b18df830c5c7a4c1566028805 (patch) | |
tree | 2f05a82739dbfd57b5bcda0472564eb802db32f2 /sql/derror.cc | |
parent | cdd404311792302a27242ba1f210be3addda6405 (diff) | |
download | mariadb-git-c0eebb831eb2fe5b18df830c5c7a4c1566028805.tar.gz |
Fixed but when generating .sys files
Diffstat (limited to 'sql/derror.cc')
-rw-r--r-- | sql/derror.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/derror.cc b/sql/derror.cc index b3f0bacb3d8..b9b55c5b6e9 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -176,6 +176,7 @@ static bool check_error_mesg(const char *file_name, const char **errmsg) struct st_msg_file { uint sections; + uint max_error; uint errors; size_t text_length; }; @@ -224,10 +225,11 @@ static File open_error_msg_file(const char *file_name, const char *language, goto err; /* purecov: inspected */ ret->text_length= uint4korr(head+6); - ret->errors= uint2korr(head+10); - ret->sections= uint2korr(head+12); + ret->max_error= uint2korr(head+10); + ret->errors= uint2korr(head+12); + ret->sections= uint2korr(head+14); - if (ret->errors < error_messages || ret->sections != MAX_ERROR_RANGES) + if (ret->max_error < error_messages || ret->sections != MAX_ERROR_RANGES) { sql_print_error("\ Error message file '%s' had only %d error messages, but it should contain at least %d error messages.\nCheck that the above file is the right version for this program!", |