Skip to content

Commit 6d39b62

Browse files
Update SQLite to 3.14.1
1 parent 891853f commit 6d39b62

File tree

184 files changed

+9214
-1855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+9214
-1855
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ If you need a specific version of SQLite, or specific SQLite compilation options
88

99

1010

11-
**May 31, 2016: SQLiteLib build process tweaks** ([changelog](CHANGELOG.md)).
11+
**September 10, 2016: Update SQLite to 3.14.1** ([changelog](CHANGELOG.md)).
1212

1313
**Requirements**: iOS 8.0+ / OSX 10.9+, Xcode 7.3+
1414

15-
**SQLite Included:** 3.13.0
15+
**SQLite Included:** 3.14.1
1616

1717

1818

@@ -39,12 +39,12 @@ For example: ([GRDB.swift](https://github.com/groue/GRDB.swift)).
3939

4040
## Customization:
4141

42-
By default, SQLiteLib builds SQLite with options that match the built-in system version of SQLite on OSX and iOS (as of OSX 10.11.5, iOS 9.3.2), [with one exception*](#additional-details).
42+
By default, SQLiteLib builds SQLite with options that match the built-in system version of SQLite on OSX and iOS (as of OSX 10.11.6, iOS 9.3.5), [with one exception*](#additional-details).
4343

4444

4545
#### Specifying Additional SQLite Compilation Options:
4646

47-
> By default, SQLiteLib compiles SQLite with options that match the built-in OSX/iOS version of SQLite (as of OSX 10.11, iOS 9.3.2), with one exception*.
47+
> By default, SQLiteLib compiles SQLite with options that match the built-in OSX/iOS version of SQLite (as of OSX 10.11, iOS 9.3.5), with one exception*.
4848
> You only need to follow the steps below if you wish to customize the options.
4949
5050
To specify additional options:
@@ -65,7 +65,7 @@ There is no need to modify any other files.
6565

6666
#### Compiling a Specific Version of SQLite:
6767

68-
SQLiteLib currently ships with the source for SQLite 3.13.0.
68+
SQLiteLib currently ships with the source for SQLite 3.14.1.
6969

7070
If you'd like to compile a newer (or older) version, the process is simple:
7171

@@ -94,11 +94,11 @@ You'll want the file named "sqlite-src-*version*.zip".
9494

9595
#### Default Compilation Options:
9696

97-
The built-in OSX/iOS version of SQLite were built with the following compilation options (as of OSX 10.11.5, iOS 9.3.2):
97+
The built-in OSX/iOS version of SQLite were built with the following compilation options (as of OSX 10.11.6, iOS 9.3.5):
9898

9999
> Fetched using `PRAGMA compile_options;`
100100
101-
- MacOSX (10.11.5)
101+
- MacOSX (10.11.6)
102102
- `ENABLE_API_ARMOR`
103103
- `ENABLE_FTS3`
104104
- `ENABLE_FTS3_PARENTHESIS`
@@ -111,7 +111,7 @@ The built-in OSX/iOS version of SQLite were built with the following compilation
111111
- `SYSTEM_MALLOC`
112112
- `THREADSAFE=2`
113113

114-
- iPhoneOS (9.3.2)
114+
- iPhoneOS (9.3.5)
115115
- `ENABLE_API_ARMOR`
116116
- `ENABLE_FTS3`
117117
- `ENABLE_FTS3_PARENTHESIS`
@@ -127,7 +127,7 @@ The built-in OSX/iOS version of SQLite were built with the following compilation
127127

128128
SQLiteLib uses these settings with one exception - on iOS:
129129

130-
The SQLite code (verified in: 3.13.0) uses a deprecated function (`gethostuuid()`).
130+
The SQLite code (verified in: 3.14.1) uses a deprecated function (`gethostuuid()`).
131131

132132
D. Richard Hipp (SQLite architect), suggests working around this on iOS using `-DSQLITE_ENABLE_LOCKING_STYLE=0`:
133133
> "The SQLITE_ENABLE_LOCKING_STYLE thing is an apple-only extension that
@@ -140,7 +140,7 @@ D. Richard Hipp (SQLite architect), suggests working around this on iOS using `-
140140
Thus, SQLiteLib uses `SQLITE_ENABLE_LOCKING_STYLE=1` on OSX,
141141
**but on iOS, SQLiteLib compiles with `ENABLE_LOCKING_STYLE=0`**.
142142

143-
This removes the code that uses the deprecated function, but doesn't get rid of the warning that "`gethostuuid() is disabled`" (as of 3.13.0).
143+
This removes the code that uses the deprecated function, but doesn't get rid of the warning that "`gethostuuid() is disabled`" (as of 3.14.1).
144144

145145
To prevent this warning, SQLiteLib separately specifies `-Wno-#warnings` when building for iOS.
146146

@@ -174,4 +174,4 @@ This is a UI issue in Xcode - the path is properly set in the project.pbxproj fi
174174

175175
SQLiteLib's project will automatically generate this from the base template `SQLiteLib-USER.xcconfig.example` on first build, or you may copy and rename it yourself.
176176

177-
(Future builds will not display the warning. The warning does not affect functionality.)
177+
(Future builds will not display the warning. The warning does not affect functionality.)

sqlite/Makefile.in

+21-8
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,9 @@ TESTSRC = \
416416
#
417417
TESTSRC += \
418418
$(TOP)/ext/misc/amatch.c \
419+
$(TOP)/ext/misc/carray.c \
419420
$(TOP)/ext/misc/closure.c \
421+
$(TOP)/ext/misc/csv.c \
420422
$(TOP)/ext/misc/eval.c \
421423
$(TOP)/ext/misc/fileio.c \
422424
$(TOP)/ext/misc/fuzzer.c \
@@ -538,7 +540,8 @@ TESTPROGS = \
538540
testfixture$(TEXE) \
539541
sqlite3$(TEXE) \
540542
sqlite3_analyzer$(TEXE) \
541-
sqldiff$(TEXE)
543+
sqldiff$(TEXE) \
544+
dbhash$(TEXE)
542545

543546
# Databases containing fuzzer test cases
544547
#
@@ -555,7 +558,9 @@ TESTOPTS = --verbose=file --output=test-out.txt
555558
# Extra compiler options for various shell tools
556559
#
557560
SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
561+
# SHELL_OPT += -DSQLITE_ENABLE_FTS5
558562
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
563+
SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
559564
FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
560565
FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
561566

@@ -586,8 +591,15 @@ sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
586591
$(TOP)/src/shell.c sqlite3.c \
587592
$(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
588593

589-
sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h
590-
$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS)
594+
sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
595+
$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
596+
597+
dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
598+
$(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
599+
600+
scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
601+
$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
602+
$(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
591603

592604
srcck1$(BEXE): $(TOP)/tool/srcck1.c
593605
$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
@@ -602,8 +614,8 @@ fuzzershell$(TEXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h
602614
fuzzcheck$(TEXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h
603615
$(LTLINK) -o $@ $(FUZZCHECK_OPT) $(TOP)/test/fuzzcheck.c sqlite3.c $(TLIBS)
604616

605-
mptester$(TEXE): sqlite3.c $(TOP)/mptest/mptest.c
606-
$(LTLINK) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \
617+
mptester$(TEXE): sqlite3.lo $(TOP)/mptest/mptest.c
618+
$(LTLINK) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.lo \
607619
$(TLIBS) -rpath "$(libdir)"
608620

609621
MPTEST1=./mptester$(TEXE) mptest.db $(TOP)/mptest/crash01.test --repeat 20
@@ -1147,8 +1159,8 @@ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
11471159
LogEst$(TEXE): $(TOP)/tool/logest.c sqlite3.h
11481160
$(LTLINK) -I. -o $@ $(TOP)/tool/logest.c
11491161

1150-
wordcount$(TEXE): $(TOP)/test/wordcount.c sqlite3.c
1151-
$(LTLINK) -o $@ $(TOP)/test/wordcount.c sqlite3.c $(TLIBS)
1162+
wordcount$(TEXE): $(TOP)/test/wordcount.c sqlite3.lo
1163+
$(LTLINK) -o $@ $(TOP)/test/wordcount.c sqlite3.lo $(TLIBS)
11521164

11531165
speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.lo
11541166
$(LTLINK) -o $@ $(TOP)/test/speedtest1.c sqlite3.lo $(TLIBS)
@@ -1165,7 +1177,7 @@ loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
11651177
#
11661178
VALIDIDS=' sqlite3(changeset|changegroup|session)?_'
11671179
checksymbols: sqlite3.lo
1168-
nm -g --defined-only sqlite3.o | egrep -v $(VALIDIDS); test $$? -ne 0
1180+
nm -g --defined-only sqlite3.lo | egrep -v $(VALIDIDS); test $$? -ne 0
11691181
echo '0 errors out of 1 tests'
11701182

11711183
# Build the amalgamation-autoconf package. The amalamgation-tarball target builds
@@ -1246,6 +1258,7 @@ clean:
12461258
rm -f fuzzershell fuzzershell.exe
12471259
rm -f fuzzcheck fuzzcheck.exe
12481260
rm -f sqldiff sqldiff.exe
1261+
rm -f dbhash dbhash.exe
12491262
rm -f fts5.* fts5parse.*
12501263

12511264
distclean: clean

sqlite/Makefile.msc

+11-2
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,9 @@ TESTSRC = \
12921292
#
12931293
TESTEXT = \
12941294
$(TOP)\ext\misc\amatch.c \
1295+
$(TOP)\ext\misc\carray.c \
12951296
$(TOP)\ext\misc\closure.c \
1297+
$(TOP)\ext\misc\csv.c \
12961298
$(TOP)\ext\misc\eval.c \
12971299
$(TOP)\ext\misc\fileio.c \
12981300
$(TOP)\ext\misc\fuzzer.c \
@@ -1377,7 +1379,8 @@ TESTPROGS = \
13771379
testfixture.exe \
13781380
$(SQLITE3EXE) \
13791381
sqlite3_analyzer.exe \
1380-
sqldiff.exe
1382+
sqldiff.exe \
1383+
dbhash.exe
13811384

13821385
# Databases containing fuzzer test cases
13831386
#
@@ -1455,6 +1458,12 @@ $(SQLITE3EXE): $(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_S
14551458
sqldiff.exe: $(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H)
14561459
$(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
14571460

1461+
dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H)
1462+
$(LTLINK) $(NO_WARN) $(TOP)\tool\dbhash.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1463+
1464+
scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H)
1465+
$(LTLINK) $(NO_WARN) $(TOP)\ext\misc\scrub.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1466+
14581467
srcck1.exe: $(TOP)\tool\srcck1.c
14591468
$(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
14601469

@@ -2101,6 +2110,6 @@ clean:
21012110
del /Q shell.c sqlite3ext.h sqlite3session.h 2>NUL
21022111
del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
21032112
del /Q sqlite-*-output.vsix 2>NUL
2104-
del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe 2>NUL
2113+
del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
21052114
del /Q fts5.* fts5parse.* 2>NUL
21062115
# <</mark>>

sqlite/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.13.0
1+
3.14.1

sqlite/autoconf/Makefile.msc

+15-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ TOP = .
2424
USE_FULLWARN = 0
2525
!ENDIF
2626

27+
# Set this non-0 to enable full runtime error checks (-RTC1, etc). This
28+
# has no effect if (any) optimizations are enabled.
29+
#
30+
!IFNDEF USE_RUNTIME_CHECKS
31+
USE_RUNTIME_CHECKS = 0
32+
!ENDIF
33+
2734
# Set this non-0 to use "stdcall" calling convention for the core library
2835
# and shell executable.
2936
#
@@ -449,12 +456,12 @@ RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) $(RCOPTS) $(RCCOPTS)
449456
#
450457
!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
451458
!IF "$(PLATFORM)"=="x86"
452-
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
453-
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
459+
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
460+
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
454461
!ELSE
455462
!IFNDEF PLATFORM
456-
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
457-
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
463+
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
464+
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
458465
!ELSE
459466
CORE_CCONV_OPTS =
460467
SHELL_CCONV_OPTS =
@@ -740,6 +747,10 @@ RCC = $(RCC) -D_DEBUG
740747
!IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
741748
TCC = $(TCC) -Od
742749
BCC = $(BCC) -Od
750+
!IF $(USE_RUNTIME_CHECKS)!=0
751+
TCC = $(TCC) -RTC1
752+
BCC = $(BCC) -RTC1
753+
!ENDIF
743754
!ELSEIF $(OPTIMIZATIONS)>=3
744755
TCC = $(TCC) -Ox
745756
BCC = $(BCC) -Ox

sqlite/autoconf/configure.ac

+43-30
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,52 @@ AC_FUNC_STRERROR_R
3030
AC_CONFIG_FILES([Makefile sqlite3.pc])
3131
AC_SUBST(BUILD_CFLAGS)
3232

33-
#-----------------------------------------------------------------------
33+
#-------------------------------------------------------------------------
34+
# Two options to enable readline compatible libraries:
35+
#
3436
# --enable-editline
3537
# --enable-readline
3638
#
37-
AC_ARG_ENABLE(editline, [AS_HELP_STRING(
38-
[--enable-editline],
39-
[use BSD libedit])],
40-
[], [enable_editline=yes])
41-
AC_ARG_ENABLE(readline, [AS_HELP_STRING(
42-
[--enable-readline],
43-
[use readline])],
44-
[], [enable_readline=no])
45-
if test x"$enable_editline" != xno ; then
46-
sLIBS=$LIBS
47-
LIBS=""
48-
AC_SEARCH_LIBS([readline],[edit],[enable_readline=no],[enable_editline=no])
49-
READLINE_LIBS=$LIBS
50-
if test x"$LIBS" != "x"; then
51-
AC_DEFINE([HAVE_EDITLINE],1,Define to use BSD editline)
52-
else
53-
unset ac_cv_search_readline
54-
fi
55-
LIBS=$sLIBS
56-
fi
57-
if test x"$enable_readline" != xno ; then
58-
sLIBS=$LIBS
59-
LIBS=""
60-
AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], [])
61-
AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no])
62-
AC_CHECK_FUNCS(readline, [], [])
63-
READLINE_LIBS=$LIBS
64-
LIBS=$sLIBS
65-
fi
39+
# Both are enabled by default. If, after command line processing both are
40+
# still enabled, the script searches for editline first and automatically
41+
# disables readline if it is found. So, to use readline explicitly, the
42+
# user must pass "--disable-editline". To disable command line editing
43+
# support altogether, "--disable-editline --disable-readline".
44+
#
45+
# When searching for either library, check for headers before libraries
46+
# as some distros supply packages that contain libraries but not header
47+
# files, which come as a separate development package.
48+
#
49+
AC_ARG_ENABLE(editline, [AS_HELP_STRING([--enable-editline],[use BSD libedit])])
50+
AC_ARG_ENABLE(readline, [AS_HELP_STRING([--enable-readline],[use readline])])
51+
52+
AS_IF([ test x"$enable_editline" != xno ],[
53+
AC_CHECK_HEADERS([editline/readline.h],[
54+
sLIBS=$LIBS
55+
LIBS=""
56+
AC_SEARCH_LIBS([readline],[edit],[
57+
AC_DEFINE([HAVE_EDITLINE],1,Define to use BSD editline)
58+
READLINE_LIBS=$LIBS
59+
enable_readline=no
60+
])
61+
AS_UNSET(ac_cv_search_readline)
62+
LIBS=$sLIBS
63+
])
64+
])
65+
66+
AS_IF([ test x"$enable_readline" != xno ],[
67+
AC_CHECK_HEADERS([readline/readline.h],[
68+
sLIBS=$LIBS
69+
LIBS=""
70+
AC_SEARCH_LIBS(tgetent, termcap curses ncurses ncursesw, [], [])
71+
AC_SEARCH_LIBS(readline,[readline edit], [
72+
AC_DEFINE([HAVE_READLINE],1,Define to use readline or wrapper)
73+
READLINE_LIBS=$LIBS
74+
])
75+
LIBS=$sLIBS
76+
])
77+
])
78+
6679
AC_SUBST(READLINE_LIBS)
6780
#-----------------------------------------------------------------------
6881

sqlite/autoconf/tea/configure.ac

-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ TEA_ADD_LIBS([])
7878
TEA_ADD_CFLAGS([-DSQLITE_ENABLE_FTS3=1])
7979
TEA_ADD_CFLAGS([-DSQLITE_3_SUFFIX_ONLY=1])
8080
TEA_ADD_CFLAGS([-DSQLITE_ENABLE_RTREE=1])
81-
TEA_ADD_CFLAGS([-DSQLITE_OMIT_DEPRECATED=1])
8281
TEA_ADD_STUB_SOURCES([])
8382
TEA_ADD_TCL_SOURCES([])
8483

0 commit comments

Comments
 (0)