Skip to content

Commit c93bb1b

Browse files
Update SQLite to 3.16.2
1 parent 5394d77 commit c93bb1b

19 files changed

+415
-104
lines changed

README.md

+3-3
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-
**January 3, 2017: Update SQLite to 3.16.1** ([changelog](CHANGELOG.md)).
11+
**January 6, 2017: Update SQLite to 3.16.2** ([changelog](CHANGELOG.md)).
1212

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

15-
**SQLite Included:** **[3.16.1](https://www.sqlite.org/releaselog/3_16_1.html)**
15+
**SQLite Included:** **[3.16.2](https://www.sqlite.org/releaselog/3_16_2.html)**
1616

1717

1818

@@ -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.16.1.
68+
SQLiteLib currently ships with the source for SQLite 3.16.2.
6969

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

sqlite/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.16.1
1+
3.16.2

sqlite/configure

+9-9
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 sqlite 3.16.1.
3+
# Generated by GNU Autoconf 2.69 for sqlite 3.16.2.
44
#
55
#
66
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ MAKEFLAGS=
726726
# Identity of this package.
727727
PACKAGE_NAME='sqlite'
728728
PACKAGE_TARNAME='sqlite'
729-
PACKAGE_VERSION='3.16.1'
730-
PACKAGE_STRING='sqlite 3.16.1'
729+
PACKAGE_VERSION='3.16.2'
730+
PACKAGE_STRING='sqlite 3.16.2'
731731
PACKAGE_BUGREPORT=''
732732
PACKAGE_URL=''
733733

@@ -1463,7 +1463,7 @@ if test "$ac_init_help" = "long"; then
14631463
# Omit some internal or obsolete options to make the list less imposing.
14641464
# This message is too long to be a string in the A/UX 3.1 sh.
14651465
cat <<_ACEOF
1466-
\`configure' configures sqlite 3.16.1 to adapt to many kinds of systems.
1466+
\`configure' configures sqlite 3.16.2 to adapt to many kinds of systems.
14671467
14681468
Usage: $0 [OPTION]... [VAR=VALUE]...
14691469
@@ -1528,7 +1528,7 @@ fi
15281528

15291529
if test -n "$ac_init_help"; then
15301530
case $ac_init_help in
1531-
short | recursive ) echo "Configuration of sqlite 3.16.1:";;
1531+
short | recursive ) echo "Configuration of sqlite 3.16.2:";;
15321532
esac
15331533
cat <<\_ACEOF
15341534
@@ -1652,7 +1652,7 @@ fi
16521652
test -n "$ac_init_help" && exit $ac_status
16531653
if $ac_init_version; then
16541654
cat <<\_ACEOF
1655-
sqlite configure 3.16.1
1655+
sqlite configure 3.16.2
16561656
generated by GNU Autoconf 2.69
16571657
16581658
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2071,7 +2071,7 @@ cat >config.log <<_ACEOF
20712071
This file contains any messages produced by compilers while
20722072
running configure, to aid debugging if configure makes a mistake.
20732073
2074-
It was created by sqlite $as_me 3.16.1, which was
2074+
It was created by sqlite $as_me 3.16.2, which was
20752075
generated by GNU Autoconf 2.69. Invocation command line was
20762076
20772077
$ $0 $@
@@ -12151,7 +12151,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1215112151
# report actual input values of CONFIG_FILES etc. instead of their
1215212152
# values after options handling.
1215312153
ac_log="
12154-
This file was extended by sqlite $as_me 3.16.1, which was
12154+
This file was extended by sqlite $as_me 3.16.2, which was
1215512155
generated by GNU Autoconf 2.69. Invocation command line was
1215612156
1215712157
CONFIG_FILES = $CONFIG_FILES
@@ -12217,7 +12217,7 @@ _ACEOF
1221712217
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1221812218
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1221912219
ac_cs_version="\\
12220-
sqlite config.status 3.16.1
12220+
sqlite config.status 3.16.2
1222112221
configured by $0, generated by GNU Autoconf 2.69,
1222212222
with options \\"\$ac_cs_config\\"
1222312223

sqlite/ext/fts5/fts5_index.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -2039,7 +2039,7 @@ static void fts5SegIterNext(
20392039
else if( pLeaf->nn>pLeaf->szLeaf ){
20402040
pIter->iPgidxOff = pLeaf->szLeaf + fts5GetVarint32(
20412041
&pLeaf->p[pLeaf->szLeaf], iOff
2042-
);
2042+
);
20432043
pIter->iLeafOffset = iOff;
20442044
pIter->iEndofDoclist = iOff;
20452045
bNewTerm = 1;
@@ -2073,6 +2073,7 @@ static void fts5SegIterNext(
20732073
*/
20742074
int nSz;
20752075
assert( p->rc==SQLITE_OK );
2076+
assert( pIter->iLeafOffset<=pIter->pLeaf->nn );
20762077
fts5FastGetVarint32(pIter->pLeaf->p, pIter->iLeafOffset, nSz);
20772078
pIter->bDel = (nSz & 0x0001);
20782079
pIter->nPos = nSz>>1;
@@ -3067,7 +3068,7 @@ static void fts5ChunkIterate(
30673068
break;
30683069
}else{
30693070
pgno++;
3070-
pData = fts5DataRead(p, FTS5_SEGMENT_ROWID(pSeg->pSeg->iSegid, pgno));
3071+
pData = fts5LeafRead(p, FTS5_SEGMENT_ROWID(pSeg->pSeg->iSegid, pgno));
30713072
if( pData==0 ) break;
30723073
pChunk = &pData->p[4];
30733074
nChunk = MIN(nRem, pData->szLeaf - 4);
@@ -5829,7 +5830,7 @@ static void fts5IndexIntegrityCheckSegment(
58295830
** ignore this b-tree entry. Otherwise, load it into memory. */
58305831
if( iIdxLeaf<pSeg->pgnoFirst ) continue;
58315832
iRow = FTS5_SEGMENT_ROWID(pSeg->iSegid, iIdxLeaf);
5832-
pLeaf = fts5DataRead(p, iRow);
5833+
pLeaf = fts5LeafRead(p, iRow);
58335834
if( pLeaf==0 ) break;
58345835

58355836
/* Check that the leaf contains at least one term, and that it is equal

sqlite/manifest

+22-20
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
C Version\s3.16.1
2-
D 2017-01-03T18:27:03.194
1+
C Version\s3.16.2
2+
D 2017-01-06T16:32:41.471
33
F Makefile.in 41bd4cad981487345c4a84081074bcdb876e4b2e
44
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
55
F Makefile.msc b8ca53350ae545e3562403d5da2a69cec79308da
66
F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
7-
F VERSION 571f747f178898e400d90570d3ca7898732170a6
7+
F VERSION 5c92800c89751cee56a70d8e1eab9b3c09b1df22
88
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
99
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
1010
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
@@ -30,7 +30,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
3030
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
3131
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
3232
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
33-
F configure c12efc7bbef62c14d49c4363dfc95a76e9b310c7 x
33+
F configure d5a387246ad0270be5587f1047e50187cb876685 x
3434
F configure.ac 605173e829ab64514ed89f9b53d0da1739d7b0a0
3535
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
3636
F doc/lemon.html b5a3c07d33ecb8e019ce8f7660fe2dbbad9d7977
@@ -104,7 +104,7 @@ F ext/fts5/fts5_buffer.c 4c1502d4c956cd092c89ce4480867f9d8bf325cd
104104
F ext/fts5/fts5_config.c 5af9c360e99669d29f06492c370892394aba0857
105105
F ext/fts5/fts5_expr.c dc2cee9f56b1818b85df59304b8104a5dfb8ab60
106106
F ext/fts5/fts5_hash.c 880998e596b60f078348d48732ca4ad9a90caad2
107-
F ext/fts5/fts5_index.c fdbe46da11e81c1817cd4cb2de25ffdb4dd83711
107+
F ext/fts5/fts5_index.c f67032a9a529ba52a545e6e3ab970764199c05d4
108108
F ext/fts5/fts5_main.c f85281445dcf8be32d18841c93a6f90fe27dbfe2
109109
F ext/fts5/fts5_storage.c de0ed8a06738bde433afe11e92295ceaffbc4e58
110110
F ext/fts5/fts5_tcl.c 4a901f00c8553740dba63511603f5527d741c26a
@@ -350,7 +350,7 @@ F src/hash.c 63d0ee752a3b92d4695b2b1f5259c4621b2cfebd
350350
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
351351
F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da
352352
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
353-
F src/insert.c 91ba5d0143e66479081536ebbaff1850ec9f57d9
353+
F src/insert.c 7af46a3be2656f5e13791464625d93d6b07b8612
354354
F src/legacy.c 75d3023be8f0d2b99d60f905090341a03358c58e
355355
F src/loadext.c 5d6642d141c07d366e43d359e94ec9de47add41d
356356
F src/main.c e207b81542d13b9f13d61e78ca441f9781f055b0
@@ -381,16 +381,16 @@ F src/parse.y 29153738a7322054359320eb00b5a4cd44389f20
381381
F src/pcache.c 51070ec9b8251bbf9c6ea3d35fd96a458752929e
382382
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
383383
F src/pcache1.c e3967219b2a92b9edcb9324a4ba75009090d3953
384-
F src/pragma.c 5a23557e490e7ac5afef097efc4b59dce5b482c2
385-
F src/pragma.h f9b221b2c8949ea941dbee49934299e4ed5af41c
384+
F src/pragma.c 0e7a7c6f1c6fd8ff50c0fff65b8bb80174bc49c5
385+
F src/pragma.h 61aa5389118594bebb28120a6720401aee34ce1a
386386
F src/prepare.c b1140c3d0cf59bc85ace00ce363153041b424b7a
387387
F src/printf.c 0c8579432f47948d9be5077eb590e8c4a01be667
388388
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
389389
F src/resolve.c bb070cf5f23611c44ab7e4788803684e385fc3fb
390390
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
391-
F src/select.c dfb6cadc3dcfba1b1bdbfba62ebba2b4b673413e
391+
F src/select.c 4437d9d5d56b6ffdedabf394c7fe3a07ff521ce9
392392
F src/shell.c 6095531aa900decdaa765e0f3993fba7153c92c1
393-
F src/sqlite.h.in e8e2d108d82647f0a812fdb74accf91c1ec08ddc
393+
F src/sqlite.h.in 29bda4bee01248a5650567d7a22fac39bad1b542
394394
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
395395
F src/sqlite3ext.h 8648034aa702469afb553231677306cc6492a1ae
396396
F src/sqliteInt.h 2075e22d50833ca2d9956d0b7a6bfb845ad05dd2
@@ -456,12 +456,12 @@ F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c
456456
F src/util.c 1534060bc034cdc51381c040c8bd6252dbcb64c9
457457
F src/vacuum.c 33c174b28886b2faf26e503b5a49a1c01a9b1c16
458458
F src/vdbe.c 88bd6c32b333580d2661ac3afe33369757fb1522
459-
F src/vdbe.h 50ee139f9c68fff91be1d717ed3a6abbd496919c
459+
F src/vdbe.h b0866e4191f096f1c987a84b042c3599bdf5423b
460460
F src/vdbeInt.h 281cb70332dc8b593b8c7afe776f3a2ba7d4255e
461461
F src/vdbeapi.c d6ebaa465f070eb1af8ba4e7b34583ece87bdd24
462-
F src/vdbeaux.c 12919c5aa354296d6b9ba808bca3e9dda836858c
462+
F src/vdbeaux.c 35c9a9908174e5a26c96d15e1f98214814a39147
463463
F src/vdbeblob.c f4f98ea672b242f807c08c92c7faaa79e5091b65
464-
F src/vdbemem.c d3fd85b7b7ef3eb75de29c6d7e1d10d3ca78b4fd
464+
F src/vdbemem.c 3b5a9a5b375458d3e12a50ae1aaa41eeec2175fd
465465
F src/vdbesort.c eda25cb2d1727efca6f7862fea32b8aa33c0face
466466
F src/vdbetrace.c 41963d5376f0349842b5fc4aaaaacd7d9cdc0834
467467
F src/vtab.c c4bbe0f870f52036553f8098aee0703997f0577a
@@ -692,7 +692,7 @@ F test/fkey4.test 86446017011273aad8f9a99c1a65019e7bd9ca9d
692692
F test/fkey5.test 5a373303f201ac03c22ba1ef17a733d3f56e611a
693693
F test/fkey6.test d078a1e323a740062bed38df32b8a736fd320dc0
694694
F test/fkey7.test 72e915890ee4a005daaf3002cb208e8fe973ac13
695-
F test/fkey8.test 7bd1dd0174a0e29a90c62c517b9e2a410a0b345d
695+
F test/fkey8.test e5372e32cdb4481f121ec3550703eeb7b4e0762c
696696
F test/fkey_malloc.test 594a7ea1fbab553c036c70813cd8bd9407d63749
697697
F test/fordelete.test eb93a2f34137bb87bdab88fcab06c0bd92719aff
698698
F test/format4.test 1f0cac8ff3895e9359ed87e41aaabee982a812eb
@@ -1010,6 +1010,7 @@ F test/permutations.test cd0b7bc04bf5e50d3a993d24c834d591f7d4f5fe
10101010
F test/pragma.test 1e94755164a3a3264cd39836de4bebcb7809e5f8
10111011
F test/pragma2.test e5d5c176360c321344249354c0c16aec46214c9f
10121012
F test/pragma3.test 14c12bc5352b1e100e0b6b44f371053a81ccf8ed
1013+
F test/pragma4.test 2fcabe7a352888f8aa70aad87eabe6481ea99b04
10131014
F test/printf.test b3ff34e73d59124140eaf89f7672e21bc2ca5fcc
10141015
F test/printf2.test 0b61566dd1c0f0b802f59dffa228c5dc5aa6b054
10151016
F test/progress.test ebab27f670bd0d4eb9d20d49cef96e68141d92fb
@@ -1073,7 +1074,7 @@ F test/select8.test 8c8f5ae43894c891efc5755ed905467d1d67ad5d
10731074
F test/select9.test aebc2bb0c3bc44606125033cbcaac2c8d1f33a95
10741075
F test/selectA.test 101e722370ac6e84978c2958b8931c78b10a1709
10751076
F test/selectB.test 954e4e49cf1f896d61794e440669e03a27ceea25
1076-
F test/selectC.test 871fb55d884d3de5943c4057ebd22c2459e71977
1077+
F test/selectC.test e25243f8ca503e06f252eb0218976d07cfeceac3
10771078
F test/selectD.test b0f02a04ef7737decb24e08be2c39b9664b43394
10781079
F test/selectE.test a8730ca330fcf40ace158f134f4fe0eb00c7edbf
10791080
F test/selectF.test 21c94e6438f76537b72532fa9fd4710cdd455fc3
@@ -1336,6 +1337,7 @@ F test/triggerB.test 56780c031b454abac2340dbb3b71ac5c56c3d7fe
13361337
F test/triggerC.test 302d8995f5ffe63bbc15053abb3ef7a39cf5a092
13371338
F test/triggerD.test 8e7f3921a92a5797d472732108109e44575fa650
13381339
F test/triggerE.test 15fa63f1097db1f83dd62d121616006978063d1f
1340+
F test/triggerF.test 55b1eb13433997faac3a4948c1d8252f6c8c636b
13391341
F test/tt3_checkpoint.c 9e75cf7c1c364f52e1c47fd0f14c4340a9db0fe1
13401342
F test/tt3_index.c 39eec10a35f57672225be4d182862152896dee4a
13411343
F test/tt3_lookaside1.c 0377e202c3c2a50d688cb65ba203afeda6fafeb9
@@ -1479,7 +1481,7 @@ F tool/mkmsvcmin.tcl 2f12f7fa8858bbe61cf81820a2da96c79ed1ca8d
14791481
F tool/mkopcodec.tcl d1b6362bd3aa80d5520d4d6f3765badf01f6c43c
14801482
F tool/mkopcodeh.tcl a01d2c1d8a6205b03fc635adf3735b4c523befd3
14811483
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
1482-
F tool/mkpragmatab.tcl a30ee93515135466fc49ae881f75da07ebcafd19
1484+
F tool/mkpragmatab.tcl ebb4bfcd2f8010e0a3934b6118db4b5f2f5edf5c
14831485
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
14841486
F tool/mksqlite3c-noext.tcl fef88397668ae83166735c41af99d79f56afaabb
14851487
F tool/mksqlite3c.tcl 06b2e6a0f21cc0a5d70fbbd136b3e0a96470645e
@@ -1541,11 +1543,11 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
15411543
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
15421544
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
15431545
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
1544-
P a60b60d6b6ba3e3b17b7bb7d7e19ea0e6b40fa68
1545-
R d4f21444156ee47430dc0da1e1aa71cf
1546+
P 01b4cb26762f42064311445f65304388d6fdcfb5
1547+
R 831df29e5e666fb597bfde5e36d65ee1
15461548
T +bgcolor * #d0c0ff
15471549
T +sym-release *
1548-
T +sym-version-3.16.1 *
1550+
T +sym-version-3.16.2 *
15491551
U drh
1550-
Z 2e6a3477dce68797105cb19052da7dea
1552+
Z 649c8c751fe149918f54c32f14d87f62
15511553
# Remove this line to create a well-formed manifest.

sqlite/manifest.uuid

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
979f04392853b8053817a3eea2fc679947b437fd
1+
a65a62893ca8319e89e48b8a38cf8a59c69a8209

sqlite/src/insert.c

+15-2
Original file line numberDiff line numberDiff line change
@@ -1549,12 +1549,25 @@ void sqlite3GenerateConstraintChecks(
15491549
onError = OE_Abort;
15501550
}
15511551

1552-
if( ix==0 && pPk==pIdx && onError==OE_Replace && pPk->pNext==0 ){
1552+
/* Collision detection may be omitted if all of the following are true:
1553+
** (1) The conflict resolution algorithm is REPLACE
1554+
** (2) The table is a WITHOUT ROWID table
1555+
** (3) There are no secondary indexes on the table
1556+
** (4) No delete triggers need to be fired if there is a conflict
1557+
** (5) No FK constraint counters need to be updated if a conflict occurs.
1558+
*/
1559+
if( (ix==0 && pIdx->pNext==0) /* Condition 3 */
1560+
&& pPk==pIdx /* Condition 2 */
1561+
&& onError==OE_Replace /* Condition 1 */
1562+
&& ( 0==(db->flags&SQLITE_RecTriggers) || /* Condition 4 */
1563+
0==sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0))
1564+
&& ( 0==(db->flags&SQLITE_ForeignKeys) || /* Condition 5 */
1565+
(0==pTab->pFKey && 0==sqlite3FkReferences(pTab)))
1566+
){
15531567
sqlite3VdbeResolveLabel(v, addrUniqueOk);
15541568
continue;
15551569
}
15561570

1557-
15581571
/* Check to see if the new index entry will be unique */
15591572
sqlite3VdbeAddOp4Int(v, OP_NoConflict, iThisCur, addrUniqueOk,
15601573
regIdx, pIdx->nKeyCol); VdbeCoverage(v);

sqlite/src/pragma.c

+12-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,9 @@ void sqlite3Pragma(
408408
}
409409

410410
/* Register the result column names for pragmas that return results */
411-
if( (pPragma->mPragFlg & PragFlg_NoColumns)==0 ){
411+
if( (pPragma->mPragFlg & PragFlg_NoColumns)==0
412+
&& ((pPragma->mPragFlg & PragFlg_NoColumns1)==0 || zRight==0)
413+
){
412414
setPragmaResultColumnNames(v, pPragma);
413415
}
414416

@@ -1953,6 +1955,15 @@ void sqlite3Pragma(
19531955

19541956
} /* End of the PRAGMA switch */
19551957

1958+
/* The following block is a no-op unless SQLITE_DEBUG is defined. Its only
1959+
** purpose is to execute assert() statements to verify that if the
1960+
** PragFlg_NoColumns1 flag is set and the caller specified an argument
1961+
** to the PRAGMA, the implementation has not added any OP_ResultRow
1962+
** instructions to the VM. */
1963+
if( (pPragma->mPragFlg & PragFlg_NoColumns1) && zRight ){
1964+
sqlite3VdbeVerifyNoResultRow(v);
1965+
}
1966+
19561967
pragma_out:
19571968
sqlite3DbFree(db, zLeft);
19581969
sqlite3DbFree(db, zRight);

0 commit comments

Comments
 (0)