From 432e427b5fe5e8e929f0b8c7c3325e6ce91eaa33 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Mon, 30 Sep 2013 04:45:41 -0400 Subject: [PATCH] EDA/SQLite: Setting locking_mode to normal on closing DB to get rid of journal - Also forcing locking_mode to exclusive on non-readonly DB for Linux where using system library without config option --- eda/drivers/sqlite/EDASQLite.ec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eda/drivers/sqlite/EDASQLite.ec b/eda/drivers/sqlite/EDASQLite.ec index 0b45c73..ceeadc9 100644 --- a/eda/drivers/sqlite/EDASQLite.ec +++ b/eda/drivers/sqlite/EDASQLite.ec @@ -205,6 +205,7 @@ class SQLiteDataSource : DataSourceDriver { if(createOptions != readOnly) { + sqlite3_exec(db, "PRAGMA locking_mode=exclusive", null, null, null); sqlite3_exec(db, "DELETE FROM eda_table_fields WHERE Name = 'lockDummy'", null, null, null); if(sqlite3_exec(db, "INSERT INTO eda_table_fields (Table_Name, Name, Type, Length) VALUES ('lockDummy', 'lockDummy', 'lockDummy', 'lockDummy')", null, null, null)) success = false; @@ -266,6 +267,7 @@ class SQLiteDatabase : Database ~SQLiteDatabase() { + sqlite3_exec(db, "PRAGMA locking_mode=normal", null, null, null); sqlite3_close(db); } -- 1.8.3.1