Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15f5982
)
EDA/SQLite: Setting locking_mode to normal on closing DB to get rid of journal
author
Jerome St-Louis
<jerome@ecere.com>
Mon, 30 Sep 2013 08:45:41 +0000
(
04:45
-0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Mon, 30 Sep 2013 08:45:41 +0000
(
04:45
-0400)
- Also forcing locking_mode to exclusive on non-readonly DB for Linux where using system library without config option
eda/drivers/sqlite/EDASQLite.ec
patch
|
blob
|
history
diff --git
a/eda/drivers/sqlite/EDASQLite.ec
b/eda/drivers/sqlite/EDASQLite.ec
index
0b45c73
..
ceeadc9
100644
(file)
--- 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);
}