# HG changeset patch # User Marco Bonardo # Date 1582236963 0 # Node ID 5022efe33088676d18253c3c2f86ada5ba7a9cbe # Parent b22c07ea7c728cc962094c94d18aeed414c4936a Bug 1611386 - Drop support for --enable-system-sqlite. r=asuth,glandium Differential Revision: https://phabricator.services.mozilla.com/D63177 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -138,11 +138,9 @@ @RESPATH@/update-settings.ini #endif @RESPATH@/platform.ini -#ifndef MOZ_SYSTEM_SQLITE #ifndef MOZ_FOLD_LIBS @BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@ #endif -#endif @BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@ #ifdef MOZ_FFVPX @BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -103,7 +103,6 @@ "--enable-system-cairo", "--enable-system-extension-dirs", "--enable-system-pixman", - "--enable-system-sqlite", "--enable-universalchardet", "--enable-updater", "--enable-xul", diff --git a/config/external/sqlite/moz.build b/config/external/sqlite/moz.build --- a/config/external/sqlite/moz.build +++ b/config/external/sqlite/moz.build @@ -4,19 +4,15 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -if CONFIG['MOZ_SYSTEM_SQLITE']: - Library('sqlite') - OS_LIBS += CONFIG['SQLITE_LIBS'] +DIRS += ["../../../third_party/sqlite3/src"] +if CONFIG["MOZ_FOLD_LIBS"]: + Library("sqlite") + # When folding libraries, sqlite is actually in the nss library. + USE_LIBS += [ + "nss", + ] else: - DIRS += ['../../../third_party/sqlite3/src'] - if CONFIG['MOZ_FOLD_LIBS']: - Library('sqlite') - # When folding libraries, sqlite is actually in the nss library. - USE_LIBS += [ - 'nss', - ] - else: - SharedLibrary('sqlite') - SHARED_LIBRARY_NAME = 'mozsqlite3' + SharedLibrary("sqlite") + SHARED_LIBRARY_NAME = "mozsqlite3" - SYMBOLS_FILE = '/third_party/sqlite3/src/sqlite.symbols' + SYMBOLS_FILE = "/third_party/sqlite3/src/sqlite.symbols" diff --git a/old-configure.in b/old-configure.in --- a/old-configure.in +++ b/old-configure.in @@ -58,7 +58,6 @@ GDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_14 W32API_VERSION=3.14 DBUS_VERSION=0.60 -SQLITE_VERSION=3.31.1 dnl Set various checks dnl ======================================================== @@ -2038,35 +2037,11 @@ dnl ======================================================== MOZ_ARG_HEADER(Individual module options) -dnl ======================================================== -dnl Check for sqlite -dnl ======================================================== - -MOZ_SYSTEM_SQLITE= -MOZ_ARG_ENABLE_BOOL(system-sqlite, -[ --enable-system-sqlite Use system sqlite (located with pkgconfig)], -MOZ_SYSTEM_SQLITE=1, -MOZ_SYSTEM_SQLITE= ) - -if test -n "$MOZ_SYSTEM_SQLITE" -then - dnl ============================ - dnl === SQLite Version check === - dnl ============================ - dnl Check to see if the system SQLite package is new enough. - PKG_CHECK_MODULES(SQLITE, sqlite3 >= $SQLITE_VERSION) -else - dnl ============================== - dnl === SQLite fdatasync check === - dnl ============================== - dnl Check to see if fdatasync is available - AC_CHECK_FUNC(fdatasync) -fi - -if test -n "$MOZ_SYSTEM_SQLITE"; then - AC_DEFINE(MOZ_SYSTEM_SQLITE) -fi -AC_SUBST(MOZ_SYSTEM_SQLITE) +dnl ============================== +dnl === SQLite fdatasync check === +dnl ============================== +dnl Check to see if fdatasync is available and make use of it +AC_CHECK_FUNC(fdatasync) dnl ======================================================== dnl = Disable zipwriter diff --git a/storage/SQLiteMutex.h b/storage/SQLiteMutex.h --- a/storage/SQLiteMutex.h +++ b/storage/SQLiteMutex.h @@ -51,35 +51,35 @@ class SQLiteMutex : private BlockingReso */ void destroy() { mMutex = NULL; } /** * Acquires the mutex. */ void lock() { MOZ_ASSERT(mMutex, "No mutex associated with this wrapper!"); -#if defined(DEBUG) && !defined(MOZ_SYSTEM_SQLITE) +#if defined(DEBUG) // While SQLite Mutexes may be recursive, in our own code we do not want to // treat them as such. CheckAcquire(); #endif ::sqlite3_mutex_enter(mMutex); -#if defined(DEBUG) && !defined(MOZ_SYSTEM_SQLITE) +#if defined(DEBUG) Acquire(); // Call is protected by us holding the mutex. #endif } /** * Releases the mutex. */ void unlock() { MOZ_ASSERT(mMutex, "No mutex associated with this wrapper!"); -#if defined(DEBUG) && !defined(MOZ_SYSTEM_SQLITE) +#if defined(DEBUG) // While SQLite Mutexes may be recursive, in our own code we do not want to // treat them as such. Release(); // Call is protected by us holding the mutex. #endif ::sqlite3_mutex_leave(mMutex); } diff --git a/storage/moz.build b/storage/moz.build --- a/storage/moz.build +++ b/storage/moz.build @@ -98,12 +98,6 @@ # will need to change it here as well. DEFINES["SQLITE_MAX_LIKE_PATTERN_LENGTH"] = 50000 -# See Sqlite moz.build for reasoning about TEMP_STORE. -# For system sqlite we cannot use the compile time option, so we use a pragma. -if CONFIG['MOZ_SYSTEM_SQLITE'] and (CONFIG['OS_TARGET'] == 'Android' - or CONFIG['HAVE_64BIT_BUILD']): - DEFINES['MOZ_MEMORY_TEMP_STORE_PRAGMA'] = True - LOCAL_INCLUDES += [ "/dom/base", "/third_party/sqlite3/src", diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp @@ -750,10 +749,6 @@ nsresult Connection::initializeInternal( return convertResultCode(srv); } -#if defined(MOZ_MEMORY_TEMP_STORE_PRAGMA) - (void)ExecuteSimpleSQL(nsAutoCString("PRAGMA temp_store = 2;")); -#endif - // Register our built-in SQL functions. srv = registerFunctions(mDBConn); if (srv != SQLITE_OK) { diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp --- a/storage/mozStorageService.cpp +++ b/storage/mozStorageService.cpp @@ -30,8 +30,6 @@ # undef CompareString #endif -#include "nsIPromptService.h" - namespace mozilla { namespace storage { @@ -164,31 +162,6 @@ return do_AddRef(gService); } - // Ensure that we are using the same version of SQLite that we compiled with - // or newer. Our configure check ensures we are using a new enough version - // at compile time. - if (SQLITE_VERSION_NUMBER > ::sqlite3_libversion_number() || - !::sqlite3_compileoption_used("SQLITE_SECURE_DELETE") || - !::sqlite3_compileoption_used("SQLITE_THREADSAFE=1") || - !::sqlite3_compileoption_used("SQLITE_ENABLE_FTS3") || - !::sqlite3_compileoption_used("SQLITE_ENABLE_UNLOCK_NOTIFY") || - !::sqlite3_compileoption_used("SQLITE_ENABLE_DBSTAT_VTAB")) { - nsCOMPtr ps(do_GetService(NS_PROMPTSERVICE_CONTRACTID)); - if (ps) { - nsAutoString title, message; - title.AppendLiteral("SQLite Version Error"); - message.AppendLiteral( - "The application has been updated, but the SQLite " - "library wasn't updated properly and the application " - "cannot run. Please try to launch the application again. " - "If that should still fail, please try reinstalling " - "it, or contact the support of where you got the " - "application from."); - (void)ps->Alert(nullptr, title.get(), message.get()); - } - MOZ_CRASH("SQLite Version Error"); - } - // The first reference to the storage service must be obtained on the // main thread. NS_ENSURE_TRUE(NS_IsMainThread(), nullptr); diff --git a/third_party/sqlite3/src/moz.build b/third_party/sqlite3/src/moz.build --- a/third_party/sqlite3/src/moz.build +++ b/third_party/sqlite3/src/moz.build @@ -80,7 +80,6 @@ # Try to use a MEMORY temp store when possible. That allows for better # performance and doesn't suffer from a full separate tmp partition. # Exclude 32bit platforms due to address space fragmentation issues. -# System Sqlite is managed through a PRAGMA instead. if CONFIG['OS_TARGET'] == 'Android': # On Android there's no tmp partition, so always use a MEMORY temp store. DEFINES['SQLITE_TEMP_STORE'] = 3 @@ -90,7 +89,6 @@ # Change the default temp files prefix, to easily distinguish files we created # vs files created by other Sqlite instances in the system. -# This has obviously no effect in case of System Sqlite. DEFINES['SQLITE_TEMP_FILE_PREFIX'] = '"mz_etilqs_"' # Suppress warnings in third-party code. diff --git a/third_party/sqlite3/src/sqlite.symbols b/third_party/sqlite3/src/sqlite.symbols --- a/third_party/sqlite3/src/sqlite.symbols +++ b/third_party/sqlite3/src/sqlite.symbols @@ -31,17 +31,16 @@ sqlite3_column_int sqlite3_column_int64 sqlite3_column_name sqlite3_column_name16 sqlite3_column_text sqlite3_column_text16 sqlite3_column_type sqlite3_column_value sqlite3_commit_hook -sqlite3_compileoption_used sqlite3_complete sqlite3_complete16 sqlite3_config sqlite3_create_collation sqlite3_create_collation16 sqlite3_create_function sqlite3_create_function16 sqlite3_create_module