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

Support sqlite builds with DQS=off #311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

knz
Copy link

@knz knz commented Apr 3, 2024

If sqlite3 is built with double-quoted string literals disabled (which is recommended, see https://www.sqlite.org/compile.html#dqs), diskcache starts failing with the following crypting error:

no such column: "size"

This is because the syntax WHERE key = "size" in standard SQL refers to a column named "size", not a string literal. Parsing this as a string literal is a conditional sqlite extension.

This patch makes the code more robust by avoiding this optional sqlite feature.

If sqlite3 is built with double-quoted string literals disabled (which
is recommended, see https://www.sqlite.org/compile.html#dqs),
diskcache starts failing with the following crypting error:

```
no such column: "size"
```

This is because the syntax `WHERE key = "size"` in standard SQL refers
to a column named "size", not a string literal. Parsing this as a
string literal is a conditional sqlite extension.

This patch makes the code more robust by avoiding this optional sqlite
feature.
@knz
Copy link
Author

knz commented Apr 17, 2024

cc @grantjenks

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request May 22, 2024
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.

None yet

1 participant