1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

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.
This commit is contained in:
ingo@mysql.com
2004-12-23 20:11:38 +01:00
parent 1ea48a2dbf
commit c39be2d0e7
31 changed files with 518 additions and 56 deletions

View File

@@ -21,6 +21,7 @@
extern "C" {
#endif
void init_client_errs(void);
void finish_client_errs(void);
extern const char *client_errors[]; /* Error messages */
#ifdef __cplusplus
}
@@ -35,6 +36,9 @@ extern const char *client_errors[]; /* Error messages */
#endif
#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */
/* Do not add error numbers before CR_ERROR_FIRST. */
/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/
#define CR_UNKNOWN_ERROR 2000
#define CR_SOCKET_CREATE_ERROR 2001
#define CR_CONNECTION_ERROR 2002
@@ -90,3 +94,6 @@ extern const char *client_errors[]; /* Error messages */
#define CR_SECURE_AUTH 2049
#define CR_FETCH_CANCELED 2050
#define CR_NO_DATA 2051
#define CR_ERROR_LAST /*Copy last error nr:*/ 2051
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */