8000 track 3.7.13 · codeguru85/sqlcipher@de4f34b · GitHub
[go: up one dir, main page]

Skip to content

Commit de4f34b

Browse files
committed
track 3.7.13
1 parent 35a66a5 commit de4f34b

Some content is hidden

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

66 files changed

+29548
-568
lines changed

Makefile.in

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \
165165
backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
166166
callback.lo complete.lo ctime.lo date.lo delete.lo \
167167
expr.lo fault.lo fkey.lo \
168-
fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo fts3_porter.lo \
169-
fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo fts3_write.lo \
168+
fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
169+
fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
170+
fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
170171
func.lo global.lo hash.lo \
171172
icu.lo insert.lo journal.lo legacy.lo loadext.lo \
172173
main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
@@ -317,6 +318,8 @@ SRC += \
317318
$(TOP)/ext/fts3/fts3_tokenizer.h \
318319
$(TOP)/ext/fts3/fts3_tokenizer.c \
319320
$(TOP)/ext/fts3/fts3_tokenizer1.c \
321+
$(TOP)/ext/fts3/fts3_unicode.c \
322+
$(TOP)/ext/fts3/fts3_unicode2.c \
320323
$(TOP)/ext/fts3/fts3_write.c
321324
SRC += \
322325
$(TOP)/ext/icu/sqliteicu.h \
@@ -856,6 +859,12 @@ fts3_tokenizer.lo: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
856859
fts3_tokenizer1.lo: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
857860
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
858861

862+
fts3_unicode.lo: $(TOP)/ext/fts3/fts3_unicode.c $(HDR) $(EXTHDR)
863+
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode.c
864+
865+
fts3_unicode2.lo: $(TOP)/ext/fts3/fts3_unicode2.c $(HDR) $(EXTHDR)
866+
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode2.c
867+
859868
fts3_write.lo: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
860869
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
861870

Makefile.msc

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ USE_AMALGAMATION = 1
1515
#
1616
USE_ICU = 0
1717

18+
# Set this non-0 to compile binaries suitable for the WinRT environment.
19+
# This setting does not apply to any binaries that require Tcl to operate
20+
# properly (i.e. the text fixture, etc).
21+
#
22+
FOR_WINRT = 0
23+
1824
# Set this to non-0 to create and use PDBs.
1925
#
2026
SYMBOLS = 1
@@ -32,24 +38,29 @@ SYMBOLS = 1
3238
#
3339
DEBUG = 0
3440

35-
# Version numbers and release number for the SQLite being compiled.
36-
#
37-
VERSION = 3.7
38-
VERSION_NUMBER = 3007009
39-
RELEASE = 3.7.9
40-
4141
# C Compiler and options for use in building executables that
4242
# will run on the platform that is doing the build.
4343
#
44-
BCC = cl.exe
44+
BCC = cl.exe -W3
4545

4646
# C Compile and options for use in building executables that
4747
# will run on the target platform. (BCC and TCC are usually the
4848
# same unless your are cross-compiling.)
4949
#
5050
TCC = cl.exe -W3 -DSQLITE_OS_WIN=1 -I. -I$(TOP)\src -fp:precise
5151

52-
# The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
52+
# When compiling the library for use in the WinRT environment,
53+
# the following compile-time options must be used as well to
54+
# disable use of Win32 APIs that are not available and to enable
55+
# use of Win32 APIs that are specific to Windows 8 and/or WinRT.
56+
# Also, we need to dynamically link to the MSVC runtime when
57+
# compiling for WinRT.
58+
#
59+
!IF $(FOR_WINRT)!=0
60+
TCC = $(TCC) -DSQLITE_OS_WINRT=1 -MD
61+
!ENDIF
62+
63+
# The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
5364
# any extension header files by default. For non-amalgamation
5465
# builds, we need to make sure the compiler can find these.
5566
#
@@ -64,6 +75,7 @@ TCC = $(TCC) -I$(TOP)\ext\rtree
6475
#
6576
!IF $(DEBUG)==0
6677
TCC = $(TCC) -DNDEBUG
78+
BCC = $(BCC) -DNDEBUG
6779
!ENDIF
6880

6981
!IF $(DEBUG)>1
@@ -82,6 +94,7 @@ TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE
8294
# Prevent warnings about "insecure" runtime library functions being used.
8395
#
8496
TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
97+
BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
8598

