mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
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.
This commit is contained in:
parent
9bae17a0bb
commit
037c70246d
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ function engine:connect()
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue