From 0168e6e8d18455557e3412aef86f1d74cd643e9d Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Mon, 4 Jan 2010 09:33:52 +0800 Subject: [PATCH] Remove some duplicate code. --- src/Database.cc | 11 ++++------- 1 file 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"; -- 2.7.4