8699
#
87100
# Use native Win32 heap instead of malloc/free?
@@ -194,12 +207,15 @@ TCC = $(TCC) $(OPTS)
194207
# If debugging is enabled, disable all optimizations and enable PDBs.
195208
!IF $(DEBUG)>0
196209
TCC = $(TCC) -Od -D_DEBUG
210+
BCC = $(BCC) -Od -D_DEBUG
197211
!ELSE
198212
TCC = $(TCC) -O2
213+
BCC = $(BCC) -O2
199214
!ENDIF
200215

201216
!IF $(DEBUG)>0 || $(SYMBOLS)!=0
202217
TCC = $(TCC) -Zi
218+
BCC = $(BCC) -Zi
203219
!ENDIF
204220

205221
# If ICU support is enabled, add the compiler options for it.
@@ -223,9 +239,18 @@ LTLINKOPTS = /MACHINE:$(PLATFORM)
223239
LTLIBOPTS = /MACHINE:$(PLATFORM)
224240
!ENDIF
225241

226-
# If debugging is enabled, enable PDBs.
242+
# When compiling for use in the WinRT environment, the following
243+
# linker option must be used to mark the executable as runnable
244+
# only in the context of an application container.
245+
#
246+
!IF $(FOR_WINRT)!=0
247+
LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
248+
!ENDIF
249+
250+
# If either debugging or symbols are enabled, enable PDBs.
227251
!IF $(DEBUG)>0 || $(SYMBOLS)!=0
228252
LTLINKOPTS = $(LTLINKOPTS) /DEBUG
253+
BCC = $(BCC) /DEBUG
229254
!ENDIF
230255

231256
# Start with the Tcl related linker options.
@@ -250,8 +275,9 @@ LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \
250275
backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
251276
callback.lo complete.lo ctime.lo date.lo delete.lo \
252277
expr.lo fault.lo fkey.lo \
253-
fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo fts3_porter.lo \
254-
fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo fts3_write.lo \
278+
fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
279+
fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
280+
fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
255281
func.lo global.lo hash.lo \
256282
icu.lo insert.lo journal.lo legacy.lo loadext.lo \
257283
main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
@@ -405,6 +431,8 @@ SRC = $(SRC) \
405431
$(TOP)\ext\fts3\fts3_tokenizer.h \
406432
$(TOP)\ext\fts3\fts3_tokenizer.c \
407433
$(TOP)\ext\fts3\fts3_tokenizer1.c \
434+
$(TOP)\ext\fts3\fts3_unicode.c \
435+
$(TOP)\ext\fts3\fts3_unicode2.c \
408436
$(TOP)\ext\fts3\fts3_write.c
409437
SRC = $(SRC) \
410438
$(TOP)\ext\icu\sqliteicu.h \
@@ -512,6 +540,8 @@ TESTSRC2 = \
512540
$(TOP)\ext\fts3\fts3_aux.c \
513541
$(TOP)\ext\fts3\fts3_expr.c \
514542
$(TOP)\ext\fts3\fts3_tokenizer.c \
543+
$(TOP)\ext\fts3\fts3_unicode.c \
544+
$(TOP)\ext\fts3\fts3_unicode2.c \
515545
$(TOP)\ext\fts3\fts3_write.c \
516546
$(TOP)\ext\async\sqlite3async.c
517547

@@ -926,6 +956,12 @@ fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
926956
fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
927957
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
928958

959+
fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
960+
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
961+
962+
fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
963+
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
964+
929965
fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
930966
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write 10000 .c
931967

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.12.1
1+
3.7.13

configure

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.62 for sqlite 3.7.12.1.
3+
# Generated by GNU Autoconf 2.62 for sqlite 3.7.13.
44
#
55
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
66
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
743743
# Identity of this package.
744744
PACKAGE_NAME='sqlite'
745745
PACKAGE_TARNAME='sqlite'
746-
PACKAGE_VERSION='3.7.12.1'
747-
PACKAGE_STRING='sqlite 3.7.12.1'
746+
PACKAGE_VERSION='3.7.13'
747+
PACKAGE_STRING='sqlite 3.7.13'
748748
PACKAGE_BUGREPORT=''
749749

