summaryrefslogtreecommitdiffstats
path: root/sql/test
diff options
context:
space:
mode:
authorScott Hess <shess@chromium.org>2015-02-10 13:33:29 -0800
committerScott Hess <shess@chromium.org>2015-02-10 21:37:23 +0000
commitdcf12048055030a2b5858ceca5ce26294a82a6e4 (patch)
treec84f0e56702c610d82cf961829c6766d281dc98b /sql/test
parent22a8af1afb44b29cfcee081f492ac1f434b54201 (diff)
downloadchromium_src-dcf12048055030a2b5858ceca5ce26294a82a6e4.zip
chromium_src-dcf12048055030a2b5858ceca5ce26294a82a6e4.tar.gz
chromium_src-dcf12048055030a2b5858ceca5ce26294a82a6e4.tar.bz2
Import SQLite 3.8.7.4.
Ran through the import script in third_party/sqlite/README.Chromium, including the SQLite test suite. There are a few pager errors which are because of a change required for WebDatabase support (documented in README). SQLite changes are at http://www.sqlite.org/changes.html , Chromium previously used 3.7.6.3. All patches were applied and the results reviewed to make sure backported patches were safe to remove, and retained patches were still covering what was necessary. Keep fts4 disabled, and also the new fts3 virtual table and unicode61 tokenizer. Once enabled, these are very hard to disable, and there doesn't seem to be any pressure to enable them. Other SQLITE_* flags were reviewed for applicability, none looked essential. Fixes to Chromium: - In recovery.cc, pk_column now follows the documentation. - Short garbage files now see SQLITE_NOTADB rather than SQLITE_IOERR_SHORT_READ. - Adjust to allow clients to use ScopedErrorIgnore without adding dependencies. - More-specific SQLITE_CONSTRAINT_* errors aren't necessary. - Force recovery test to scan table rather than index. BUG=340757 TEST=*EVERYTHING* continues to work. R=michaeln@chromium.org Review URL: https://codereview.chromium.org/901033002 Cr-Commit-Position: refs/heads/master@{#315646}
Diffstat (limited to 'sql/test')
-rw-r--r--sql/test/scoped_error_ignorer.cc5
-rw-r--r--sql/test/scoped_error_ignorer.h9
2 files changed, 14 insertions, 0 deletions
diff --git a/sql/test/scoped_error_ignorer.cc b/sql/test/scoped_error_ignorer.cc
index c585229..7e07cf1 100644
--- a/sql/test/scoped_error_ignorer.cc
+++ b/sql/test/scoped_error_ignorer.cc
@@ -9,6 +9,11 @@
namespace sql {
+// static
+int ScopedErrorIgnorer::SQLiteLibVersionNumber() {
+ return sqlite3_libversion_number();
+}
+
ScopedErrorIgnorer::ScopedErrorIgnorer()
: checked_(false) {
callback_ =
diff --git a/sql/test/scoped_error_ignorer.h b/sql/test/scoped_error_ignorer.h
index e777179..79559a1 100644
--- a/sql/test/scoped_error_ignorer.h
+++ b/sql/test/scoped_error_ignorer.h
@@ -10,6 +10,11 @@
#include "base/basictypes.h"
#include "sql/connection.h"
+// This is not strictly necessary for the operation of ScopedErrorIgnorer, but
+// the class is not useful without the SQLite error codes.
+#include "third_party/sqlite/sqlite3.h"
+
+// TODO(shess): sql::test:: seems like it could be in order for this.
namespace sql {
// sql::Connection and sql::Statement treat most SQLite errors as
@@ -43,6 +48,10 @@ class ScopedErrorIgnorer {
// Record an error and check if it should be ignored.
bool ShouldIgnore(int err);
+ // Expose sqlite3_libversion_number() so that clients don't have to add a
+ // dependency on third_party/sqlite.
+ static int SQLiteLibVersionNumber();
+
private:
// Storage for callback passed to Connection::SetErrorIgnorer().
Connection::ErrorIgnorerCallback callback_;