diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-18 03:28:56 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-18 03:28:56 +0000 |
commit | 5f6595959a40c8617f78dff3a7fe6e0f2ab2046a (patch) | |
tree | eb5128dee9205b3b5cc4e9f71970e72c6237bf99 /sql/recovery.h | |
parent | e650b468dcaeb53a149f4fbfd790f4d7a2eeae20 (diff) | |
download | chromium_src-5f6595959a40c8617f78dff3a7fe6e0f2ab2046a.zip chromium_src-5f6595959a40c8617f78dff3a7fe6e0f2ab2046a.tar.gz chromium_src-5f6595959a40c8617f78dff3a7fe6e0f2ab2046a.tar.bz2 |
Revert 235492 "[sql] Recover Favicons v5 databases, with more re..."
Speculative revert to find the cause for Mac size regression
(will revert this revert later)
> [sql] Recover Favicons v5 databases, with more recovery automation.
>
> An entirely automated recovery system runs afoul of questions about
> whether the corrupt database's schema can be trusted.
> sql::Recovery::AutoRecoverTable() uses a schema created by the caller
> to construct the recovery virtual table and then copies the data over.
>
> sql::Recovery::SetupMeta() and GetMetaVersionNumber() simplify
> accessing meta-table info in the corrupt database.
>
> sql::test::IntegrityCheck() and CorruptSizeInHeader() helpers to
> simplify common testing operations.
>
> Rewrite ThumbnailDatabase v6 and v7 recovery code and tests using
> these changes, and add a v5 recovery path. Additionally handle
> deprecated versions.
>
> BUG=240396,109482
>
> Review URL: https://codereview.chromium.org/50493012
TBR=shess@chromium.org
Review URL: https://codereview.chromium.org/74933002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235595 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql/recovery.h')
-rw-r--r-- | sql/recovery.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/sql/recovery.h b/sql/recovery.h index 2475b0f..be23e97 100644 --- a/sql/recovery.h +++ b/sql/recovery.h @@ -93,46 +93,6 @@ class SQL_EXPORT Recovery { // 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); |