[rygel] db: Don't set synchronous pragma on R/O dbs
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] db: Don't set synchronous pragma on R/O dbs
- Date: Sat, 5 Mar 2016 05:29:17 +0000 (UTC)
commit 66bbc9fd8f7d0ad1639ff8bd26174f9cd2c1281c
Author: Jens Georg <mail jensge org>
Date: Tue Mar 1 22:04:01 2016 +0100
db: Don't set synchronous pragma on R/O dbs
Signed-off-by: Jens Georg <mail jensge org>
src/librygel-db/database.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/librygel-db/database.vala b/src/librygel-db/database.vala
index af1f24d..77b0576 100644
--- a/src/librygel-db/database.vala
+++ b/src/librygel-db/database.vala
@@ -178,7 +178,9 @@ public class Rygel.Database.Database : Object, Initable {
debug ("Using database file %s", path);
- this.exec ("PRAGMA synchronous = OFF");
+ if (flags != Flags.READ_ONLY) {
+ this.exec ("PRAGMA synchronous = OFF");
+ }
if (Flags.SHARED in flags) {
this.exec ("PRAGMA journal_mode = WAL");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]