Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6515)

Unified Diff: chrome/browser/history/text_database.cc

Issue 9005036: [sql] WARN_UNUSED_RESULT on Execute(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/text_database.cc
diff --git a/chrome/browser/history/text_database.cc b/chrome/browser/history/text_database.cc
index c5da03cf2cad466c5d51728e5e88c3bbccde0c75..310f52b2af76374c86a102233bba19143f66c9c0 100644
--- a/chrome/browser/history/text_database.cc
+++ b/chrome/browser/history/text_database.cc
@@ -201,10 +201,8 @@ bool TextDatabase::CreateTables() {
return false;
}
- // Create the index. This will fail when the index already exists, so we just
- // ignore the error.
- db_.Execute("CREATE INDEX info_time ON info(time)");
- return true;
+ // Create the index.
+ return db_.Execute("CREATE INDEX IF NOT EXISTS info_time ON info(time)");
}
bool TextDatabase::AddPageData(base::Time time,

Powered by Google App Engine
This is Rietveld 408576698