750750
# Factoring default headers for most tests.
@@ -1485,7 +1485,7 @@ if test "$ac_init_help" = "long"; then
14851485
# Omit some internal or obsolete options to make the list less imposing.
14861486
# This message is too long to be a string in the A/UX 3.1 sh.
14871487
cat <<_ACEOF
1488-
\`configure' configures sqlite 3.7.12.1 to adapt to many kinds of systems.
1488+
\`configure' configures sqlite 3.7.13 to adapt to many kinds of systems.
14891489
14901490
Usage: $0 [OPTION]... [VAR=VALUE]...
14911491
@@ -1550,7 +1550,7 @@ fi
15501550

15511551
if test -n "$ac_init_help"; then
15521552
case $ac_init_help in
1553-
short | recursive ) echo "Configuration of sqlite 3.7.12.1:";;
1553+
short | recursive ) echo "Configuration of sqlite 3.7.13:";;
15541554
esac
15551555
cat <<\_ACEOF
15561556
@@ -1666,7 +1666,7 @@ fi
16661666
test -n "$ac_init_help" && exit $ac_status
16671667
if $ac_init_version; then
16681668
cat <<\_ACEOF
1669-
sqlite configure 3.7.12.1
1669+
sqlite configure 3.7.13
16701670
generated by GNU Autoconf 2.62
16711671
16721672
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1680,7 +1680,7 @@ cat >config.log <<_ACEOF
16801680
This file contains any messages produced by compilers while
16811681
running configure, to aid debugging if configure makes a mistake.
16821682
1683-
It was created by sqlite $as_me 3.7.12.1, which was
1683+
It was created by sqlite $as_me 3.7.13, which was
16841684
generated by GNU Autoconf 2.62. Invocation command line was
16851685
16861686
$ $0 $@
@@ -14032,7 +14032,7 @@ exec 6>&1
1403214032
# report actual input values of CONFIG_FILES etc. instead of their
1403314033
# values after options handling.
1403414034
ac_log="
14035-
This file was extended by sqlite $as_me 3.7.12.1, which was
14035+
This file was extended by sqlite $as_me 3.7.13, which was
1403614036
generated by GNU Autoconf 2.62. Invocation command line was
1403714037
1403814038
CONFIG_FILES = $CONFIG_FILES
@@ -14085,7 +14085,7 @@ Report bugs to <bug-autoconf@gnu.org>."
1408514085
_ACEOF
1408614086
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1408714087
ac_cs_version="\\
14088-
sqlite config.status 3.7.12.1
14088+
sqlite config.status 3.7.13
1408914089
configured by $0, generated by GNU Autoconf 2.62,
1409014090
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
1409114091

ext/fts3/README.tokenizers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
);
1212

1313
The built-in tokenizers (valid values to pass as <tokenizer name>) are
14-
"simple" and "porter".
14+
"simple", "porter" and "unicode".
1515

1616
<tokenizer-args> should consist of zero or more white-space separated
1717
arguments to pass to the selected tokenizer implementation. The

ext/fts3/fts3.c

Lines changed: 14 additions & 0 deletions
< 10000 td data-grid-cell-id="diff-e03b5198d01f98990740f42ad6134b4546c9e6023764ed4d3299713a48cdc181-3579-3589-1" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative diff-line-number-neutral left-side">3589
Original file line numberDiff line numberDiff line change
@@ -3554,6 +3554,9 @@ static void hashDestroy(void *p){
35543554
*/
35553555
void sqlite3Fts3SimpleTokenizerModule(sqlite3_tokenizer_module const**ppModule);
35563556
void sqlite3Fts3PorterTokenizerModule(sqlite3_tokenizer_module const**ppModule);
3557+
#ifdef SQLITE_ENABLE_FTS4_UNICODE61
3558+
void sqlite3Fts3UnicodeTokenizer(sqlite3_tokenizer_module const**ppModule);
3559+
#endif
35573560
#ifdef SQLITE_ENABLE_ICU
35583561
void sqlite3Fts3IcuTokenizerModule(sqlite3_tokenizer_module const**ppModule);
35593562
#endif
@@ -3569,12 +3572,19 @@ int sqlite3Fts3Init(sqlite3 *db){
35693572
Fts3Hash *pHash = 0;
35703573
const sqlite3_tokenizer_module *pSimple = 0;
35713574
const sqlite3_tokenizer_module *pPorter = 0;
3575+
#ifdef SQLITE_ENABLE_FTS4_UNICODE61
3576+
const sqlite3_tokenizer_module *pUnicode = 0;
3577+
#endif
35723578

35733579
#ifdef SQLITE_ENABLE_ICU
35743580
const sqlite3_tokenizer_module *pIcu = 0;
35753581
sqlite3Fts3IcuTokenizerModule(&pIcu);
35763582
#endif
35773583

3584+
#ifdef SQLITE_ENABLE_FTS4_UNICODE61
3585+
sqlite3Fts3UnicodeTokenizer(&pUnicode);
3586+
#endif
3587+
35783588
#ifdef SQLITE_TEST
3579
rc = sqlite3Fts3InitTerm(db);
35803590
if( rc!=SQLITE_OK ) return rc;
@@ -3598,6 +3608,10 @@ int sqlite3Fts3Init(sqlite3 *db){
35983608
if( rc==SQLITE_OK ){
35993609
if( sqlite3Fts3HashInsert(pHash, "simple", 7, (void *)pSimple)
36003610
|| sqlite3Fts3HashInsert(pHash, "porter", 7, (void *)pPorter)
3611+
3612+
#ifdef SQLITE_ENABLE_FTS4_UNICODE61
3613+
|| sqlite3Fts3HashInsert(pHash, "unicode61", 10, (void *)pUnicode)
3614+
#endif
36013615
#ifdef SQLITE_ENABLE_ICU
36023616
|| (pIcu && sqlite3Fts3HashInsert(pHash, "icu", 4, (void *)pIcu))
36033617
#endif

ext/fts3/fts3Int.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,5 +541,12 @@ int sqlite3Fts3MsrIncrRestart(Fts3MultiSegReader *pCsr);
541541

542542
int sqlite3Fts3DeferredTokenList(Fts3DeferredToken *, char **, int *);
543543

544+
/* fts3_unicode2.c (functions generated by parsing unicode text files) */
545+
#ifdef SQLITE_ENABLE_FTS4_UNICODE61
546+
int sqlite3FtsUnicodeFold(int, int);
547+
int sqlite3FtsUnicodeIsalnum(int);
548+
int sqlite3FtsUnicodeIsdiacritic(int);
549+
#endif
550+
544551
#endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
545552
#endif /* _FTSINT_H */

ext/fts3/fts3_tokenizer.c

Lines changed: 14 additions & 14 deletions
9739
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,9 @@ int sqlite3Fts3InitTokenizer(
209209
/*
210210
** Implementation of a special SQL scalar function for testing tokenizers
211211
** designed to be used in concert with the Tcl testing framework. This
212-
** function must be called with two arguments:
212+
** function must be called with two or more arguments:
213213
**
214-
** SELECT <function-name>(<key-name>, <input-string>);
215-
** SELECT <function-name>(<key-name>, <pointer>);
214+
** SELECT <function-name>(<key-name>, ..., <input-string>);
216215
**
217216
** where <function-name> is the name passed as the second argument
218217
** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer')
@@ -249,27 +248,27 @@ static void testFunc(
249248
const char *zInput;
250249
int nInput;
251250

252-
const char *zArg = 0;
251+
const char *azArg[64];
253252

254253
const char *zToken;
255254
int nToken;
256255
int iStart;
257256
int iEnd;
258257
int iPos;
258+
int i;
259259

260260
Tcl_Obj *pRet;
261261

262-
assert( argc==2 || argc==3 );
262+
if( argc<2 ){
263+
sqlite3_result_error(context, "insufficient arguments", -1);
264+
return;
265+
}
263266

264267
nName = sqlite3_value_bytes(argv[0]);
265268
zName = (const char *)sqlite3_value_text(argv[0]);
266269
nInput = sqlite3_value_bytes(argv[argc-1]);
267270
zInput = (const char *)sqlite3_value_text(argv[argc-1]);
268271

269-
if( argc==3 ){
270-
zArg = (const char *)sqlite3_value_text(argv[1]);
271-
}
272-
273272
pHash = (Fts3Hash *)sqlite3_user_data(context);
274273
p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
275274

@@ -283,7 +282,11 @@ static void testFunc(
283282
pRet = Tcl_NewObj();
284283
Tcl_IncrRefCount(pRet);
285284

286-
if( SQLITE_OK!=p->xCreate(zArg ? 1 : 0, &zArg, &pTokenizer) ){
285+
for(i=1; i<argc-1; i++){
286+
azArg[i-1] = (const char *)sqlite3_value_text(argv[i]);
287+
}
288+
289+
if( SQLITE_OK!=p->xCreate(argc-2, azArg, &pTokenizer) ){
287290
zErr = "error in xCreate()";
288291
goto finish;
289292
}
@@ -467,10 +470,7 @@ int sqlite3Fts3InitHashTable(
467470
}
468471
#ifdef SQLITE_TEST
469472
if( SQLITE_OK==rc ){
470-
rc = sqlite3_create_function(db, zTest, 2, any, p, testFunc, 0, 0);
471-
}
472-
if( SQLITE_OK==rc ){
473-
rc = sqlite3_create_function(db, zTest, 3, any, p, testFunc, 0, 0);
473+
rc = sqlite3_create_function(db, zTest, -1, any, p, testFunc, 0, 0);
474474
}
475475
if( SQLITE_OK==rc ){
476476
rc = sqlite3_create_function(db, zTest2, 0, any, pdb, intTestFunc, 0, 0);

0 commit comments

Comments
 (0)
0