mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
Merge c3286ff5b2 into 138263a1b4
This commit is contained in:
commit
05d02caefc
1 changed files with 10 additions and 4 deletions
14
src/rax.c
14
src/rax.c
|
|
@ -1683,8 +1683,11 @@ int raxSeek(raxIterator *it, const char *op, unsigned char *ele, size_t len) {
|
|||
if (nodechar > keychar) {
|
||||
if (!raxIteratorNextStep(it,0)) return 0;
|
||||
} else {
|
||||
if (!raxIteratorAddChars(it,it->node->data,it->node->size))
|
||||
return 0;
|
||||
it->node = raxStackPop(&it->stack);
|
||||
if (it->key_len == 0) {
|
||||
it->flags |= RAX_ITER_EOF;
|
||||
return 1;
|
||||
}
|
||||
if (!raxIteratorNextStep(it,1)) return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1697,8 +1700,11 @@ int raxSeek(raxIterator *it, const char *op, unsigned char *ele, size_t len) {
|
|||
if (!raxSeekGreatest(it)) return 0;
|
||||
it->data = raxGetData(it->node);
|
||||
} else {
|
||||
if (!raxIteratorAddChars(it,it->node->data,it->node->size))
|
||||
return 0;
|
||||
it->node = raxStackPop(&it->stack);
|
||||
if (it->key_len == 0) {
|
||||
it->flags |= RAX_ITER_EOF;
|
||||
return 1;
|
||||
}
|
||||
if (!raxIteratorPrevStep(it,1)) return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue