summaryrefslogtreecommitdiff
path: root/mysys/errors.c
diff options
context:
space:
mode:
authoringo@mysql.com <>2004-12-23 20:11:38 +0100
committeringo@mysql.com <>2004-12-23 20:11:38 +0100
commitc39be2d0e7e4df339617efc96e1a38aab36be82b (patch)
tree50e9e32282ae9dd90825e12f5be6e80b9e77f31f /mysys/errors.c
parent1ea48a2dbf197b3e49874deace2fff5fd7c4b34e (diff)
downloadmariadb-git-c39be2d0e7e4df339617efc96e1a38aab36be82b.tar.gz
WL#1895 - Print message to error log in case of detected MyISAM corruption
Changed my_error() to print error messages, which come from arbitrary registered ranges of error messages. Messages can be unregistered (and should be at end of the program). Added registration of handler error messages. Added a new mi_print_error() macro and a new mi_report_error() function, which supply error messages with a table name. Added calls to mi_print_error() or mi_report_error() at all places in MyISAM, where table corruption is detected.
Diffstat (limited to 'mysys/errors.c')
-rw-r--r--mysys/errors.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mysys/errors.c b/mysys/errors.c
index 5401c2b3cc6..5f548cad480 100644
--- a/mysys/errors.c
+++ b/mysys/errors.c
@@ -53,15 +53,13 @@ const char * NEAR globerrs[GLOBERRS]=
void init_glob_errs(void)
{
- my_errmsg[GLOB] = & globerrs[0];
-} /* init_glob_errs */
+ /* This is now done statically. */
+}
#else
void init_glob_errs()
{
- my_errmsg[GLOB] = & globerrs[0];
-
EE(EE_FILENOTFOUND) = "File '%s' not found (Errcode: %d)";
EE(EE_CANTCREATEFILE) = "Can't create/write to file '%s' (Errcode: %d)";
EE(EE_READ) = "Error reading file '%s' (Errcode: %d)";