summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/sql/connection.cc2
-rw-r--r--chrome/browser/meta_table_helper.cc18
-rw-r--r--chrome/browser/meta_table_helper.h6
3 files changed, 1 insertions, 25 deletions
diff --git a/app/sql/connection.cc b/app/sql/connection.cc
index ac1c545..dd3756e 100644
--- a/app/sql/connection.cc
+++ b/app/sql/connection.cc
@@ -92,7 +92,7 @@ void Connection::Preload() {
if (!DoesTableExist("meta"))
return;
Statement dummy(GetUniqueStatement("SELECT * FROM meta"));
- if (!dummy || !dummy.Run())
+ if (!dummy || !dummy.Step())
return;
sqlite3Preload(db_);
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();