diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 22:24:22 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 22:24:22 +0000 |
commit | df5d95c4521b119234b6fcba10022437b457d55e (patch) | |
tree | 381dfcfe31729da6562ab3a8b7d50758a216e7ec /sql | |
parent | 4c4e2a1b6146687beb17f6acecd4df14fdf74660 (diff) | |
download | chromium_src-df5d95c4521b119234b6fcba10022437b457d55e.zip chromium_src-df5d95c4521b119234b6fcba10022437b457d55e.tar.gz chromium_src-df5d95c4521b119234b6fcba10022437b457d55e.tar.bz2 |
Disable recovery test for USE_SYSTEM_SQLITE.
Detact and short-circuit rather than using an #ifdef because the test
eventually needs to be adapted to actually test this case. I'm just
not confident enough about possible edge cases to start deleting data.
BUG=299677
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/24989006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql')
-rw-r--r-- | sql/recovery.cc | 10 | ||||
-rw-r--r-- | sql/recovery.h | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sql/recovery.cc b/sql/recovery.cc index fc67661..c750fd0 100644 --- a/sql/recovery.cc +++ b/sql/recovery.cc @@ -13,6 +13,16 @@ namespace sql { // static +bool Recovery::FullRecoverySupported() { + // TODO(shess): See comment in Init(). +#if defined(USE_SYSTEM_SQLITE) + return false; +#else + return true; +#endif +} + +// static scoped_ptr<Recovery> Recovery::Begin( Connection* connection, const base::FilePath& db_path) { diff --git a/sql/recovery.h b/sql/recovery.h index e832da6..be23e97 100644 --- a/sql/recovery.h +++ b/sql/recovery.h @@ -41,6 +41,15 @@ class SQL_EXPORT Recovery { public: ~Recovery(); + // This module is intended to be used in concert with a virtual + // table module (see third_party/sqlite/src/src/recover.c). If the + // build defines USE_SYSTEM_SQLITE, this module will not be present. + // TODO(shess): I am still debating how to handle this - perhaps it + // will just imply Unrecoverable(). This is exposed to allow tests + // to adapt to the cases, please do not rely on it in production + // code. + static bool FullRecoverySupported(); + // Begin the recovery process by opening a temporary database handle // and attach the existing database to it at "corrupt". To prevent // deadlock, all transactions on |connection| are rolled back. |