summaryrefslogtreecommitdiff
path: root/storage/maria/ma_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/ma_cache.c')
-rw-r--r--storage/maria/ma_cache.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/storage/maria/ma_cache.c b/storage/maria/ma_cache.c
index 36dfe7cbd54..829189baeed 100644
--- a/storage/maria/ma_cache.c
+++ b/storage/maria/ma_cache.c
@@ -35,8 +35,8 @@
#include "maria_def.h"
-my_bool _ma_read_cache(IO_CACHE *info, uchar *buff, my_off_t pos,
- size_t length, uint flag)
+my_bool _ma_read_cache(MARIA_HA *handler, IO_CACHE *info, uchar *buff,
+ my_off_t pos, size_t length, uint flag)
{
size_t read_length,in_buff_length;
my_off_t offset;
@@ -98,7 +98,12 @@ my_bool _ma_read_cache(IO_CACHE *info, uchar *buff, my_off_t pos,
("Error %d reading next-multi-part block (Got %d bytes)",
my_errno, (int) read_length));
if (!my_errno || my_errno == HA_ERR_FILE_TOO_SHORT)
- my_errno= HA_ERR_WRONG_IN_RECORD;
+ {
+ if (!handler->in_check_table)
+ _ma_set_fatal_error(handler->s, HA_ERR_WRONG_IN_RECORD);
+ else
+ my_errno= HA_ERR_WRONG_IN_RECORD;
+ }
DBUG_RETURN(1);
}
bzero(buff+read_length,MARIA_BLOCK_INFO_HEADER_LENGTH - in_buff_length -