-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Due to a change in SQLite's behaviour in version 3.48.0 it is no longer possible to locate the cipher configuration table via an SQL function. A named connection parameter is now used for this purpose.
- Loading branch information
Showing
4 changed files
with
26 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d9767c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean
SQL Functions
, as described in The Docs, no longer work?I'm getting failure to open errors when updating from
2.0.1
to2.0.2
now.EDIT: I switched from using
SELECT sqlite3mc_config(...)
toPRAGMA {temp/main}.{name} = {value}
and everything is working fine now.d9767c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no.
Yes: The SQL configuration functions can't be used any longer for configuring the cipher scheme before issuing the
PRAGMA key
statement. The reason is that starting with SQLite 3.48.0 executing aSELECT
statement will now always access the underlying database file. For encrypted databases this will fail, because the cipher scheme is not yet activated.No: However, after the cipher scheme was activated successfully with
PRAGMA key
the SQL configuration functions can be used, for example, to configure a cipher scheme for attaching encrypted databases.Yes, using
PRAGMA
statements to configure the cipher scheme is the way to go. An alternative is to specify the cipher configuration via URI parameters.The SQL functions for configuring the cipher scheme exist mostly for historical reasons. For SQLite versions below 3.32.0 the SQLite code contained stubs for the encryption API - no need to patch the SQLite code, but also no way to handle own
PRAGMA
statements. Back then usingSELECT
with user-defined SQL functions was the only way to configure the cipher scheme without having to patch the SQLite code.I will have to update the documentation accordingly. Actually, the change in SQLite's behaviour caught me off guard. I hadn't expected that suddenly schema-independent SQL functions would not work anymore for configuring the encryption extension. In the SQLite 3.48.0 release notes there was no hint about such a change.