Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit26a9438

Browse files
author
Artur Zakirov
committed
Issue#13. Fix forgot offset increments.
1 parent85a4291 commit26a9438

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎src/rumget.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -833,11 +833,8 @@ entryGetNextItem(RumState * rumstate, RumScanEntry entry)
833833
* It's needed to go by right link. During that we should refind
834834
* first ItemPointer greater that stored
835835
*/
836-
if ((ScanDirectionIsForward(entry->scanDirection)&&RumPageRightMost(page))
837-
||
836+
if ((ScanDirectionIsForward(entry->scanDirection)&&RumPageRightMost(page))||
838837
(ScanDirectionIsBackward(entry->scanDirection)&&RumPageLeftMost(page)))
839-
840-
841838
{
842839
UnlockReleaseBuffer(entry->buffer);
843840
ItemPointerSetInvalid(&entry->curRumKey.iptr);
@@ -895,6 +892,7 @@ entryGetNextItem(RumState * rumstate, RumScanEntry entry)
895892
}
896893

897894
entry->curRumKey=entry->list[entry->offset];
895+
entry->offset+=entry->scanDirection;
898896
return;
899897
}
900898
}
@@ -1039,8 +1037,8 @@ entryGetNextItemList(RumState * rumstate, RumScanEntry entry)
10391037

10401038
Assert(entry->nlist>0);
10411039

1042-
entry->offset++;
1043-
entry->curRumKey=entry->list[entry->offset-1];
1040+
entry->curRumKey=entry->list[entry->offset];
1041+
entry->offset+=entry->scanDirection;
10441042

10451043
/*
10461044
* Done with this entry, go to the next for the future.
@@ -1601,6 +1599,7 @@ scanPage(RumState * rumstate, RumScanEntry entry, RumKey *item,
16011599

16021600
end:
16031601
entry->curRumKey=entry->list[entry->offset];
1602+
entry->offset+=entry->scanDirection;
16041603
return true;
16051604
}
16061605

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp