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 GRDB 5 regression with indexes on expressions #841

Merged
merged 4 commits into from Sep 27, 2020
Merged

Conversation

groue
Copy link
Owner

@groue groue commented Sep 26, 2020

This pull request fixes #840, and the Database.indexes(on:) method.

Since its introduction, Database.indexes(on:) had a bug which would make it crash with indexes on expressions.

Now Database.indexes(on:) no longer crashes, and just excludes such indexes from its result.

It happens that this bug has introduced regressions in GRDB 5, which would crash when running some query interface requests on tables indexed on an expression. The reason in that GRDB 5 performs a more precise analysis of requests in order to optimize the generated SQL or detect misuses, and querying indexes is part of this analysis.

@groue groue added the bug label Sep 26, 2020
@groue groue linked an issue Sep 26, 2020 that may be closed by this pull request
@groue groue merged commit ef368a2 into development Sep 27, 2020
@groue groue deleted the dev/840 branch September 27, 2020 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unique Index with function raises Fatal Error
1 participant