mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +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:
@@ -20,13 +20,15 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GLOB 0 /* Error maps */
|
||||
#define GLOBERRS 28 /* Max number of error messages in map's */
|
||||
#define EE(X) globerrs[ X ] /* Defines to add error to right map */
|
||||
#define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */
|
||||
#define EE(X) (globerrs[(X) - EE_ERROR_FIRST])
|
||||
|
||||
extern const char * NEAR globerrs[]; /* my_error_messages is here */
|
||||
|
||||
/* Error message numbers in global map */
|
||||
/* Do not add error numbers before EE_ERROR_FIRST. */
|
||||
/* If necessary to add lower numbers, change EE_ERROR_FIRST accordingly. */
|
||||
#define EE_ERROR_FIRST 0 /*Copy first error nr.*/
|
||||
#define EE_FILENOTFOUND 0
|
||||
#define EE_CANTCREATEFILE 1
|
||||
#define EE_READ 2
|
||||
@@ -54,6 +56,8 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */
|
||||
#define EE_CANT_SYMLINK 25
|
||||
#define EE_REALPATH 26
|
||||
#define EE_SYNC 27
|
||||
#define EE_ERROR_LAST 27 /*Copy last error nr.*/
|
||||
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
|
||||
|
||||
/* exit codes for all MySQL programs */
|
||||
|
||||
|
Reference in New Issue
Block a user