Skip to content

Commit 0074daa

Browse files
committed
Prepare release of version 1.3.6
- Update to SQLite3 3.37.1
1 parent cc5110a commit 0074daa

8 files changed

+108
-70
lines changed

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dnl Copyright (C) 2019-2021 Ulrich Telle <[email protected]>
44
dnl
55
dnl This file is covered by the same licence as the entire SQLite3 Multiple Ciphers package.
66

7-
AC_INIT([sqlite3mc], [1.3.4], [[email protected]])
7+
AC_INIT([sqlite3mc], [1.3.6], [[email protected]])
88

99
dnl This is the version tested with, might work with earlier ones.
1010
AC_PREREQ([2.69])

readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The code was mainly developed under Windows, but was tested under Linux as well.
1010

1111
## Version history
1212

13+
* 1.3.6 - *January 2022*
14+
- Based on SQLite version 3.37.1
1315
* 1.3.5 - *November 2021*
1416
- Based on SQLite version 3.37.0
1517
- Added build support for Visual C++ 2022

src/rekeyvacuum.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
** Change 4: Call sqlite3mcBtreeSetPageSize instead of sqlite3BtreeSetPageSize for main database
2828
** (sqlite3mcBtreeSetPageSize allows to reduce the number of reserved bytes)
2929
**
30-
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.37.0 amalgamation.
30+
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.37.1 amalgamation.
3131
*/
3232
SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
3333
char **pzErrMsg, /* Write error message here */

src/shell.c

