summaryrefslogtreecommitdiffstats
path: root/src/Database.cc
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2010-01-04 09:33:52 +0800
committerPeng Huang <shawn.p.huang@gmail.com>2010-01-04 09:33:52 +0800
commit0168e6e8d18455557e3412aef86f1d74cd643e9d (patch)
treef44bdffdc1cd1a21cd44cd09dbf3af6cf462c033 /src/Database.cc
parent5255574afea895f997c0c2dcca69826cb311c4cd (diff)
downloadibus-libpinyin-0168e6e8d18455557e3412aef86f1d74cd643e9d.tar.gz
ibus-libpinyin-0168e6e8d18455557e3412aef86f1d74cd643e9d.tar.xz
ibus-libpinyin-0168e6e8d18455557e3412aef86f1d74cd643e9d.zip
Remove some duplicate code.
Diffstat (limited to 'src/Database.cc')
-rw-r--r--src/Database.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Database.cc b/src/Database.cc
index a5f78f9..d214654 100644
--- a/src/Database.cc
+++ b/src/Database.cc
@@ -78,12 +78,12 @@ Database::init (void)
m_sql.erase (0);
-#if 0
+#if 1
/* Set synchronous=OFF, write user database will become much faster.
- * It will cause user database corrupted,
- * if the operatering system crashes or computer loses power.
+ * It will cause user database corrupted, if the operatering system
+ * crashes or computer loses power.
* */
- m_sql << "PRAGMA synchronous=OFF;\n";
+ m_sql << "PRAGMA synchronous=NORMAL;\n";
#endif
/* Set the cache size for better performance */
@@ -95,9 +95,6 @@ Database::init (void)
/* Set journal mode */
m_sql << "PRAGMA journal_mode=TRUNCATE;\n";
- /* Set the sync mode */
- m_sql << "PRAGMA synchronous=NORMAL;\n";
-
/* Using EXCLUSIVE locking mode on main database
* for better performance */
m_sql << "PRAGMA main.locking_mode=EXCLUSIVE;\n";