diff options
author | Michael Widenius <monty@askmonty.org> | 2011-01-11 14:29:19 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-01-11 14:29:19 +0200 |
commit | e6ba9d285aa41bb3d691cba7445b9b5479e34eaf (patch) | |
tree | d2a23d240e4766837f89aa5f6d238db49fc28c1f /storage/maria/ma_search.c | |
parent | 2eaa76b84426b19f8574876ad1fa85ae6cfe3196 (diff) | |
parent | 9ae7fb96b064b9bc9b0a8299a50422d0b5be76cf (diff) | |
download | mariadb-git-e6ba9d285aa41bb3d691cba7445b9b5479e34eaf.tar.gz |
automatic merge with 5.1
Diffstat (limited to 'storage/maria/ma_search.c')
-rw-r--r-- | storage/maria/ma_search.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/maria/ma_search.c b/storage/maria/ma_search.c index 61ac1c6c23b..45592f101ed 100644 --- a/storage/maria/ma_search.c +++ b/storage/maria/ma_search.c @@ -44,8 +44,12 @@ int _ma_check_index(MARIA_HA *info, int inx) info->update= ((info->update & (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED)) | HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND); } - if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache)) + if ((info->opt_flag & WRITE_CACHE_USED) && flush_io_cache(&info->rec_cache)) + { + if (unlikely(!my_errno)) + my_errno= HA_ERR_INTERNAL_ERROR; /* Impossible */ return(-1); + } return(inx); } /* _ma_check_index */ @@ -97,6 +101,7 @@ int _ma_search(register MARIA_HA *info, MARIA_KEY *key, uint32 nextflag, @note Position to row is stored in info->lastpos + Last used key is stored in info->last_key @return @retval 0 ok (key found) @@ -122,6 +127,7 @@ static int _ma_search_no_save(register MARIA_HA *info, MARIA_KEY *key, (ulong) (pos / info->s->block_size), nextflag, (ulong) info->cur_row.lastpos)); DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, key);); + DBUG_ASSERT(info->last_key.keyinfo == key->keyinfo); if (pos == HA_OFFSET_ERROR) { |