Skip to content

Commit b5d7c9b

Browse files
JoshuaWisemceachen
authored andcommitted
Update SQLite to version 3.47.2 (WiseLibs#1303)
Co-authored-by: mceachen <[email protected]>
1 parent 2b97f69 commit b5d7c9b

File tree

4 files changed

+37
-32
lines changed

4 files changed

+37
-32
lines changed

deps/download.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# ===
2020

2121
YEAR="2024"
22-
VERSION="3470100"
22+
VERSION="3470200"
2323

2424
# Defines below are sorted alphabetically
2525
DEFINES="

deps/sqlite3/sqlite3.c

+32-27
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.47.1. By combining all the individual C code files into this
3+
** version 3.47.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-
** b95d11e958643b969c47a8e5857f3793b9e6.
21+
** 2aabe05e2e8cae4847a802ee2daddc1d7413.
2222
*/
2323
#define SQLITE_CORE 1
2424
#define SQLITE_AMALGAMATION 1
@@ -463,9 +463,9 @@ extern "C" {
463463
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
464464
** [sqlite_version()] and [sqlite_source_id()].
465465
*/
466-
#define SQLITE_VERSION "3.47.1"
467-
#define SQLITE_VERSION_NUMBER 3047001
468-
#define SQLITE_SOURCE_ID "2024-11-25 12:07:48 b95d11e958643b969c47a8e5857f3793b9e69700b8f1469371386369a26e577e"
466+
#define SQLITE_VERSION "3.47.2"
467+
#define SQLITE_VERSION_NUMBER 3047002
468+
#define SQLITE_SOURCE_ID "2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c"
469469

470470
/*
471471
** CAPI3REF: Run-Time Library Version Numbers
@@ -35698,8 +35698,8 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en
3569835698
int eValid = 1; /* True exponent is either not used or is well-formed */
3569935699
int nDigit = 0; /* Number of digits processed */
3570035700
int eType = 1; /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */
35701+
u64 s2; /* round-tripped significand */
3570135702
double rr[2];
35702-
u64 s2;
3570335703

3570435704
assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
3570535705
*pResult = 0.0; /* Default return value, in case of an error */
@@ -35802,7 +35802,7 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en
3580235802
e = (e*esign) + d;
3580335803

3580435804
/* Try to adjust the exponent to make it smaller */
35805-
while( e>0 && s<(LARGEST_UINT64/10) ){
35805+
while( e>0 && s<((LARGEST_UINT64-0x7ff)/10) ){
3580635806
s *= 10;
3580735807
e--;
3580835808
}
@@ -35812,11 +35812,16 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en
3581235812
}
3581335813

3581435814
rr[0] = (double)s;
35815-
s2 = (u64)rr[0];
35816-
#if defined(_MSC_VER) && _MSC_VER<1700
35817-
if( s2==0x8000000000000000LL ){ s2 = 2*(u64)(0.5*rr[0]); }
35818-
#endif
35819-
rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s);
35815+
assert( sizeof(s2)==sizeof(rr[0]) );
35816+
memcpy(&s2, &rr[0], sizeof(s2));
35817+
if( s2<=0x43efffffffffffffLL ){
35818+
s2 = (u64)rr[0];
35819+
rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s);
35820+
}else{
35821+
rr[1] = 0.0;
35822+
}
35823+
assert( rr[1]<=1.0e-10*rr[0] ); /* Equal only when rr[0]==0.0 */
35824+
3582035825
if( e>0 ){
3582135826
while( e>=100 ){
3582235827
e -= 100;
@@ -147606,32 +147611,32 @@ static Expr *substExpr(
147606147611
if( pSubst->isOuterJoin ){
147607147612
ExprSetProperty(pNew, EP_CanBeNull);
147608147613
}
147609-
if( ExprHasProperty(pExpr,EP_OuterON|EP_InnerON) ){
147610-
sqlite3SetJoinExpr(pNew, pExpr->w.iJoin,
147611-
pExpr->flags & (EP_OuterON|EP_InnerON));
147612-
}
147613-
sqlite3ExprDelete(db, pExpr);
147614-
pExpr = pNew;
147615-
if( pExpr->op==TK_TRUEFALSE ){
147616-
pExpr->u.iValue = sqlite3ExprTruthValue(pExpr);
147617-
pExpr->op = TK_INTEGER;
147618-
ExprSetProperty(pExpr, EP_IntValue);
147614+
if( pNew->op==TK_TRUEFALSE ){
147615+
pNew->u.iValue = sqlite3ExprTruthValue(pNew);
147616+
pNew->op = TK_INTEGER;
147617+
ExprSetProperty(pNew, EP_IntValue);
147619147618
}
147620147619

147621147620
/* Ensure that the expression now has an implicit collation sequence,
147622147621
** just as it did when it was a column of a view or sub-query. */
147623147622
{
147624-
CollSeq *pNat = sqlite3ExprCollSeq(pSubst->pParse, pExpr);
147623+
CollSeq *pNat = sqlite3ExprCollSeq(pSubst->pParse, pNew);
147625147624
CollSeq *pColl = sqlite3ExprCollSeq(pSubst->pParse,
147626147625
pSubst->pCList->a[iColumn].pExpr
147627147626
);
147628-
if( pNat!=pColl || (pExpr->op!=TK_COLUMN && pExpr->op!=TK_COLLATE) ){
147629-
pExpr = sqlite3ExprAddCollateString(pSubst->pParse, pExpr,
147627+
if( pNat!=pColl || (pNew->op!=TK_COLUMN && pNew->op!=TK_COLLATE) ){
147628+
pNew = sqlite3ExprAddCollateString(pSubst->pParse, pNew,
147630147629
(pColl ? pColl->zName : "BINARY")
147631147630
);
147632147631
}
147633147632
}
147634-
ExprClearProperty(pExpr, EP_Collate);
147633+
ExprClearProperty(pNew, EP_Collate);
147634+
if( ExprHasProperty(pExpr,EP_OuterON|EP_InnerON) ){
147635+
sqlite3SetJoinExpr(pNew, pExpr->w.iJoin,
147636+
pExpr->flags & (EP_OuterON|EP_InnerON));
147637+
}
147638+
sqlite3ExprDelete(db, pExpr);
147639+
pExpr = pNew;
147635147640
}
147636147641
}
147637147642
}else{
@@ -254955,7 +254960,7 @@ static void fts5SourceIdFunc(
254955254960
){
254956254961
assert( nArg==0 );
254957254962
UNUSED_PARAM2(nArg, apUnused);
254958-
sqlite3_result_text(pCtx, "fts5: 2024-11-25 12:07:48 b95d11e958643b969c47a8e5857f3793b9e69700b8f1469371386369a26e577e", -1, SQLITE_TRANSIENT);
254963+
sqlite3_result_text(pCtx, "fts5: 2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c", -1, SQLITE_TRANSIENT);
254959254964
}
254960254965

254961254966
/*

deps/sqlite3/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.47.1"
150-
#define SQLITE_VERSION_NUMBER 3047001
151-
#define SQLITE_SOURCE_ID "2024-11-25 12:07:48 b95d11e958643b969c47a8e5857f3793b9e69700b8f1469371386369a26e577e"
149+
#define SQLITE_VERSION "3.47.2"
150+
#define SQLITE_VERSION_NUMBER 3047002
151+
#define SQLITE_SOURCE_ID "2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c"
152152

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

docs/compilation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ If you're using a SQLite3 encryption extension that is a drop-in replacement for
4343

4444
# Bundled configuration
4545

46-
By default, this distribution currently uses SQLite3 **version 3.47.1** with the following [compilation options](https://www.sqlite.org/compile.html):
46+
By default, this distribution currently uses SQLite3 **version 3.47.2** with the following [compilation options](https://www.sqlite.org/compile.html):
4747

4848
```
4949
HAVE_INT16_T=1

0 commit comments

Comments
 (0)