Skip to content

Commit 120032a

Browse files
committed
Upgrade sqlite to v3.43.2
1 parent 3cfea58 commit 120032a

File tree

3 files changed

+30
-23
lines changed

3 files changed

+30
-23
lines changed

c_src/sqlite3.c

Lines changed: 26 additions & 19 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.43.1. By combining all the individual C code files into this
3+
** version 3.43.2. 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
@@ -18,7 +18,7 @@
1818
** separate file. This file contains only code for the core SQLite library.
1919
**
2020
** The content in this amalgamation comes from Fossil check-in
21-
** d3a40c05c49e1a49264912b1a05bc2143ac.
21+
** 310099cce5a487035fa535dd3002c59ac7f.
2222
*/
2323
#define SQLITE_CORE 1
2424
#define SQLITE_AMALGAMATION 1
@@ -459,9 +459,9 @@ extern "C" {
459459
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
460460
** [sqlite_version()] and [sqlite_source_id()].
461461
*/
462-
#define SQLITE_VERSION "3.43.1"
463-
#define SQLITE_VERSION_NUMBER 3043001
464-
#define SQLITE_SOURCE_ID "2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0"
462+
#define SQLITE_VERSION "3.43.2"
463+
#define SQLITE_VERSION_NUMBER 3043002
464+
#define SQLITE_SOURCE_ID "2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790"
465465

466466
/*
467467
** CAPI3REF: Run-Time Library Version Numbers
@@ -35185,29 +35185,29 @@ SQLITE_PRIVATE void sqlite3FpDecode(FpDecode *p, double r, int iRound, int mxRou
3518535185
double rr[2];
3518635186
rr[0] = r;
3518735187
rr[1] = 0.0;
35188-
if( rr[0]>1.84e+19 ){
35189-
while( rr[0]>1.84e+119 ){
35188+
if( rr[0]>9.223372036854774784e+18 ){
35189+
while( rr[0]>9.223372036854774784e+118 ){
3519035190
exp += 100;
3519135191
dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117);
3519235192
}
35193-
while( rr[0]>1.84e+29 ){
35193+
while( rr[0]>9.223372036854774784e+28 ){
3519435194
exp += 10;
3519535195
dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27);
3519635196
}
35197-
while( rr[0]>1.84e+19 ){
35197+
while( rr[0]>9.223372036854774784e+18 ){
3519835198
exp += 1;
3519935199
dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18);
3520035200
}
3520135201
}else{
35202-
while( rr[0]<1.84e-82 ){
35202+
while( rr[0]<9.223372036854774784e-83 ){
3520335203
exp -= 100;
3520435204
dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83);
3520535205
}
35206-
while( rr[0]<1.84e+08 ){
35206+
while( rr[0]<9.223372036854774784e+07 ){
3520735207
exp -= 10;
3520835208
dekkerMul2(rr, 1.0e+10, 0.0);
3520935209
}
35210-
while( rr[0]<1.84e+18 ){
35210+
while( rr[0]<9.22337203685477478e+17 ){
3521135211
exp -= 1;
3521235212
dekkerMul2(rr, 1.0e+01, 0.0);
3521335213
}
@@ -77024,6 +77024,7 @@ static int rebuildPage(
7702477024
int k; /* Current slot in pCArray->apEnd[] */
7702577025
u8 *pSrcEnd; /* Current pCArray->apEnd[k] value */
7702677026

77027+
assert( nCell>0 );
7702777028
assert( i<iEnd );
7702877029
j = get2byte(&aData[hdr+5]);
7702977030
if( NEVER(j>(u32)usableSize) ){ j = 0; }
@@ -77330,6 +77331,7 @@ static int editPage(
7733077331
return SQLITE_OK;
7733177332
editpage_fail:
7733277333
/* Unable to edit this page. Rebuild it from scratch instead. */
77334+
if( nNew<1 ) return SQLITE_CORRUPT_BKPT;
7733377335
populateCellCache(pCArray, iNew, nNew);
7733477336
return rebuildPage(pCArray, iNew, nNew, pPg);
7733577337
}
@@ -100833,8 +100835,7 @@ static int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){
100833100835
/* Set the value of register r[1] in the SQL statement to integer iRow.
100834100836
** This is done directly as a performance optimization
100835100837
*/
100836-
v->aMem[1].flags = MEM_Int;
100837-
v->aMem[1].u.i = iRow;
100838+
sqlite3VdbeMemSetInt64(&v->aMem[1], iRow);
100838100839

100839100840
/* If the statement has been run before (and is paused at the OP_ResultRow)
100840100841
** then back it up to the point where it does the OP_NotExists. This could
@@ -204136,6 +204137,7 @@ static void jsonReplaceFunc(
204136204137
}
204137204138
pParse = jsonParseCached(ctx, argv[0], ctx, argc>1);
204138204139
if( pParse==0 ) return;
204140+
pParse->nJPRef++;
204139204141
for(i=1; i<(u32)argc; i+=2){
204140204142
zPath = (const char*)sqlite3_value_text(argv[i]);
204141204143
pParse->useMod = 1;
@@ -204148,6 +204150,7 @@ static void jsonReplaceFunc(
204148204150
jsonReturnJson(pParse, pParse->aNode, ctx, 1);
204149204151
replace_err:
204150204152
jsonDebugPrintParse(pParse);
204153+
jsonParseFree(pParse);
204151204154
}
204152204155

204153204156

@@ -204182,6 +204185,7 @@ static void jsonSetFunc(
204182204185
}
204183204186
pParse = jsonParseCached(ctx, argv[0], ctx, argc>1);
204184204187
if( pParse==0 ) return;
204188+
pParse->nJPRef++;
204185204189
for(i=1; i<(u32)argc; i+=2){
204186204190
zPath = (const char*)sqlite3_value_text(argv[i]);
204187204191
bApnd = 0;
@@ -204198,9 +204202,8 @@ static void jsonSetFunc(
204198204202
}
204199204203
jsonDebugPrintParse(pParse);
204200204204
jsonReturnJson(pParse, pParse->aNode, ctx, 1);
204201-
204202204205
jsonSetDone:
204203-
/* no cleanup required */;
204206+
jsonParseFree(pParse);
204204204207
}
204205204208

