summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 20:10:30 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 20:10:30 +0000
commit3fb6b1579d361e137d629534edbc986696423e87 (patch)
tree09fd32ee87fee4626400c0fdff7284b9847058b7 /chrome
parent86281adbe4f9e4c2eae038cf15706bf0d105483e (diff)
downloadchromium_src-3fb6b1579d361e137d629534edbc986696423e87.zip
chromium_src-3fb6b1579d361e137d629534edbc986696423e87.tar.gz
chromium_src-3fb6b1579d361e137d629534edbc986696423e87.tar.bz2
Fix SQL preloading. I did Run() with a SELECT which produces data, so it
reports failure. This meant we were never preloading data. TEST=covered by perf tests http://crbug.com/23854 Review URL: http://codereview.chromium.org/265018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/meta_table_helper.cc18
-rw-r--r--chrome/browser/meta_table_helper.h6
2 files changed, 0 insertions, 24 deletions
diff --git a/chrome/browser/meta_table_helper.cc b/chrome/browser/meta_table_helper.cc
index f3df3b7..169ba763 100644
--- a/chrome/browser/meta_table_helper.cc
+++ b/chrome/browser/meta_table_helper.cc
@@ -12,24 +12,6 @@
static const char kVersionKey[] = "version";
static const char kCompatibleVersionKey[] = "last_compatible_version";
-// static
-void MetaTableHelper::PrimeCache(const std::string& db_name, sqlite3* db) {
- // A statement must be open for the preload command to work. If the meta
- // table doesn't exist, it probably means this is a new database and there
- // is nothing to preload (so it's OK we do nothing).
- SQLStatement dummy;
- if (!DoesSqliteTableExist(db, db_name.c_str(), "meta"))
- return;
- std::string sql("SELECT * from ");
- appendMetaTableName(db_name, &sql);
- if (dummy.prepare(db, sql.c_str()) != SQLITE_OK)
- return;
- if (dummy.step() != SQLITE_ROW)
- return;
-
- sqlite3Preload(db);
-}
-
MetaTableHelper::MetaTableHelper() : db_(NULL) {
}
diff --git a/chrome/browser/meta_table_helper.h b/chrome/browser/meta_table_helper.h
index a55f136..55db34f 100644
--- a/chrome/browser/meta_table_helper.h
+++ b/chrome/browser/meta_table_helper.h
@@ -20,12 +20,6 @@ class SQLStatement;
// database to use.
class MetaTableHelper {
public:
- // Primes the sqlite cache by filling it with the file in sequence
- // until there is no more data or the cache is full. Since this is one
- // contiguous read operation, it is much faster than letting the pages come
- // in on-demand (which causes lots of seeks).
- static void PrimeCache(const std::string& db_name, sqlite3* db);
-
// Creates a new MetaTableHelper. After construction you must invoke
// Init with the appropriate database.
MetaTableHelper();