+45-35
Original file line numberDiff line numberDiff line change
@@ -19999,36 +19999,28 @@ static int do_meta_command(char *zLine, ShellState *p){
1999919999
char *zNewFilename = 0; /* Name of the database file to open */
2000020000
int iName = 1; /* Index in azArg[] of the filename */
2000120001
int newFlag = 0; /* True to delete file before opening */
20002-
/* Close the existing database */
20003-
session_close_all(p, -1);
20004-
close_db(p->db);
20005-
p->db = 0;
20006-
p->pAuxDb->zDbFilename = 0;
20007-
sqlite3_free(p->pAuxDb->zFreeOnClose);
20008-
p->pAuxDb->zFreeOnClose = 0;
20009-
p->openMode = SHELL_OPEN_UNSPEC;
20010-
p->openFlags = 0;
20011-
p->szMax = 0;
20002+
int openMode = SHELL_OPEN_UNSPEC;
20003+
2001220004
/* Check for command-line arguments */
2001320005
for(iName=1; iName<nArg; iName++){
2001420006
const char *z = azArg[iName];
2001520007
if( optionMatch(z,"new") ){
2001620008
newFlag = 1;
2001720009
#ifdef SQLITE_HAVE_ZLIB
2001820010
}else if( optionMatch(z, "zip") ){
20019-
p->openMode = SHELL_OPEN_ZIPFILE;
20011+
openMode = SHELL_OPEN_ZIPFILE;
2002020012
#endif
2002120013
}else if( optionMatch(z, "append") ){
20022-
p->openMode = SHELL_OPEN_APPENDVFS;
20014+
openMode = SHELL_OPEN_APPENDVFS;
2002320015
}else if( optionMatch(z, "readonly") ){
20024-
p->openMode = SHELL_OPEN_READONLY;
20016+
openMode = SHELL_OPEN_READONLY;
2002520017
}else if( optionMatch(z, "nofollow") ){
2002620018
p->openFlags |= SQLITE_OPEN_NOFOLLOW;
2002720019
#ifndef SQLITE_OMIT_DESERIALIZE
2002820020
}else if( optionMatch(z, "deserialize") ){
20029-
p->openMode = SHELL_OPEN_DESERIALIZE;
20021+
openMode = SHELL_OPEN_DESERIALIZE;
2003020022
}else if( optionMatch(z, "hexdb") ){
20031-
p->openMode = SHELL_OPEN_HEXDB;
20023+
openMode = SHELL_OPEN_HEXDB;
2003220024
}else if( optionMatch(z, "maxsize") && iName+1<nArg ){
2003320025
p->szMax = integerValue(azArg[++iName]);
2003420026
#endif /* SQLITE_OMIT_DESERIALIZE */
@@ -20044,6 +20036,18 @@ static int do_meta_command(char *zLine, ShellState *p){
2004420036
zNewFilename = sqlite3_mprintf("%s", z);
2004520037
}
2004620038
}
20039+
20040+
/* Close the existing database */
20041+
session_close_all(p, -1);
20042+
close_db(p->db);
20043+
p->db = 0;
20044+
p->pAuxDb->zDbFilename = 0;
20045+
sqlite3_free(p->pAuxDb->zFreeOnClose);
20046+
p->pAuxDb->zFreeOnClose = 0;
20047+
p->openMode = openMode;
20048+
p->openFlags = 0;
20049+
p->szMax = 0;
20050+
2004720051
/* If a filename is specified, try to open it first */
2004820052
if( zNewFilename || p->openMode==SHELL_OPEN_HEXDB ){
2004920053
if( newFlag && !p->bSafeMode ) shellDeleteFile(zNewFilename);
@@ -21262,30 +21266,31 @@ static int do_meta_command(char *zLine, ShellState *p){
2126221266
static const struct {
2126321267
const char *zCtrlName; /* Name of a test-control option */
2126421268
int ctrlCode; /* Integer code for that option */
21269+
int unSafe; /* Not valid for --safe mode */
2126521270
const char *zUsage; /* Usage notes */
2126621271
} aCtrl[] = {
21267-
{ "always", SQLITE_TESTCTRL_ALWAYS, "BOOLEAN" },
21268-
{ "assert", SQLITE_TESTCTRL_ASSERT, "BOOLEAN" },
21269-
/*{ "benign_malloc_hooks",SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS, "" },*/
21270-
/*{ "bitvec_test", SQLITE_TESTCTRL_BITVEC_TEST, "" },*/
21271-
{ "byteorder", SQLITE_TESTCTRL_BYTEORDER, "" },
21272-
{ "extra_schema_checks",SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS,"BOOLEAN" },
21273-
/*{ "fault_install", SQLITE_TESTCTRL_FAULT_INSTALL, "" },*/
21274-
{ "imposter", SQLITE_TESTCTRL_IMPOSTER, "SCHEMA ON/OFF ROOTPAGE"},
21275-
{ "internal_functions", SQLITE_TESTCTRL_INTERNAL_FUNCTIONS, "" },
21276-
{ "localtime_fault", SQLITE_TESTCTRL_LOCALTIME_FAULT,"BOOLEAN" },
21277-
{ "never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT, "BOOLEAN" },
21278-
{ "optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS, "DISABLE-MASK" },
21272+
{ "always", SQLITE_TESTCTRL_ALWAYS, 1, "BOOLEAN" },
21273+
{ "assert", SQLITE_TESTCTRL_ASSERT, 1, "BOOLEAN" },
21274+
/*{ "benign_malloc_hooks",SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS,1, "" },*/
21275+
/*{ "bitvec_test", SQLITE_TESTCTRL_BITVEC_TEST, 1, "" },*/
21276+
{ "byteorder", SQLITE_TESTCTRL_BYTEORDER, 0, "" },
21277+
{ "extra_schema_checks",SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS,0,"BOOLEAN" },
21278+
/*{ "fault_install", SQLITE_TESTCTRL_FAULT_INSTALL, 1,"" },*/
21279+
{ "imposter", SQLITE_TESTCTRL_IMPOSTER,1,"SCHEMA ON/OFF ROOTPAGE"},
21280+
{ "internal_functions", SQLITE_TESTCTRL_INTERNAL_FUNCTIONS,0,"" },
21281+
{ "localtime_fault", SQLITE_TESTCTRL_LOCALTIME_FAULT,0,"BOOLEAN" },
21282+
{ "never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT,1, "BOOLEAN" },
21283+
{ "optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS,0,"DISABLE-MASK" },
2127921284
#ifdef YYCOVERAGE
21280-
{ "parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE, "" },
21285+
{ "parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE,0,"" },
2128121286
#endif
21282-
{ "pending_byte", SQLITE_TESTCTRL_PENDING_BYTE, "OFFSET " },
21283-
{ "prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE, "" },
21284-
{ "prng_save", SQLITE_TESTCTRL_PRNG_SAVE, "" },
21285-
{ "prng_seed", SQLITE_TESTCTRL_PRNG_SEED, "SEED ?db?" },
21286-
{ "seek_count", SQLITE_TESTCTRL_SEEK_COUNT, "" },
21287-
{ "sorter_mmap", SQLITE_TESTCTRL_SORTER_MMAP, "NMAX" },
21288-
{ "tune", SQLITE_TESTCTRL_TUNE, "ID VALUE" },
21287+
{ "pending_byte", SQLITE_TESTCTRL_PENDING_BYTE,0, "OFFSET " },
21288+
{ "prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE,0, "" },
21289+
{ "prng_save", SQLITE_TESTCTRL_PRNG_SAVE, 0, "" },
21290+
{ "prng_seed", SQLITE_TESTCTRL_PRNG_SEED, 0, "SEED ?db?" },
21291+
{ "seek_count", SQLITE_TESTCTRL_SEEK_COUNT, 0, "" },
21292+
{ "sorter_mmap", SQLITE_TESTCTRL_SORTER_MMAP, 0, "NMAX" },
21293+
{ "tune", SQLITE_TESTCTRL_TUNE, 1, "ID VALUE" },
2128921294
};
2129021295
int testctrl = -1;
2129121296
int iCtrl = -1;
@@ -21333,6 +21338,11 @@ static int do_meta_command(char *zLine, ShellState *p){
2133321338
if( testctrl<0 ){
2133421339
utf8_printf(stderr,"Error: unknown test-control: %s\n"
2133521340
"Use \".testctrl --help\" for help\n", zCmd);
21341+
}else if( aCtrl[iCtrl].unSafe && p->bSafeMode ){
21342+
utf8_printf(stderr,
21343+
"line %d: \".testctrl %s\" may not be used in safe mode\n",
21344+
p->lineno, aCtrl[iCtrl].zCtrlName);
21345+
exit(1);
2133621346
}else{
2133721347
switch(testctrl){
2133821348

src/sqlite3.c

+27-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3-
** version 3.37.0. By combining all the individual C code files into this
3+
** version 3.37.1. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
@@ -452,9 +452,9 @@ extern "C" {
452452
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
453453
** [sqlite_version()] and [sqlite_source_id()].
454454
*/
455-
#define SQLITE_VERSION "3.37.0"
456-
#define SQLITE_VERSION_NUMBER 3037000
457-
#define SQLITE_SOURCE_ID "2021-11-27 14:13:22 bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a"
455+
#define SQLITE_VERSION "3.37.1"
456+
#define SQLITE_VERSION_NUMBER 3037001
457+
#define SQLITE_SOURCE_ID "2021-12-30 15:30:28 378629bf2ea546f73eee84063c5358439a12f7300e433f18c9e1bddd948dea62"
458458

459459
/*
460460
** CAPI3REF: Run-Time Library Version Numbers
@@ -104085,7 +104085,7 @@ SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr *p){
104085104085
return ExprHasProperty(p, EP_CanBeNull) ||
104086104086
p->y.pTab==0 || /* Reference to column of index on expression */
104087104087
(p->iColumn>=0
104088-
&& ALWAYS(p->y.pTab->aCol!=0) /* Defense against OOM problems */
104088+
&& p->y.pTab->aCol!=0 /* Possible due to prior error */
104089104089
&& p->y.pTab->aCol[p->iColumn].notNull==0);
104090104090
default:
104091104091
return 1;
@@ -126000,6 +126000,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
126000126000
if( onError==OE_Replace /* IPK rule is REPLACE */
126001126001
&& onError!=overrideError /* Rules for other constraints are different */
126002126002
&& pTab->pIndex /* There exist other constraints */
126003+
&& !upsertIpkDelay /* IPK check already deferred by UPSERT */
126003126004
){
126004126005
ipkTop = sqlite3VdbeAddOp0(v, OP_Goto)+1;
126005126006
VdbeComment((v, "defer IPK REPLACE until last"));
@@ -126408,6 +126409,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
126408126409
if( ipkTop ){
126409126410
sqlite3VdbeGoto(v, ipkTop);
126410126411
VdbeComment((v, "Do IPK REPLACE"));
126412+
assert( ipkBottom>0 );
126411126413
sqlite3VdbeJumpHere(v, ipkBottom);
126412126414
}
126413126415

@@ -133005,6 +133007,7 @@ static int sqlite3LockAndPrepare(
133005133007
** reset is considered a permanent error. */
133006133008
rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
133007133009
assert( rc==SQLITE_OK || *ppStmt==0 );
133010+
if( rc==SQLITE_OK || db->mallocFailed ) break;
133008133011
}while( rc==SQLITE_ERROR_RETRY
133009133012
|| (rc==SQLITE_SCHEMA && (sqlite3ResetOneSchema(db,-1), cnt++)==0) );
133010133013
sqlite3BtreeLeaveAll(db);
@@ -169411,6 +169414,8 @@ SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
169411169414
if( newLimit>=0 ){ /* IMP: R-52476-28732 */
169412169415
if( newLimit>aHardLimit[limitId] ){
169413169416
newLimit = aHardLimit[limitId]; /* IMP: R-51463-25634 */
169417+
}else if( newLimit<1 && limitId==SQLITE_LIMIT_LENGTH ){
169418+
newLimit = 1;
169414169419
}
169415169420
db->aLimit[limitId] = newLimit;
169416169421
}
@@ -170814,12 +170819,16 @@ SQLITE_API int sqlite3_test_control(int op, ...){
170814170819
*/
170815170820
case SQLITE_TESTCTRL_IMPOSTER: {
170816170821
sqlite3 *db = va_arg(ap, sqlite3*);
170822+
int iDb;
170817170823
sqlite3_mutex_enter(db->mutex);
170818-
db->init.iDb = sqlite3FindDbName(db, va_arg(ap,const char*));
170819-
db->init.busy = db->init.imposterTable = va_arg(ap,int);
170820-
db->init.newTnum = va_arg(ap,int);
170821-
if( db->init.busy==0 && db->init.newTnum>0 ){
170822-
sqlite3ResetAllSchemasOfConnection(db);
170824+
iDb = sqlite3FindDbName(db, va_arg(ap,const char*));
170825+
if( iDb>=0 ){
170826+
db->init.iDb = iDb;
170827+
db->init.busy = db->init.imposterTable = va_arg(ap,int);
170828+
db->init.newTnum = va_arg(ap,int);
170829+
if( db->init.busy==0 && db->init.newTnum>0 ){
170830+
sqlite3ResetAllSchemasOfConnection(db);
170831+
}
170823170832
}
170824170833
sqlite3_mutex_leave(db->mutex);
170825170834
break;
@@ -177073,7 +177082,7 @@ SQLITE_PRIVATE void sqlite3Fts3DoclistPrev(
177073177082

177074177083
assert( nDoclist>0 );
177075177084
assert( *pbEof==0 );
177076-
assert( p || *piDocid==0 );
177085+
assert_fts3_nc( p || *piDocid==0 );
177077177086
assert( !p || (p>aDoclist && p<&aDoclist[nDoclist]) );
177078177087

177079177088
if( p==0 ){
@@ -224759,8 +224768,12 @@ static void fts5SegIterReverseNewPage(Fts5Index *p, Fts5SegIter *pIter){
224759224768
int iRowidOff;
224760224769
iRowidOff = fts5LeafFirstRowidOff(pNew);
224761224770
if( iRowidOff ){
224762-
pIter->pLeaf = pNew;
224763-
pIter->iLeafOffset = iRowidOff;
224771+
if( iRowidOff>=pNew->szLeaf ){
224772+
p->rc = FTS5_CORRUPT;
224773+
}else{
224774+
pIter->pLeaf = pNew;
224775+
pIter->iLeafOffset = iRowidOff;
224776+
}
224764224777
}
224765224778
}
224766224779

@@ -232489,7 +232502,7 @@ static void fts5SourceIdFunc(
232489232502
){
232490232503
assert( nArg==0 );
232491232504
UNUSED_PARAM2(nArg, apUnused);
232492-
sqlite3_result_text(pCtx, "fts5: 2021-11-27 14:13:22 bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a", -1, SQLITE_TRANSIENT);
232505+
sqlite3_result_text(pCtx, "fts5: 2021-12-30 15:30:28 378629bf2ea546f73eee84063c5358439a12f7300e433f18c9e1bddd948dea62", -1, SQLITE_TRANSIENT);
232493232506
}
232494232507

232495232508
/*

src/sqlite3.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ extern "C" {
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149-
#define SQLITE_VERSION "3.37.0"
150-
#define SQLITE_VERSION_NUMBER 3037000
151-
#define SQLITE_SOURCE_ID "2021-11-27 14:13:22 bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a"
149+
#define SQLITE_VERSION "3.37.1"
150+
#define SQLITE_VERSION_NUMBER 3037001
151+
#define SQLITE_SOURCE_ID "2021-12-30 15:30:28 378629bf2ea546f73eee84063c5358439a12f7300e433f18c9e1bddd948dea62"
152152

153153
/*
154154
** CAPI3REF: Run-Time Library Version Numbers

src/sqlite3mc_version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
#define SQLITE3MC_VERSION_MAJOR 1
1616
#define SQLITE3MC_VERSION_MINOR 3
17-
#define SQLITE3MC_VERSION_RELEASE 5
17+
#define SQLITE3MC_VERSION_RELEASE 6
1818
#define SQLITE3MC_VERSION_SUBRELEASE 0
19-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.3.5"
19+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.3.6"
2020

2121
#endif /* SQLITE3MC_VERSION_H_ */

0 commit comments

Comments
 (0)