diff options
Diffstat (limited to 'storage/maria/ma_rnext.c')
-rw-r--r-- | storage/maria/ma_rnext.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/storage/maria/ma_rnext.c b/storage/maria/ma_rnext.c index 8f342c6a8d2..c7feded933e 100644 --- a/storage/maria/ma_rnext.c +++ b/storage/maria/ma_rnext.c @@ -34,7 +34,8 @@ int maria_rnext(MARIA_HA *info, byte *buf, int inx) if ((inx = _ma_check_index(info,inx)) < 0) DBUG_RETURN(my_errno); flag=SEARCH_BIGGER; /* Read next */ - if (info->lastpos == HA_OFFSET_ERROR && info->update & HA_STATE_PREV_FOUND) + if (info->cur_row.lastpos == HA_OFFSET_ERROR && + info->update & HA_STATE_PREV_FOUND) flag=0; /* Read first */ if (fast_ma_readinfo(info)) @@ -86,7 +87,7 @@ int maria_rnext(MARIA_HA *info, byte *buf, int inx) { if (!error) { - while (info->lastpos >= info->state->data_file_length) + while (info->cur_row.lastpos >= info->state->data_file_length) { /* Skip rows inserted by other threads since we got a lock */ if ((error= _ma_search_next(info,info->s->keyinfo+inx, @@ -110,9 +111,9 @@ int maria_rnext(MARIA_HA *info, byte *buf, int inx) } else if (!buf) { - DBUG_RETURN(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0); + DBUG_RETURN(info->cur_row.lastpos == HA_OFFSET_ERROR ? my_errno : 0); } - else if (!(*info->read_record)(info,info->lastpos,buf)) + else if (!(*info->read_record)(info, buf, info->cur_row.lastpos)) { info->update|= HA_STATE_AKTIV; /* Record is read */ DBUG_RETURN(0); |