SQLite: Update SQLite to v3.43.2
[ChangeLog][Third-Party Code] Updated SQLite to v3.43.2 Pick-to: 6.5 6.2 5.15 Change-Id: I50ab6d53ada764e1d9390e4d768f4abf0de5652f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f2c2242c748e3954c647076d959c97a3025a0c92) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
19ad876963
commit
b34a911b07
4
src/3rdparty/sqlite/qt_attribution.json
vendored
4
src/3rdparty/sqlite/qt_attribution.json
vendored
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
"Description": "SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.",
|
"Description": "SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.",
|
||||||
"Homepage": "https://www.sqlite.org/",
|
"Homepage": "https://www.sqlite.org/",
|
||||||
"Version": "3.43.1",
|
"Version": "3.43.2",
|
||||||
"DownloadLocation": "https://sqlite.org/2023/sqlite-amalgamation-3430100.zip",
|
"DownloadLocation": "https://sqlite.org/2023/sqlite-amalgamation-3430200.zip",
|
||||||
"License": "Public Domain",
|
"License": "Public Domain",
|
||||||
"LicenseId": "CC0-1.0",
|
"LicenseId": "CC0-1.0",
|
||||||
"Copyright": "The authors disclaim copyright to the source code. However, a license can be obtained if needed."
|
"Copyright": "The authors disclaim copyright to the source code. However, a license can be obtained if needed."
|
||||||
|
43
src/3rdparty/sqlite/sqlite3.c
vendored
43
src/3rdparty/sqlite/sqlite3.c
vendored
@ -1,6 +1,6 @@
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
** This file is an amalgamation of many separate C source files from SQLite
|
** This file is an amalgamation of many separate C source files from SQLite
|
||||||
** version 3.43.1. By combining all the individual C code files into this
|
** version 3.43.2. By combining all the individual C code files into this
|
||||||
** single large file, the entire code can be compiled as a single translation
|
** single large file, the entire code can be compiled as a single translation
|
||||||
** unit. This allows many compilers to do optimizations that would not be
|
** unit. This allows many compilers to do optimizations that would not be
|
||||||
** possible if the files were compiled separately. Performance improvements
|
** possible if the files were compiled separately. Performance improvements
|
||||||
@ -18,7 +18,7 @@
|
|||||||
** separate file. This file contains only code for the core SQLite library.
|
** separate file. This file contains only code for the core SQLite library.
|
||||||
**
|
**
|
||||||
** The content in this amalgamation comes from Fossil check-in
|
** The content in this amalgamation comes from Fossil check-in
|
||||||
** d3a40c05c49e1a49264912b1a05bc2143ac.
|
** 310099cce5a487035fa535dd3002c59ac7f.
|
||||||
*/
|
*/
|
||||||
#define SQLITE_CORE 1
|
#define SQLITE_CORE 1
|
||||||
#define SQLITE_AMALGAMATION 1
|
#define SQLITE_AMALGAMATION 1
|
||||||
@ -459,9 +459,9 @@ extern "C" {
|
|||||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||||
** [sqlite_version()] and [sqlite_source_id()].
|
** [sqlite_version()] and [sqlite_source_id()].
|
||||||
*/
|
*/
|
||||||
#define SQLITE_VERSION "3.43.1"
|
#define SQLITE_VERSION "3.43.2"
|
||||||
#define SQLITE_VERSION_NUMBER 3043001
|
#define SQLITE_VERSION_NUMBER 3043002
|
||||||
#define SQLITE_SOURCE_ID "2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0"
|
#define SQLITE_SOURCE_ID "2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Run-Time Library Version Numbers
|
** CAPI3REF: Run-Time Library Version Numbers
|
||||||
@ -35185,29 +35185,29 @@ SQLITE_PRIVATE void sqlite3FpDecode(FpDecode *p, double r, int iRound, int mxRou
|
|||||||
double rr[2];
|
double rr[2];
|
||||||
rr[0] = r;
|
rr[0] = r;
|
||||||
rr[1] = 0.0;
|
rr[1] = 0.0;
|
||||||
if( rr[0]>1.84e+19 ){
|
if( rr[0]>9.223372036854774784e+18 ){
|
||||||
while( rr[0]>1.84e+119 ){
|
while( rr[0]>9.223372036854774784e+118 ){
|
||||||
exp += 100;
|
exp += 100;
|
||||||
dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117);
|
dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117);
|
||||||
}
|
}
|
||||||
while( rr[0]>1.84e+29 ){
|
while( rr[0]>9.223372036854774784e+28 ){
|
||||||
exp += 10;
|
exp += 10;
|
||||||
dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27);
|
dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27);
|
||||||
}
|
}
|
||||||
while( rr[0]>1.84e+19 ){
|
while( rr[0]>9.223372036854774784e+18 ){
|
||||||
exp += 1;
|
exp += 1;
|
||||||
dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18);
|
dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
while( rr[0]<1.84e-82 ){
|
while( rr[0]<9.223372036854774784e-83 ){
|
||||||
exp -= 100;
|
exp -= 100;
|
||||||
dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83);
|
dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83);
|
||||||
}
|
}
|
||||||
while( rr[0]<1.84e+08 ){
|
while( rr[0]<9.223372036854774784e+07 ){
|
||||||
exp -= 10;
|
exp -= 10;
|
||||||
dekkerMul2(rr, 1.0e+10, 0.0);
|
dekkerMul2(rr, 1.0e+10, 0.0);
|
||||||
}
|
}
|
||||||
while( rr[0]<1.84e+18 ){
|
while( rr[0]<9.22337203685477478e+17 ){
|
||||||
exp -= 1;
|
exp -= 1;
|
||||||
dekkerMul2(rr, 1.0e+01, 0.0);
|
dekkerMul2(rr, 1.0e+01, 0.0);
|
||||||
}
|
}
|
||||||
@ -77024,6 +77024,7 @@ static int rebuildPage(
|
|||||||
int k; /* Current slot in pCArray->apEnd[] */
|
int k; /* Current slot in pCArray->apEnd[] */
|
||||||
u8 *pSrcEnd; /* Current pCArray->apEnd[k] value */
|
u8 *pSrcEnd; /* Current pCArray->apEnd[k] value */
|
||||||
|
|
||||||
|
assert( nCell>0 );
|
||||||
assert( i<iEnd );
|
assert( i<iEnd );
|
||||||
j = get2byte(&aData[hdr+5]);
|
j = get2byte(&aData[hdr+5]);
|
||||||
if( NEVER(j>(u32)usableSize) ){ j = 0; }
|
if( NEVER(j>(u32)usableSize) ){ j = 0; }
|
||||||
@ -77330,6 +77331,7 @@ static int editPage(
|
|||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
editpage_fail:
|
editpage_fail:
|
||||||
/* Unable to edit this page. Rebuild it from scratch instead. */
|
/* Unable to edit this page. Rebuild it from scratch instead. */
|
||||||
|
if( nNew<1 ) return SQLITE_CORRUPT_BKPT;
|
||||||
populateCellCache(pCArray, iNew, nNew);
|
populateCellCache(pCArray, iNew, nNew);
|
||||||
return rebuildPage(pCArray, iNew, nNew, pPg);
|
return rebuildPage(pCArray, iNew, nNew, pPg);
|
||||||
}
|
}
|
||||||
@ -100833,8 +100835,7 @@ static int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){
|
|||||||
/* Set the value of register r[1] in the SQL statement to integer iRow.
|
/* Set the value of register r[1] in the SQL statement to integer iRow.
|
||||||
** This is done directly as a performance optimization
|
** This is done directly as a performance optimization
|
||||||
*/
|
*/
|
||||||
v->aMem[1].flags = MEM_Int;
|
sqlite3VdbeMemSetInt64(&v->aMem[1], iRow);
|
||||||
v->aMem[1].u.i = iRow;
|
|
||||||
|
|
||||||
/* If the statement has been run before (and is paused at the OP_ResultRow)
|
/* If the statement has been run before (and is paused at the OP_ResultRow)
|
||||||
** then back it up to the point where it does the OP_NotExists. This could
|
** then back it up to the point where it does the OP_NotExists. This could
|
||||||
@ -204136,6 +204137,7 @@ static void jsonReplaceFunc(
|
|||||||
}
|
}
|
||||||
pParse = jsonParseCached(ctx, argv[0], ctx, argc>1);
|
pParse = jsonParseCached(ctx, argv[0], ctx, argc>1);
|
||||||
if( pParse==0 ) return;
|
if( pParse==0 ) return;
|
||||||
|
pParse->nJPRef++;
|
||||||
for(i=1; i<(u32)argc; i+=2){
|
for(i=1; i<(u32)argc; i+=2){
|
||||||
zPath = (const char*)sqlite3_value_text(argv[i]);
|
zPath = (const char*)sqlite3_value_text(argv[i]);
|
||||||
pParse->useMod = 1;
|
pParse->useMod = 1;
|
||||||
@ -204148,6 +204150,7 @@ static void jsonReplaceFunc(
|
|||||||
jsonReturnJson(pParse, pParse->aNode, ctx, 1);
|
jsonReturnJson(pParse, pParse->aNode, ctx, 1);
|
||||||
replace_err:
|
replace_err:
|
||||||
jsonDebugPrintParse(pParse);
|
jsonDebugPrintParse(pParse);
|
||||||
|
jsonParseFree(pParse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -204182,6 +204185,7 @@ static void jsonSetFunc(
|
|||||||
}
|
}
|
||||||
pParse = jsonParseCached(ctx, argv[0], ctx, argc>1);
|
pParse = jsonParseCached(ctx, argv[0], ctx, argc>1);
|
||||||
if( pParse==0 ) return;
|
if( pParse==0 ) return;
|
||||||
|
pParse->nJPRef++;
|
||||||
for(i=1; i<(u32)argc; i+=2){
|
for(i=1; i<(u32)argc; i+=2){
|
||||||
zPath = (const char*)sqlite3_value_text(argv[i]);
|
zPath = (const char*)sqlite3_value_text(argv[i]);
|
||||||
bApnd = 0;
|
bApnd = 0;
|
||||||
@ -204198,9 +204202,8 @@ static void jsonSetFunc(
|
|||||||
}
|
}
|
||||||
jsonDebugPrintParse(pParse);
|
jsonDebugPrintParse(pParse);
|
||||||
jsonReturnJson(pParse, pParse->aNode, ctx, 1);
|
jsonReturnJson(pParse, pParse->aNode, ctx, 1);
|
||||||
|
|
||||||
jsonSetDone:
|
jsonSetDone:
|
||||||
/* no cleanup required */;
|
jsonParseFree(pParse);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -239689,7 +239692,6 @@ static void fts5DoSecureDelete(
|
|||||||
int iIdx = 0;
|
int iIdx = 0;
|
||||||
int iStart = 0;
|
int iStart = 0;
|
||||||
int iKeyOff = 0;
|
int iKeyOff = 0;
|
||||||
int iPrevKeyOff = 0;
|
|
||||||
int iDelKeyOff = 0; /* Offset of deleted key, if any */
|
int iDelKeyOff = 0; /* Offset of deleted key, if any */
|
||||||
|
|
||||||
nIdx = nPg-iPgIdx;
|
nIdx = nPg-iPgIdx;
|
||||||
@ -244251,6 +244253,9 @@ static int fts5FilterMethod(
|
|||||||
pCsr->iFirstRowid = fts5GetRowidLimit(pRowidGe, SMALLEST_INT64);
|
pCsr->iFirstRowid = fts5GetRowidLimit(pRowidGe, SMALLEST_INT64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex);
|
||||||
|
if( rc!=SQLITE_OK ) goto filter_out;
|
||||||
|
|
||||||
if( pTab->pSortCsr ){
|
if( pTab->pSortCsr ){
|
||||||
/* If pSortCsr is non-NULL, then this call is being made as part of
|
/* If pSortCsr is non-NULL, then this call is being made as part of
|
||||||
** processing for a "... MATCH <expr> ORDER BY rank" query (ePlan is
|
** processing for a "... MATCH <expr> ORDER BY rank" query (ePlan is
|
||||||
@ -244273,7 +244278,9 @@ static int fts5FilterMethod(
|
|||||||
pCsr->pExpr = pTab->pSortCsr->pExpr;
|
pCsr->pExpr = pTab->pSortCsr->pExpr;
|
||||||
rc = fts5CursorFirst(pTab, pCsr, bDesc);
|
rc = fts5CursorFirst(pTab, pCsr, bDesc);
|
||||||
}else if( pCsr->pExpr ){
|
}else if( pCsr->pExpr ){
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
rc = fts5CursorParseRank(pConfig, pCsr, pRank);
|
rc = fts5CursorParseRank(pConfig, pCsr, pRank);
|
||||||
|
}
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
if( bOrderByRank ){
|
if( bOrderByRank ){
|
||||||
pCsr->ePlan = FTS5_PLAN_SORTED_MATCH;
|
pCsr->ePlan = FTS5_PLAN_SORTED_MATCH;
|
||||||
@ -245754,7 +245761,7 @@ static void fts5SourceIdFunc(
|
|||||||
){
|
){
|
||||||
assert( nArg==0 );
|
assert( nArg==0 );
|
||||||
UNUSED_PARAM2(nArg, apUnused);
|
UNUSED_PARAM2(nArg, apUnused);
|
||||||
sqlite3_result_text(pCtx, "fts5: 2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0", -1, SQLITE_TRANSIENT);
|
sqlite3_result_text(pCtx, "fts5: 2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790", -1, SQLITE_TRANSIENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
6
src/3rdparty/sqlite/sqlite3.h
vendored
6
src/3rdparty/sqlite/sqlite3.h
vendored
@ -146,9 +146,9 @@ extern "C" {
|
|||||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||||
** [sqlite_version()] and [sqlite_source_id()].
|
** [sqlite_version()] and [sqlite_source_id()].
|
||||||
*/
|
*/
|
||||||
#define SQLITE_VERSION "3.43.1"
|
#define SQLITE_VERSION "3.43.2"
|
||||||
#define SQLITE_VERSION_NUMBER 3043001
|
#define SQLITE_VERSION_NUMBER 3043002
|
||||||
#define SQLITE_SOURCE_ID "2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0"
|
#define SQLITE_SOURCE_ID "2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Run-Time Library Version Numbers
|
** CAPI3REF: Run-Time Library Version Numbers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user