diff options
Diffstat (limited to 'myisam/mi_cache.c')
-rw-r--r-- | myisam/mi_cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/myisam/mi_cache.c b/myisam/mi_cache.c index 0e630cae22b..69a1cb0d7a5 100644 --- a/myisam/mi_cache.c +++ b/myisam/mi_cache.c @@ -73,7 +73,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length, if (!(flag & READING_HEADER) || info->error == -1 || (uint) info->error+in_buff_length < 3) { - if (!my_errno) + if (!my_errno || my_errno == -1) my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); } @@ -87,7 +87,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length, if (!(flag & READING_HEADER) || (int) read_length == -1 || read_length+in_buff_length < 3) { - if (!my_errno) + if (!my_errno || my_errno == -1) my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); } |