From bb7836181717fbf0f3570d335e90587fafcc1013 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 1 Sep 2016 16:45:59 +0200 Subject: [PATCH] owncloud --- etc/dbs.yaml | 2 ++ lib/php/db.php | 2 ++ lib/php/db/types/sqlite.php | 9 ++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/etc/dbs.yaml b/etc/dbs.yaml index 7ad22ea5..defbc91e 100644 --- a/etc/dbs.yaml +++ b/etc/dbs.yaml @@ -50,5 +50,7 @@ postfix: owncloud: host: /home/owncloud/data/owncloud.db + #host: /dev/shm/owncloud.db + #host: /opt/owncloud/data/owncloud.db type: sqlite default_table: oc_users diff --git a/lib/php/db.php b/lib/php/db.php index 757553db..93f494a3 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -137,6 +137,7 @@ class Db extends nb { function disconnect() { if (empty($this->conn)) return null; + #$this->conn->exec('COMMIT'); return $this->conn->close(); } @@ -175,6 +176,7 @@ class Db extends nb { foreach ($this->sql_exec() as $s) { $this->conn->exec($s); } + #$this->conn->exec('BEGIN'); # Create functions if ($this->type('sqliteCreateFunction')) { diff --git a/lib/php/db/types/sqlite.php b/lib/php/db/types/sqlite.php index 7d05b369..56d6117e 100644 --- a/lib/php/db/types/sqlite.php +++ b/lib/php/db/types/sqlite.php @@ -4,7 +4,14 @@ if (!class_exists('Db')) { exit; } $DB_TYPES['sqlite'] = array ( -'exec' => 'PRAGMA encoding = "'.strtoupper(Db::$encoding).'"', +'exec' => [ + 'PRAGMA encoding = "'.strtoupper(Db::$encoding).'"', + #'PRAGMA temp_store = 2', + #'PRAGMA read_uncommitted = false', + #'PRAGMA journal_mode = WAL', + #'PRAGMA journal_mode = MEMORY', + #'PRAGMA journal_mode = OFF', +], 'use_path' => true, 'extra_where' => 'denorm', -- 2.47.3