diff options
author | shess <shess@chromium.org> | 2016-03-08 22:21:15 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-09 06:22:20 +0000 |
commit | fd7e4dd0e9c63780fe97438b893a4848c1db49bf (patch) | |
tree | 32933b8554084d175e786bfab18853368325a5c6 /sql | |
parent | 508915b949589cb4d34ed4723ec6db2d5ae42039 (diff) | |
download | chromium_src-fd7e4dd0e9c63780fe97438b893a4848c1db49bf.zip chromium_src-fd7e4dd0e9c63780fe97438b893a4848c1db49bf.tar.gz chromium_src-fd7e4dd0e9c63780fe97438b893a4848c1db49bf.tar.bz2 |
Revert of [sqlite] sql::Recovery working under USE_SYSTEM_SQLITE. (patchset #2 id:20001 of https://codereview.chromium.org/1757653002/ )
Reason for revert:
https://build.chromium.org/p/chromium/builders/Linux/builds/72746/steps/compile/logs/stdio
FAILED: /b/build/slave/Linux/build/src/build/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/third_party/sqlite/src/src/sqlite_recover.recover_varint.o.d -DSQLITE_ENABLE_FTS3 -DSQLITE_DISABLE_FTS3_UNICODE -DSQLITE_DISABLE_FTS4_DEFERRED -DSQLITE_ENABLE_ICU -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_SECURE_DELETE -DSQLITE_SEPARATE_CACHE_POOLS -DTHREADSAFE -DSQLITE_MAX_WORKER_THREADS=0 -DSQLITE_MAX_MMAP_SIZE=268435456 -DSQLITE_MMAP_READ_ONLY=1 -DSQLITE_DEFAULT_PCACHE_INITSZ=0 -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=261368-1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DUSE_UDEV -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Xclang -load -Xclang /b/build/slave/Linux/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -fcolor-diagnostics -B/b/build/slave/Linux/build/src/third_party/binutils/Linux_x64/Release/bin -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-unused-variable -msse2 -mfpmath=sse -mmmx -m32 --sysroot=/b/build/slave/Linux/build/src/build/linux/debian_wheezy_i386-sysroot -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -c ../../third_party/sqlite/src/src/recover_varint.c -o obj/third_party/sqlite/src/src/sqlite_recover.recover_varint.o
../../third_party/sqlite/src/src/recover_varint.c:18:10: fatal error: 'sqlite3.h' file not found
#include "sqlite3.h"
Original issue's description:
> [sqlite] sql::Recovery working under USE_SYSTEM_SQLITE.
>
> Removes the USE_SYSTEM_SQLITE conditional sections in sql::Recover
> implementation and tests. third_party/sqlite includes sqlite_recover
> library for the USE_SYSTEM_SQLITE case, with recover.c compiled against
> the system version of SQLite.
>
> Additionally remove interiorCursorEOF() from recover.c, as it was
> unused, rather than adding a compile flag to allow it.
>
> BUG=584407
>
> Committed: https://crrev.com/7776a37d651f0afdf61f150fba50884f2ad3ac5d
> Cr-Commit-Position: refs/heads/master@{#380076}
TBR=sdefresne@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=584407
Review URL: https://codereview.chromium.org/1778823002
Cr-Commit-Position: refs/heads/master@{#380084}
Diffstat (limited to 'sql')
-rw-r--r-- | sql/BUILD.gn | 2 | ||||
-rw-r--r-- | sql/recovery.cc | 19 | ||||
-rw-r--r-- | sql/recovery_unittest.cc | 4 | ||||
-rw-r--r-- | sql/sql.gyp | 12 |
4 files changed, 22 insertions, 15 deletions
diff --git a/sql/BUILD.gn b/sql/BUILD.gn index 8c1cbb7..4ffa421 100644 --- a/sql/BUILD.gn +++ b/sql/BUILD.gn @@ -113,8 +113,6 @@ test("sql_unittests") { # '../testing/android/native_test.gyp:native_test_native_code', # ], #}], - - # TODO(GYP): dep on copy_test_data_ios action. } if (is_android) { diff --git a/sql/recovery.cc b/sql/recovery.cc index 7b9ca9f..b79fe08 100644 --- a/sql/recovery.cc +++ b/sql/recovery.cc @@ -98,7 +98,11 @@ void RecordRecoveryEvent(RecoveryEventType recovery_event) { // static bool Recovery::FullRecoverySupported() { // TODO(shess): See comment in Init(). +#if defined(USE_SYSTEM_SQLITE) + return false; +#else return true; +#endif } // static @@ -199,7 +203,16 @@ bool Recovery::Init(const base::FilePath& db_path) { return false; } - // Enable the recover virtual table for this connection. + // TODO(shess): Figure out a story for USE_SYSTEM_SQLITE. The + // virtual table implementation relies on SQLite internals for some + // types and functions, which could be copied inline to make it + // standalone. Or an alternate implementation could try to read + // through errors entirely at the SQLite level. + // + // For now, defer to the caller. The setup will succeed, but the + // later CREATE VIRTUAL TABLE call will fail, at which point the + // caller can fire Unrecoverable(). +#if !defined(USE_SYSTEM_SQLITE) int rc = recoverVtableInit(recover_db_.db_); if (rc != SQLITE_OK) { RecordRecoveryEvent(RECOVERY_FAILED_VIRTUAL_TABLE_INIT); @@ -207,6 +220,10 @@ bool Recovery::Init(const base::FilePath& db_path) { << recover_db_.GetErrorMessage(); return false; } +#else + // If this is infrequent enough, just wire it to Raze(). + RecordRecoveryEvent(RECOVERY_FAILED_VIRTUAL_TABLE_SYSTEM_SQLITE); +#endif // Turn on |SQLITE_RecoveryMode| for the handle, which allows // reading certain broken databases. diff --git a/sql/recovery_unittest.cc b/sql/recovery_unittest.cc index d3b04b1..e4fdb7b1 100644 --- a/sql/recovery_unittest.cc +++ b/sql/recovery_unittest.cc @@ -172,6 +172,9 @@ TEST_F(SQLRecoveryTest, RecoverBasic) { ExecuteWithResults(&db(), kXSql, "|", "\n")); } +// The recovery virtual table is only supported for Chromium's SQLite. +#if !defined(USE_SYSTEM_SQLITE) + // Test operation of the virtual table used by sql::Recovery. TEST_F(SQLRecoveryTest, VirtualTable) { const char kCreateSql[] = "CREATE TABLE x (t TEXT)"; @@ -734,6 +737,7 @@ TEST_F(SQLRecoveryTest, Bug387868) { EXPECT_TRUE(sql::Recovery::Recovered(std::move(recovery))); } } +#endif // !defined(USE_SYSTEM_SQLITE) // Memory-mapped I/O interacts poorly with I/O errors. Make sure the recovery // database doesn't accidentally enable it. diff --git a/sql/sql.gyp b/sql/sql.gyp index cde3057..30bd76d 100644 --- a/sql/sql.gyp +++ b/sql/sql.gyp @@ -114,18 +114,6 @@ '../testing/android/native_test.gyp:native_test_native_code', ], }], - ['OS == "ios"', { - 'actions': [{ - 'action_name': 'copy_test_data', - 'variables': { - 'test_data_files': [ - 'test/data', - ], - 'test_data_prefix' : 'sql', - }, - 'includes': [ '../build/copy_test_data_ios.gypi' ], - }], - }], ], # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [4267, ], |