summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authoryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-02 05:38:16 +0000
committeryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-02 05:38:16 +0000
commitfdc30615f7849eddcea3662f80074e7aba28adea (patch)
tree40de9ac7db36581e879f804efb31e25805c7ab1d /chrome/common
parent25a5dcb7ce35ca15a9e4db1c13e8ec0db3b387b4 (diff)
downloadchromium_src-fdc30615f7849eddcea3662f80074e7aba28adea.zip
chromium_src-fdc30615f7849eddcea3662f80074e7aba28adea.tar.gz
chromium_src-fdc30615f7849eddcea3662f80074e7aba28adea.tar.bz2
Fix: Spurious SQL error message is logged in priming SQLite database cache.
This patch depends on the MetaTableHelper refactoring in: http://codereview.chromium.org/150094 Currently, a spurious SQL error message is logged every time a unit test that access SQLite database runs. Example: [----------] 6 tests from HistoryBackendTest [ RUN ] HistoryBackendTest.Loaded [5660:5304:0630/150705:414864129:ERROR:sqlite_utils.cc(204)] SQLStatement.prepare_v2 failed: no such table: meta BUG=none TEST=n/a Review URL: http://codereview.chromium.org/150095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/net/cookie_monster_sqlite.cc15
1 files changed, 1 insertions, 14 deletions
diff --git a/chrome/common/net/cookie_monster_sqlite.cc b/chrome/common/net/cookie_monster_sqlite.cc
index 0cb49ca..2b42bcc 100644
--- a/chrome/common/net/cookie_monster_sqlite.cc
+++ b/chrome/common/net/cookie_monster_sqlite.cc
@@ -303,19 +303,6 @@ bool InitTable(sqlite3* db) {
return true;
}
-void PrimeCache(sqlite3* db) {
- // A statement must be open for the preload command to work. If the meta
- // table can't be read, it probably means this is a new database and there
- // is nothing to preload (so it's OK we do nothing).
- SQLStatement dummy;
- if (dummy.prepare(db, "SELECT * from meta") != SQLITE_OK)
- return;
- if (dummy.step() != SQLITE_ROW)
- return;
-
- sqlite3Preload(db);
-}
-
} // namespace
bool SQLitePersistentCookieStore::Load(
@@ -333,7 +320,7 @@ bool SQLitePersistentCookieStore::Load(
return false;
}
- PrimeCache(db);
+ MetaTableHelper::PrimeCache(std::string(), db);
// Slurp all the cookies into the out-vector.
SQLStatement smt;