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

Fix index creation and lookup logic #15527

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

JoeOsborn
Copy link
Contributor

This patch fixes some bugs and changes some behavior around RDB databases.

Behavior changes:

  1. libretrodb_create_index now will not create an index if another index with the same name exists already.
  2. Indexes can be created on keys for which not every item in the database has a value

Bug fixes:

  1. Databases were open read-only before, so creating an index was a no-op
  2. Item locations were bogus in the index
  3. Item locations were written into the index in a bogus way (casting and order of operations on pointer math)
  4. Binary search offsets were computed in a bogus way (same)

@LibretroAdmin LibretroAdmin merged commit 05b14ec into libretro:master Jul 27, 2023
22 checks passed
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

Successfully merging this pull request may close these issues.

2 participants