summaryrefslogtreecommitdiff
path: root/myisam/mi_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'myisam/mi_cache.c')
-rw-r--r--myisam/mi_cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/myisam/mi_cache.c b/myisam/mi_cache.c
index 0aae316f23d..6c23916c645 100644
--- a/myisam/mi_cache.c
+++ b/myisam/mi_cache.c
@@ -76,7 +76,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
DBUG_PRINT("error",
("Error %d reading next-multi-part block (Got %d bytes)",
my_errno, info->error));
- if (!my_errno)
+ if (!my_errno || my_errno == -1)
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1);
}
@@ -93,7 +93,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
DBUG_PRINT("error",
("Error %d reading new block (Got %d bytes)",
my_errno, (int) read_length));
- if (!my_errno)
+ if (!my_errno || my_errno == -1)
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1);
}