summaryrefslogtreecommitdiff
path: root/sql/derror.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-10-21 16:05:17 +0500
committerunknown <hf@deer.(none)>2003-10-21 16:05:17 +0500
commit8d94e500e025fb5626df12c8183e8ab14c74e624 (patch)
tree6bd29233c656d8429437a224f9c3588a94963cb4 /sql/derror.cc
parentd894f23372ad7abd1efd108562574b4d15dd0709 (diff)
downloadmariadb-git-8d94e500e025fb5626df12c8183e8ab14c74e624.tar.gz
Fix for Windows bug reported throuhg Miguel
libmysqld/lib_sql.cc: This code seems to be superfluous sql/derror.cc: in embedded server these functions should return the sign of the error instead of halting the program sql/init.cc: my_abort_hook left unchanged sql/mysql_priv.h: declaration of init_errmessage changed unireg_abort was replaced with DBUG_RETURN for embedded server sql/mysqld.cc: these functions don't work in embedded server thus #ifdef-ed
Diffstat (limited to 'sql/derror.cc')
-rw-r--r--sql/derror.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/derror.cc b/sql/derror.cc
index 78efdcc33f3..7f4068c487e 100644
--- a/sql/derror.cc
+++ b/sql/derror.cc
@@ -20,27 +20,28 @@
#include "mysql_priv.h"
#include "mysys_err.h"
-static void read_texts(const char *file_name,const char ***point,
+static bool read_texts(const char *file_name,const char ***point,
uint error_messages);
static void init_myfunc_errs(void);
/* Read messages from errorfile */
-void init_errmessage(void)
+bool init_errmessage(void)
{
DBUG_ENTER("init_errmessage");
- read_texts(ERRMSG_FILE,&my_errmsg[ERRMAPP],ER_ERROR_MESSAGES);
+ if (read_texts(ERRMSG_FILE,&my_errmsg[ERRMAPP],ER_ERROR_MESSAGES))
+ DBUG_RETURN(TRUE);
errmesg=my_errmsg[ERRMAPP]; /* Init global variabel */
init_myfunc_errs(); /* Init myfunc messages */
- DBUG_VOID_RETURN;
+ DBUG_RETURN(FALSE);
}
/* Read text from packed textfile in language-directory */
/* If we can't read messagefile then it's panic- we can't continue */
-static void read_texts(const char *file_name,const char ***point,
+static bool read_texts(const char *file_name,const char ***point,
uint error_messages)
{
register uint i;
@@ -116,7 +117,7 @@ Check that the above file is the right version for this program!",
point[i]= *point +uint2korr(head+10+i+i);
}
VOID(my_close(file,MYF(0)));
- DBUG_VOID_RETURN;
+ DBUG_RETURN(FALSE);
err:
switch (funktpos) {