# HG changeset patch # User Kim Alvefur # Date 1739703127 -3600 # Node ID edd006093533dda2db186ef4686223c340d25924 # Parent 4a687745bb51e962a11faa4fbda4a4f9bc41a5f6 util.sql: Don't send SQLCipher key to Postgres or MySQL (thanks gllmhyt) This was copied from util.sqlite3 which only deals with SQLite3, but here Postgres or MySQL are also possibilities, which wouldn't support this. diff -r 4a687745bb51 -r edd006093533 util/sql.lua --- a/util/sql.lua Sat Feb 15 17:10:30 2025 +0000 +++ b/util/sql.lua Sun Feb 16 11:52:07 2025 +0100 @@ -84,7 +84,7 @@ dbh:autocommit(false); -- don't commit automatically self.conn = dbh; self.prepared = {}; - if params.password then + if params.driver == "SQLite3" and params.password then local ok, err = self:execute(("PRAGMA key='%s'"):format(dbh:quote(params.password))); if not ok then return ok, err;