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

Unified Diff: trunk/src/sql/recovery.h

Issue 74933002: Revert 235492 "[sql] Recover Favicons v5 databases, with more re..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « trunk/src/sql/connection_unittest.cc ('k') | trunk/src/sql/recovery.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/sql/recovery.h
===================================================================
--- trunk/src/sql/recovery.h (revision 235594)
+++ trunk/src/sql/recovery.h (working copy)
@@ -93,46 +93,6 @@
// Handle to the temporary recovery database.
sql::Connection* db() { return &recover_db_; }
- // Attempt to recover the named table from the corrupt database into
- // the recovery database using a temporary recover virtual table.
- // The virtual table schema is derived from the named table's schema
- // in database [main]. Data is copied using INSERT OR REPLACE, so
- // duplicates overwrite each other.
- //
- // |extend_columns| allows recovering tables which have excess
- // columns relative to the target schema. The recover virtual table
- // treats more data than specified as a sign of corruption.
- //
- // Returns true if all operations succeeded, with the number of rows
- // recovered in |*rows_recovered|.
- //
- // NOTE(shess): Due to a flaw in the recovery virtual table, at this
- // time this code injects the DEFAULT value of the target table in
- // locations where the recovery table returns NULL. This is not
- // entirely correct, because it happens both when there is a short
- // row (correct) but also where there is an actual NULL value
- // (incorrect).
- //
- // TODO(shess): Flag for INSERT OR REPLACE vs IGNORE.
- // TODO(shess): Handle extended table names.
- bool AutoRecoverTable(const char* table_name,
- size_t extend_columns,
- size_t* rows_recovered);
-
- // Setup a recover virtual table at temp.recover_meta, reading from
- // corrupt.meta. Returns true if created.
- // TODO(shess): Perhaps integrate into Begin().
- // TODO(shess): Add helpers to fetch additional items from the meta
- // table as needed.
- bool SetupMeta();
-
- // Fetch the version number from temp.recover_meta. Returns false
- // if the query fails, or if there is no version row. Otherwise
- // returns true, with the version in |*version_number|.
- //
- // Only valid to call after successful SetupMeta().
- bool GetMetaVersionNumber(int* version_number);
-
private:
explicit Recovery(Connection* connection);
« no previous file with comments | « trunk/src/sql/connection_unittest.cc ('k') | trunk/src/sql/recovery.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698