204206204209
/*
@@ -239689,7 +239692,6 @@ static void fts5DoSecureDelete(
239689239692
int iIdx = 0;
239690239693
int iStart = 0;
239691239694
int iKeyOff = 0;
239692-
int iPrevKeyOff = 0;
239693239695
int iDelKeyOff = 0; /* Offset of deleted key, if any */
239694239696

239695239697
nIdx = nPg-iPgIdx;
@@ -244251,6 +244253,9 @@ static int fts5FilterMethod(
244251244253
pCsr->iFirstRowid = fts5GetRowidLimit(pRowidGe, SMALLEST_INT64);
244252244254
}
244253244255

244256+
rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex);
244257+
if( rc!=SQLITE_OK ) goto filter_out;
244258+
244254244259
if( pTab->pSortCsr ){
244255244260
/* If pSortCsr is non-NULL, then this call is being made as part of
244256244261
** processing for a "... MATCH <expr> ORDER BY rank" query (ePlan is
@@ -244273,7 +244278,9 @@ static int fts5FilterMethod(
244273244278
pCsr->pExpr = pTab->pSortCsr->pExpr;
244274244279
rc = fts5CursorFirst(pTab, pCsr, bDesc);
244275244280
}else if( pCsr->pExpr ){
244276-
rc = fts5CursorParseRank(pConfig, pCsr, pRank);
244281+
if( rc==SQLITE_OK ){
244282+
rc = fts5CursorParseRank(pConfig, pCsr, pRank);
244283+
}
244277244284
if( rc==SQLITE_OK ){
244278244285
if( bOrderByRank ){
244279244286
pCsr->ePlan = FTS5_PLAN_SORTED_MATCH;
@@ -245754,7 +245761,7 @@ static void fts5SourceIdFunc(
245754245761
){
245755245762
assert( nArg==0 );
245756245763
UNUSED_PARAM2(nArg, apUnused);
245757-
sqlite3_result_text(pCtx, "fts5: 2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0", -1, SQLITE_TRANSIENT);
245764+
sqlite3_result_text(pCtx, "fts5: 2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790", -1, SQLITE_TRANSIENT);
245758245765
}
245759245766

245760245767
/*

c_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.43.1"
150-
#define SQLITE_VERSION_NUMBER 3043001
151-
#define SQLITE_SOURCE_ID "2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0"
149+
#define SQLITE_VERSION "3.43.2"
150+
#define SQLITE_VERSION_NUMBER 3043002
151+
#define SQLITE_SOURCE_ID "2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790"
152152

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

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule Exqlite.MixProject do
22
use Mix.Project
33

44
@version "0.14.0"
5-
@sqlite_version "3.43.1"
5+
@sqlite_version "3.43.2"
66

77
def project do
88
[

0 commit comments

Comments
 (0)