Skip to content

Commit 817ed2b

Browse files
committed
Prepare release of version 1.4.3
- Update to SQLite3 3.38.5
1 parent cfbeabd commit 817ed2b

File tree

8 files changed

+60
-23
lines changed

8 files changed

+60
-23
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dnl Copyright (C) 2019-2022 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.4.2], [[email protected]])
7+
AC_INIT([sqlite3mc], [1.4.3], [[email protected]])
88

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

readme.md

Lines changed: 2 additions & 0 deletions
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.4.3 - *May 2022*
14+
- Based on SQLite version 3.38.5
1315
* 1.4.2 - *April 2022*
1416
- Based on SQLite version 3.38.3
1517
* 1.4.1 - *April 2022*

src/rekeyvacuum.c

Lines changed: 1 addition & 1 deletion
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.38.3 amalgamation.
30+
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.38.5 amalgamation.
3131
*/
3232
SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
3333
char **pzErrMsg, /* Write error message here */

src/shell.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14430,6 +14430,8 @@ static void exec_prepared_stmt_columnar(
1443014430
int bNextLine = 0;
1443114431
int bMultiLineRowExists = 0;
1443214432
int bw = p->cmOpts.bWordWrap;
14433+
const char *zEmpty = "";
14434+
const char *zShowNull = p->nullValue;
1443314435

1443414436
rc = sqlite3_step(pStmt);
1443514437
if( rc!=SQLITE_ROW ) return;
@@ -14491,12 +14493,14 @@ static void exec_prepared_stmt_columnar(
1449114493
if( wx<0 ) wx = -wx;
1449214494
if( useNextLine ){
1449314495
uz = azNextLine[i];
14496+
if( uz==0 ) uz = (u8*)zEmpty;
1449414497
}else if( p->cmOpts.bQuote ){
1449514498
sqlite3_free(azQuoted[i]);
1449614499
azQuoted[i] = quoted_column(pStmt,i);
1449714500
uz = (const unsigned char*)azQuoted[i];
1449814501
}else{
1449914502
uz = (const unsigned char*)sqlite3_column_text(pStmt,i);
14503+
if( uz==0 ) uz = (u8*)zShowNull;
1450014504
}
1450114505
azData[nRow*nColumn + i]
1450214506
= translateForDisplayAndDup(uz, &azNextLine[i], wx, bw);
@@ -14510,7 +14514,7 @@ static void exec_prepared_stmt_columnar(
1451014514
nTotal = nColumn*(nRow+1);
1451114515
for(i=0; i<nTotal; i++){
1451214516
z = azData[i];
14513-
if( z==0 ) z = p->nullValue;
14517+
if( z==0 ) z = (char*)zEmpty;
1451414518
n = strlenChar(z);
1451514519
j = i%nColumn;
1451614520
if( n>p->actualWidth[j] ) p->actualWidth[j] = n;
@@ -14614,7 +14618,10 @@ static void exec_prepared_stmt_columnar(
1461414618
utf8_printf(p->out, "Interrupt\n");
1461514619
}
1461614620
nData = (nRow+1)*nColumn;
14617-
for(i=0; i<nData; i++) free(azData[i]);
14621+
for(i=0; i<nData; i++){
14622+
z = azData[i];
14623+
if( z!=zEmpty && z!=zShowNull ) free(azData[i]);
14624+
}
1461814625
sqlite3_free(azData);
1461914626
sqlite3_free((void*)azNextLine);
1462014627
sqlite3_free(abRowDiv);
@@ -19040,12 +19047,12 @@ SELECT\
1904019047
','||iif((cpos-1)%4>0, ' ', x'0a'||' '))\
1904119048
||')' AS ColsSpec \
1904219049
FROM (\
19043-
SELECT cpos, printf('\"%w\"',printf('%.*s%s', nlen-chop,name,suff)) AS cname \
19050+
SELECT cpos, printf('\"%w\"',printf('%!.*s%s', nlen-chop,name,suff)) AS cname \
1904419051
FROM ColNames ORDER BY cpos\
1904519052
)";
1904619053
static const char * const zRenamesDone =
1904719054
"SELECT group_concat("
19048-
" printf('\"%w\" to \"%w\"',name,printf('%.*s%s', nlen-chop, name, suff)),"
19055+
" printf('\"%w\" to \"%w\"',name,printf('%!.*s%s', nlen-chop, name, suff)),"
1904919056
" ','||x'0a')"
1905019057
"FROM ColNames WHERE suff<>'' OR chop!=0"
1905119058
;

src/sqlite3.c

Lines changed: 20 additions & 6 deletions
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.38.3. By combining all the individual C code files into this
3+
** version 3.38.5. 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.38.3"
456-
#define SQLITE_VERSION_NUMBER 3038003
457-
#define SQLITE_SOURCE_ID "2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4"
455+
#define SQLITE_VERSION "3.38.5"
456+
#define SQLITE_VERSION_NUMBER 3038005
457+
#define SQLITE_SOURCE_ID "2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe"
458458

459459
/*
460460
** CAPI3REF: Run-Time Library Version Numbers
@@ -88387,6 +88387,8 @@ case OP_Gosub: { /* jump */
8838788387
/* Most jump operations do a goto to this spot in order to update
8838888388
** the pOp pointer. */
8838988389
jump_to_p2:
88390+
assert( pOp->p2>0 ); /* There are never any jumps to instruction 0 */
88391+
assert( pOp->p2<p->nOp ); /* Jumps must be in range */
8839088392
pOp = &aOp[pOp->p2 - 1];
8839188393
break;
8839288394
}
@@ -133866,6 +133868,14 @@ SQLITE_PRIVATE void sqlite3ParseObjectInit(Parse *pParse, sqlite3 *db){
133866133868
if( db->mallocFailed ) sqlite3ErrorMsg(pParse, "out of memory");
133867133869
}
133868133870

133871+
/*
133872+
** Maximum number of times that we will try again to prepare a statement
133873+
** that returns SQLITE_ERROR_RETRY.
133874+
*/
133875+
#ifndef SQLITE_MAX_PREPARE_RETRY
133876+
# define SQLITE_MAX_PREPARE_RETRY 25
133877+
#endif
133878+
133869133879
/*
133870133880
** Compile the UTF-8 encoded SQL statement zSql into a statement handle.
133871133881
*/
@@ -134040,7 +134050,7 @@ static int sqlite3LockAndPrepare(
134040134050
rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
134041134051
assert( rc==SQLITE_OK || *ppStmt==0 );
134042134052
if( rc==SQLITE_OK || db->mallocFailed ) break;
134043-
}while( rc==SQLITE_ERROR_RETRY
134053+
}while( (rc==SQLITE_ERROR_RETRY && (cnt++)<SQLITE_MAX_PREPARE_RETRY)
134044134054
|| (rc==SQLITE_SCHEMA && (sqlite3ResetOneSchema(db,-1), cnt++)==0) );
134045134055
sqlite3BtreeLeaveAll(db);
134046134056
rc = sqlite3ApiExit(db, rc);
@@ -148718,6 +148728,7 @@ static void preserveExpr(IdxExprTrans *pTrans, Expr *pExpr){
148718148728
static int whereIndexExprTransNode(Walker *p, Expr *pExpr){
148719148729
IdxExprTrans *pX = p->u.pIdxTrans;
148720148730
if( sqlite3ExprCompare(0, pExpr, pX->pIdxExpr, pX->iTabCur)==0 ){
148731+
pExpr = sqlite3ExprSkipCollate(pExpr);
148721148732
preserveExpr(pX, pExpr);
148722148733
pExpr->affExpr = sqlite3ExprAffinity(pExpr);
148723148734
pExpr->op = TK_COLUMN;
@@ -148877,6 +148888,8 @@ static SQLITE_NOINLINE void filterPullDown(
148877148888
/* ,--- Because sqlite3ConstructBloomFilter() has will not have set
148878148889
** vvvvv--' pLevel->regFilter if this were true. */
148879148890
if( NEVER(pLoop->prereq & notReady) ) continue;
148891+
assert( pLevel->addrBrk==0 );
148892+
pLevel->addrBrk = addrNxt;
148880148893
if( pLoop->wsFlags & WHERE_IPK ){
148881148894
WhereTerm *pTerm = pLoop->aLTerm[0];
148882148895
int regRowid;
@@ -148903,6 +148916,7 @@ static SQLITE_NOINLINE void filterPullDown(
148903148916
VdbeCoverage(pParse->pVdbe);
148904148917
}
148905148918
pLevel->regFilter = 0;
148919+
pLevel->addrBrk = 0;
148906148920
}
148907148921
}
148908148922

@@ -234497,7 +234511,7 @@ static void fts5SourceIdFunc(
234497234511
){
234498234512
assert( nArg==0 );
234499234513
UNUSED_PARAM2(nArg, apUnused);
234500-
sqlite3_result_text(pCtx, "fts5: 2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4", -1, SQLITE_TRANSIENT);
234514+
sqlite3_result_text(pCtx, "fts5: 2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe", -1, SQLITE_TRANSIENT);
234501234515
}
234502234516

234503234517
/*

src/sqlite3.h

Lines changed: 3 additions & 3 deletions
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.38.3"
150-
#define SQLITE_VERSION_NUMBER 3038003
151-
#define SQLITE_SOURCE_ID "2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4"
149+
#define SQLITE_VERSION "3.38.5"
150+
#define SQLITE_VERSION_NUMBER 3038005
151+
#define SQLITE_SOURCE_ID "2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe"
152152

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

src/sqlite3mc_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
#define SQLITE3MC_VERSION_MAJOR 1
1616
#define SQLITE3MC_VERSION_MINOR 4
17-
#define SQLITE3MC_VERSION_RELEASE 2
17+
#define SQLITE3MC_VERSION_RELEASE 3
1818
#define SQLITE3MC_VERSION_SUBRELEASE 0
19-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.4.2"
19+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.4.3"
2020

2121
#endif /* SQLITE3MC_VERSION_H_ */

src/sqlite3patched.c

Lines changed: 20 additions & 6 deletions
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.38.3. By combining all the individual C code files into this
3+
** version 3.38.5. 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.38.3"
456-
#define SQLITE_VERSION_NUMBER 3038003
457-
#define SQLITE_SOURCE_ID "2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4"
455+
#define SQLITE_VERSION "3.38.5"
456+
#define SQLITE_VERSION_NUMBER 3038005
457+
#define SQLITE_SOURCE_ID "2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe"
458458

459459
/*
460460
** CAPI3REF: Run-Time Library Version Numbers
@@ -88394,6 +88394,8 @@ case OP_Gosub: { /* jump */
8839488394
/* Most jump operations do a goto to this spot in order to update
8839588395
** the pOp pointer. */
8839688396
jump_to_p2:
88397+
assert( pOp->p2>0 ); /* There are never any jumps to instruction 0 */
88398+
assert( pOp->p2<p->nOp ); /* Jumps must be in range */
8839788399
pOp = &aOp[pOp->p2 - 1];
8839888400
break;
8839988401
}
@@ -133878,6 +133880,14 @@ SQLITE_PRIVATE void sqlite3ParseObjectInit(Parse *pParse, sqlite3 *db){
133878133880
if( db->mallocFailed ) sqlite3ErrorMsg(pParse, "out of memory");
133879133881
}
133880133882

133883+
/*
133884+
** Maximum number of times that we will try again to prepare a statement
133885+
** that returns SQLITE_ERROR_RETRY.
133886+
*/
133887+
#ifndef SQLITE_MAX_PREPARE_RETRY
133888+
# define SQLITE_MAX_PREPARE_RETRY 25
133889+
#endif
133890+
133881133891
/*
133882133892
** Compile the UTF-8 encoded SQL statement zSql into a statement handle.
133883133893
*/
@@ -134052,7 +134062,7 @@ static int sqlite3LockAndPrepare(
134052134062
rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
134053134063
assert( rc==SQLITE_OK || *ppStmt==0 );
134054134064
if( rc==SQLITE_OK || db->mallocFailed ) break;
134055-
}while( rc==SQLITE_ERROR_RETRY
134065+
}while( (rc==SQLITE_ERROR_RETRY && (cnt++)<SQLITE_MAX_PREPARE_RETRY)
134056134066
|| (rc==SQLITE_SCHEMA && (sqlite3ResetOneSchema(db,-1), cnt++)==0) );
134057134067
sqlite3BtreeLeaveAll(db);
134058134068
rc = sqlite3ApiExit(db, rc);
@@ -148730,6 +148740,7 @@ static void preserveExpr(IdxExprTrans *pTrans, Expr *pExpr){
148730148740
static int whereIndexExprTransNode(Walker *p, Expr *pExpr){
148731148741
IdxExprTrans *pX = p->u.pIdxTrans;
148732148742
if( sqlite3ExprCompare(0, pExpr, pX->pIdxExpr, pX->iTabCur)==0 ){
148743+
pExpr = sqlite3ExprSkipCollate(pExpr);
148733148744
preserveExpr(pX, pExpr);
148734148745
pExpr->affExpr = sqlite3ExprAffinity(pExpr);
148735148746
pExpr->op = TK_COLUMN;
@@ -148889,6 +148900,8 @@ static SQLITE_NOINLINE void filterPullDown(
148889148900
/* ,--- Because sqlite3ConstructBloomFilter() has will not have set
148890148901
** vvvvv--' pLevel->regFilter if this were true. */
148891148902
if( NEVER(pLoop->prereq & notReady) ) continue;
148903+
assert( pLevel->addrBrk==0 );
148904+
pLevel->addrBrk = addrNxt;
148892148905
if( pLoop->wsFlags & WHERE_IPK ){
148893148906
WhereTerm *pTerm = pLoop->aLTerm[0];
148894148907
int regRowid;
@@ -148915,6 +148928,7 @@ static SQLITE_NOINLINE void filterPullDown(
148915148928
VdbeCoverage(pParse->pVdbe);
148916148929
}
148917148930
pLevel->regFilter = 0;
148931+
pLevel->addrBrk = 0;
148918148932
}
148919148933
}
148920148934

@@ -234514,7 +234528,7 @@ static void fts5SourceIdFunc(
234514234528
){
234515234529
assert( nArg==0 );
234516234530
UNUSED_PARAM2(nArg, apUnused);
234517-
sqlite3_result_text(pCtx, "fts5: 2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4", -1, SQLITE_TRANSIENT);
234531+
sqlite3_result_text(pCtx, "fts5: 2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe", -1, SQLITE_TRANSIENT);
234518234532
}
234519234533

234520234534
/*

0 commit comments

Comments
 (0)