Skip to content

Commit 1e7695f

Browse files
committed
Merge sqlite-release(3.42.0) into prerelease-integration
2 parents 827424e + bfaa4f1 commit 1e7695f

File tree

205 files changed

+10003
-2083
lines changed

Some content is hidden

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

205 files changed

+10003
-2083
lines changed

Makefile.in

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -624,17 +624,35 @@ SHELL_OPT += -DSQLITE_ENABLE_OFFSET_SQL_FUNC
624624
FUZZERSHELL_OPT =
625625
FUZZCHECK_OPT += -I$(TOP)/test
626626
FUZZCHECK_OPT += -I$(TOP)/ext/recover
627-
FUZZCHECK_OPT += -DSQLITE_OMIT_LOAD_EXTENSION
628-
FUZZCHECK_OPT += -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ
629-
FUZZCHECK_OPT += -DSQLITE_MAX_MEMORY=50000000
630-
FUZZCHECK_OPT += -DSQLITE_PRINTF_PRECISION_LIMIT=1000
631-
FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS4
632-
FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS3_PARENTHESIS
633-
FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS5
634-
FUZZCHECK_OPT += -DSQLITE_ENABLE_RTREE
635-
FUZZCHECK_OPT += -DSQLITE_ENABLE_GEOPOLY
636-
FUZZCHECK_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
637-
FUZZCHECK_OPT += -DSQLITE_ENABLE_BYTECODE_VTAB
627+
FUZZCHECK_OPT += \
628+
-DSQLITE_OSS_FUZZ \
629+
-DSQLITE_ENABLE_BYTECODE_VTAB \
630+
-DSQLITE_ENABLE_DBPAGE_VTAB \
631+
-DSQLITE_ENABLE_DBSTAT_VTAB \
632+
-DSQLITE_ENABLE_BYTECODE_VTAB \
633+
-DSQLITE_ENABLE_DESERIALIZE \
634+
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
635+
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
636+
-DSQLITE_ENABLE_FTS4 \
637+
-DSQLITE_ENABLE_FTS5 \
638+
-DSQLITE_ENABLE_GEOPOLY \
639+
-DSQLITE_ENABLE_MATH_FUNCTIONS \
640+
-DSQLITE_ENABLE_MEMSYS5 \
641+
-DSQLITE_ENABLE_NORMALIZE \
642+
-DSQLITE_ENABLE_OFFSET_SQL_FUNC \
643+
-DSQLITE_ENABLE_PREUPDATE_HOOK \
644+
-DSQLITE_ENABLE_RTREE \
645+
-DSQLITE_ENABLE_SESSION \
646+
-DSQLITE_ENABLE_STMTVTAB \
647+
-DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION \
648+
-DSQLITE_ENABLE_STAT4 \
649+
-DSQLITE_ENABLE_STMT_SCANSTATUS \
650+
-DSQLITE_MAX_MEMORY=50000000 \
651+
-DSQLITE_MAX_MMAP_SIZE=0 \
652+
-DSQLITE_OMIT_LOAD_EXTENSION \
653+
-DSQLITE_PRINTF_PRECISION_LIMIT=1000 \
654+
-DSQLITE_PRIVATE=""
655+
638656
FUZZCHECK_SRC += $(TOP)/test/fuzzcheck.c
639657
FUZZCHECK_SRC += $(TOP)/test/ossfuzz.c
640658
FUZZCHECK_SRC += $(TOP)/test/fuzzinvariants.c
@@ -701,6 +719,9 @@ fuzzershell$(TEXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h
701719
fuzzcheck$(TEXE): $(FUZZCHECK_SRC) sqlite3.c sqlite3.h $(FUZZCHECK_DEP)
702720
$(LTLINK) -o $@ $(FUZZCHECK_OPT) $(FUZZCHECK_SRC) sqlite3.c $(TLIBS)
703721

722+
fuzzcheck-asan$(TEXE): $(FUZZCHECK_SRC) sqlite3.c sqlite3.h $(FUZZCHECK_DEP)
723+
$(LTLINK) -o $@ -fsanitize=address $(FUZZCHECK_OPT) $(FUZZCHECK_SRC) sqlite3.c $(TLIBS)
724+
704725
ossshell$(TEXE): $(TOP)/test/ossfuzz.c $(TOP)/test/ossshell.c sqlite3.c sqlite3.h
705726
$(LTLINK) -o $@ $(FUZZCHECK_OPT) $(TOP)/test/ossshell.c \
706727
$(TOP)/test/ossfuzz.c sqlite3.c $(TLIBS)

Makefile.msc

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ TESTSRC = \
15341534
$(TOP)\ext\fts3\fts3_term.c \
15351535
$(TOP)\ext\fts3\fts3_test.c \
15361536
$(TOP)\ext\rbu\test_rbu.c \
1537-
$(TOP)\ext\session\test_session.c
1537+
$(TOP)\ext\session\test_session.c
15381538

15391539
# Statically linked extensions.
15401540
#
@@ -1679,6 +1679,33 @@ FUZZERSHELL_COMPILE_OPTS =
16791679
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -I$(TOP)\test -I$(TOP)\ext\recover
16801680
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_MEMSYS5
16811681
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_OSS_FUZZ
1682+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
1683+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB
1684+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBSTAT_VTAB
1685+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
1686+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DESERIALIZE
1687+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS
1688+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS3_PARENTHESIS
1689+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS4
1690+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS5
1691+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_GEOPOLY
1692+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_MATH_FUNCTIONS
1693+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_MEMSYS5
1694+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_NORMALIZE
1695+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC
1696+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_PREUPDATE_HOOK
1697+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_RTREE
1698+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_SESSION
1699+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_STMTVTAB
1700+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
1701+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_STAT4
1702+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_STMT_SCANSTATUS
1703+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_MAX_MEMORY=50000000
1704+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_MAX_MMAP_SIZE=0
1705+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION
1706+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_PRINTF_PRECISION_LIMIT=1000
1707+
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_PRIVATE=""
1708+
16821709
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_MAX_MEMORY=50000000
16831710
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_PRINTF_PRECISION_LIMIT=1000
16841711
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION
@@ -1795,7 +1822,10 @@ dbfuzz.exe: $(TOP)\test\dbfuzz.c $(SQLITE3C) $(SQLITE3H)
17951822
$(LTLINK) $(NO_WARN) $(DBFUZZ_COMPILE_OPTS) $(TOP)\test\dbfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
17961823

17971824
fuzzcheck.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1798-
$(LTLINK) $(NO_WARN) $(FUZZCHECK_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1825+
$(LTLINK) /F 8388608 $(NO_WARN) $(FUZZCHECK_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1826+
1827+
fuzzcheck-asan.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1828+
$(LTLINK) $(NO_WARN) /fsanitize=address $(FUZZCHECK_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
17991829

18001830
ossshell.exe: $(OSSSHELL_SRC) $(SQLITE3C) $(SQLITE3H)
18011831
$(LTLINK) $(NO_WARN) $(FUZZCHECK_OPTS) $(OSSSHELL_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ and most of the documentation are managed separately.
169169

170170
## Version Control
171171

172-
SQLite sources are managed using the
172+
SQLite sources are managed using
173173
[Fossil](https://www.fossil-scm.org/), a distributed version control system
174174
that was specifically designed and written to support SQLite development.
175175
The [Fossil repository](https://sqlite.org/src/timeline) contains the urtext.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.41.2
1+
3.42.0

autoconf/tea/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dnl to configure the system for the local environment.
1919
# so that we create the export library with the dll.
2020
#-----------------------------------------------------------------------
2121

22-
AC_INIT([sqlite],[3.41.2])
22+
AC_INIT([sqlite],[3.42.0])
2323

2424
#--------------------------------------------------------------------
2525
# Call TEA_INIT as the first TEA_ macro to set up initial vars.

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.69 for sqlcipher 3.41.2.
3+
# Generated by GNU Autoconf 2.69 for sqlcipher 3.42.0.
44
#
55
#
66
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
587587
# Identity of this package.
588588
PACKAGE_NAME='sqlcipher'
589589
PACKAGE_TARNAME='sqlcipher'
590-
PACKAGE_VERSION='3.41.2'
591-
PACKAGE_STRING='sqlcipher 3.41.2'
590+
PACKAGE_VERSION='3.42.0'
591+
PACKAGE_STRING='sqlcipher 3.42.0'
592592
PACKAGE_BUGREPORT=''
593593
PACKAGE_URL=''
594594

@@ -1354,7 +1354,7 @@ if test "$ac_init_help" = "long"; then
13541354
# Omit some internal or obsolete options to make the list less imposing.
13551355
# This message is too long to be a string in the A/UX 3.1 sh.
13561356
cat <<_ACEOF
1357-
\`configure' configures sqlcipher 3.41.2 to adapt to many kinds of systems.
1357+
\`configure' configures sqlcipher 3.42.0 to adapt to many kinds of systems.
13581358
13591359
Usage: $0 [OPTION]... [VAR=VALUE]...
13601360
@@ -1420,7 +1420,7 @@ fi
14201420

14211421
if test -n "$ac_init_help"; then
14221422
case $ac_init_help in
1423-
short | recursive ) echo "Configuration of sqlcipher 3.41.2:";;
1423+
short | recursive ) echo "Configuration of sqlcipher 3.42.0:";;
14241424
esac
14251425
cat <<\_ACEOF
14261426
@@ -1562,7 +1562,7 @@ fi
15621562
test -n "$ac_init_help" && exit $ac_status
15631563
if $ac_init_version; then
15641564
cat <<\_ACEOF
1565-
sqlcipher configure 3.41.2
1565+
sqlcipher configure 3.42.0
15661566
generated by GNU Autoconf 2.69
15671567
15681568
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1981,7 +1981,7 @@ cat >config.log <<_ACEOF
19811981
This file contains any messages produced by compilers while
19821982
running configure, to aid debugging if configure makes a mistake.
19831983
1984-
It was created by sqlcipher $as_me 3.41.2, which was
1984+
It was created by sqlcipher $as_me 3.42.0, which was
19851985
generated by GNU Autoconf 2.69. Invocation command line was
19861986
19871987
$ $0 $@
@@ -14086,7 +14086,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1408614086
# report actual input values of CONFIG_FILES etc. instead of their
1408714087
# values after options handling.
1408814088
ac_log="
14089-
This file was extended by sqlcipher $as_me 3.41.2, which was
14089+
This file was extended by sqlcipher $as_me 3.42.0, which was
1409014090
generated by GNU Autoconf 2.69. Invocation command line was
1409114091
1409214092
CONFIG_FILES = $CONFIG_FILES
@@ -14152,7 +14152,7 @@ _ACEOF
1415214152
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1415314153
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1415414154
ac_cs_version="\\
14155-
sqlcipher config.status 3.41.2
14155+
sqlcipher config.status 3.42.0
1415614156
configured by $0, generated by GNU Autoconf 2.69,
1415714157
with options \\"\$ac_cs_config\\"
1415814158

doc/lemon.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ <h4>3.2.1 Allocating The Parse Object On Stack</h4>
322322
<ul>
323323
<li> Declare a local variable of type "yyParser"
324324
<li> Initialize the variable using ParseInit()
325-
<li> Pass a pointer to the variable in calls ot Parse()
325+
<li> Pass a pointer to the variable in calls to Parse()
326326
<li> Deallocate substructure in the parse variable using ParseFinalize().
327327
</ul>
328328

ext/fts5/fts5Int.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ struct Fts5Config {
199199
int ePattern; /* FTS_PATTERN_XXX constant */
200200

201201
/* Values loaded from the %_config table */
202+
int iVersion; /* fts5 file format 'version' */
202203
int iCookie; /* Incremented when %_config is modified */
203204
int pgsz; /* Approximate page size used in %_data */
204205
int nAutomerge; /* 'automerge' setting */
@@ -207,6 +208,7 @@ struct Fts5Config {
207208
int nHashSize; /* Bytes of memory for in-memory hash */
208209
char *zRank; /* Name of rank function */
209210
char *zRankArgs; /* Arguments to rank function */
211+
int bSecureDelete; /* 'secure-delete' */
210212

211213
/* If non-NULL, points to sqlite3_vtab.base.zErrmsg. Often NULL. */
212214
char **pzErrmsg;
@@ -216,8 +218,11 @@ struct Fts5Config {
216218
#endif
217219
};
218220

219-
/* Current expected value of %_config table 'version' field */
220-
#define FTS5_CURRENT_VERSION 4
221+
/* Current expected value of %_config table 'version' field. And
222+
** the expected version if the 'secure-delete' option has ever been
223+
** set on the table. */
224+
#define FTS5_CURRENT_VERSION 4
225+
#define FTS5_CURRENT_VERSION_SECUREDELETE 5
221226

222227
#define FTS5_CONTENT_NORMAL 0
223228
#define FTS5_CONTENT_NONE 1
@@ -383,6 +388,7 @@ struct Fts5IndexIter {
383388
** above. */
384389
#define FTS5INDEX_QUERY_SKIPEMPTY 0x0010
385390
#define FTS5INDEX_QUERY_NOOUTPUT 0x0020
391+
#define FTS5INDEX_QUERY_SKIPHASH 0x0040
386392

387393
/*
388394
** Create/destroy an Fts5Index object.
@@ -537,7 +543,7 @@ int sqlite3Fts5GetVarintLen(u32 iVal);
537543
u8 sqlite3Fts5GetVarint(const unsigned char*, u64*);
538544
int sqlite3Fts5PutVarint(unsigned char *p, u64 v);
539545

540-
#define fts5GetVarint32(a,b) sqlite3Fts5GetVarint32(a,(u32*)&b)
546+
#define fts5GetVarint32(a,b) sqlite3Fts5GetVarint32(a,(u32*)&(b))
541547
#define fts5GetVarint sqlite3Fts5GetVarint
542548

543549
#define fts5FastGetVarint32(a, iOff, nVal) { \

ext/fts5/fts5_aux.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static int fts5HighlightCb(
163163
if( tflags & FTS5_TOKEN_COLOCATED ) return SQLITE_OK;
164164
iPos = p->iPos++;
165165

166-
if( p->iRangeEnd>0 ){
166+
if( p->iRangeEnd>=0 ){
167167
if( iPos<p->iRangeStart || iPos>p->iRangeEnd ) return SQLITE_OK;
168168
if( p->iRangeStart && iPos==p->iRangeStart ) p->iOff = iStartOff;
169169
}
@@ -175,7 +175,7 @@ static int fts5HighlightCb(
175175
}
176176

177177
if( iPos==p->iter.iEnd ){
178-
if( p->iRangeEnd && p->iter.iStart<p->iRangeStart ){
178+
if( p->iRangeEnd>=0 && p->iter.iStart<p->iRangeStart ){
179179
fts5HighlightAppend(&rc, p, p->zOpen, -1);
180180
}
181181
fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);
@@ -186,7 +186,7 @@ static int fts5HighlightCb(
186186
}
187187
}
188188

189-
if( p->iRangeEnd>0 && iPos==p->iRangeEnd ){
189+
if( p->iRangeEnd>=0 && iPos==p->iRangeEnd ){
190190
fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);
191191
p->iOff = iEndOff;
192192
if( iPos>=p->iter.iStart && iPos<p->iter.iEnd ){
@@ -221,6 +221,7 @@ static void fts5HighlightFunction(
221221
memset(&ctx, 0, sizeof(HighlightContext));
222222
ctx.zOpen = (const char*)sqlite3_value_text(apVal[1]);
223223
ctx.zClose = (const char*)sqlite3_value_text(apVal[2]);
224+
ctx.iRangeEnd = -1;
224225
rc = pApi->xColumnText(pFts, iCol, &ctx.zIn, &ctx.nIn);
225226

226227
if( ctx.zIn ){
@@ -406,6 +407,7 @@ static void fts5SnippetFunction(
406407
iCol = sqlite3_value_int(apVal[0]);
407408
ctx.zOpen = fts5ValueToText(apVal[1]);
408409
ctx.zClose = fts5ValueToText(apVal[2]);
410+
ctx.iRangeEnd = -1;
409411
zEllips = fts5ValueToText(apVal[3]);
410412
nToken = sqlite3_value_int(apVal[4]);
411413

ext/fts5/fts5_config.c

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ int sqlite3Fts5ConfigParse(
550550
rc = SQLITE_ERROR;
551551
}
552552

553+
assert( (pRet->abUnindexed && pRet->azCol) || rc!=SQLITE_OK );
553554
for(i=3; rc==SQLITE_OK && i<nArg; i++){
554555
const char *zOrig = azArg[i];
555556
const char *z;
@@ -903,6 +904,18 @@ int sqlite3Fts5ConfigSetValue(
903904
rc = SQLITE_OK;
904905
*pbBadkey = 1;
905906
}
907+
}
908+
909+
else if( 0==sqlite3_stricmp(zKey, "secure-delete") ){
910+
int bVal = -1;
911+
if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){
912+
bVal = sqlite3_value_int(pVal);
913+
}
914+
if( bVal<0 ){
915+
*pbBadkey = 1;
916+
}else{
917+
pConfig->bSecureDelete = (bVal ? 1 : 0);
918+
}
906919
}else{
907920
*pbBadkey = 1;
908921
}
@@ -947,15 +960,20 @@ int sqlite3Fts5ConfigLoad(Fts5Config *pConfig, int iCookie){
947960
rc = sqlite3_finalize(p);
948961
}
949962

950-
if( rc==SQLITE_OK && iVersion!=FTS5_CURRENT_VERSION ){
963+
if( rc==SQLITE_OK
964+
&& iVersion!=FTS5_CURRENT_VERSION
965+
&& iVersion!=FTS5_CURRENT_VERSION_SECUREDELETE
966+
){
951967
rc = SQLITE_ERROR;
952968
if( pConfig->pzErrmsg ){
953969
assert( 0==*pConfig->pzErrmsg );
954-
*pConfig->pzErrmsg = sqlite3_mprintf(
955-
"invalid fts5 file format (found %d, expected %d) - run 'rebuild'",
956-
iVersion, FTS5_CURRENT_VERSION
970+
*pConfig->pzErrmsg = sqlite3_mprintf("invalid fts5 file format "
971+
"(found %d, expected %d or %d) - run 'rebuild'",
972+
iVersion, FTS5_CURRENT_VERSION, FTS5_CURRENT_VERSION_SECUREDELETE
957973
);
958974
}
975+
}else{
976+
pConfig->iVersion = iVersion;
959977
}
960978

961979
if( rc==SQLITE_OK ){

0 commit comments

Comments
 (0)