diff options
author | ingo@mysql.com <> | 2004-12-23 20:11:38 +0100 |
---|---|---|
committer | ingo@mysql.com <> | 2004-12-23 20:11:38 +0100 |
commit | c39be2d0e7e4df339617efc96e1a38aab36be82b (patch) | |
tree | 50e9e32282ae9dd90825e12f5be6e80b9e77f31f /include/my_base.h | |
parent | 1ea48a2dbf197b3e49874deace2fff5fd7c4b34e (diff) | |
download | mariadb-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 'include/my_base.h')
-rw-r--r-- | include/my_base.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/my_base.h b/include/my_base.h index 4d043cf6b5b..7c4c6d521ab 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -273,6 +273,9 @@ enum ha_base_keytype { /* Errorcodes given by functions */ /* opt_sum_query() assumes these codes are > 1 */ +/* Do not add error numbers before HA_ERR_FIRST. */ +/* If necessary to add lower numbers, change HA_ERR_FIRST accordingly. */ +#define HA_ERR_FIRST 120 /*Copy first error nr.*/ #define HA_ERR_KEY_NOT_FOUND 120 /* Didn't find key on read or update */ #define HA_ERR_FOUND_DUPP_KEY 121 /* Dupplicate key on write */ #define HA_ERR_RECORD_CHANGED 123 /* Uppdate with is recoverable */ @@ -308,6 +311,9 @@ enum ha_base_keytype { #define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */ #define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */ #define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */ +#define HA_ERR_LAST 157 /*Copy last error nr.*/ +/* Add error numbers before HA_ERR_LAST and change it accordingly. */ +#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) /* Other constants */ |