summaryrefslogtreecommitdiff
path: root/myisam/mi_rkey.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 /myisam/mi_rkey.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 'myisam/mi_rkey.c')
-rw-r--r--myisam/mi_rkey.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/myisam/mi_rkey.c b/myisam/mi_rkey.c
index 12db00337ee..d564c672f19 100644
--- a/myisam/mi_rkey.c
+++ b/myisam/mi_rkey.c
@@ -78,6 +78,7 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
case HA_KEY_ALG_RTREE:
if (rtree_find_first(info,inx,key_buff,use_key_length,nextflag) < 0)
{
+ mi_print_error(info, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
goto err;
}