1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
# HG changeset patch
# User Marco Bonardo <mbonardo@mozilla.com>
# 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<nsIPromptService> 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
|