Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursors with prefixes #167

Open
os12 opened this issue Sep 9, 2018 · 2 comments
Open

Cursors with prefixes #167

os12 opened this issue Sep 9, 2018 · 2 comments

Comments

@os12
Copy link

os12 commented Sep 9, 2018

I've just hit an issue when iterating over records using a prefix. The issue comes up when keys have the following structure:

for (....)
    sprintf(buffer, "log:%08x:%08x:record%u", i, i, i);
    sp_setstring(o, "key", buffer, strlen(buffer)

I've just reduced the issue to a minimal test and will open a PR.

Dmitry, could you take a look please? What am I missing?

@os12
Copy link
Author

os12 commented Sep 16, 2018

Please see d0a5bfb - I got a repro with the existing test.

@coleifer
Copy link

Presumably the database needs to jump to the last key before it begins iteration, and this isn't happening when it encounters a prefix (?).

coleifer added a commit to coleifer/sophy that referenced this issue Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants