summaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2024-12-07 22:40:11 +0100
committerGravatar Vincent Rischmann2024-12-07 22:40:11 +0100
commite7acc78d103e863996c4766d530ba7f12ca324a5 (patch)
treeffcdd7bd2c5caaa3aee4a92b538255cfcdb1cdf6 /c
parentupdate zon version (diff)
downloadzig-sqlite-e7acc78d103e863996c4766d530ba7f12ca324a5.tar.gz
zig-sqlite-e7acc78d103e863996c4766d530ba7f12ca324a5.tar.xz
zig-sqlite-e7acc78d103e863996c4766d530ba7f12ca324a5.zip
update sqlite to 3.47.2
Diffstat (limited to '')
-rw-r--r--c/sqlite3.c59
-rw-r--r--c/sqlite3.h6
2 files changed, 35 insertions, 30 deletions
diff --git a/c/sqlite3.c b/c/sqlite3.c
index 099c548..c748d03 100644
--- a/c/sqlite3.c
+++ b/c/sqlite3.c
@@ -1,6 +1,6 @@
1/****************************************************************************** 1/******************************************************************************
2** This file is an amalgamation of many separate C source files from SQLite 2** 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
4** single large file, the entire code can be compiled as a single translation 4** single large file, the entire code can be compiled as a single translation
5** unit. This allows many compilers to do optimizations that would not be 5** unit. This allows many compilers to do optimizations that would not be
6** possible if the files were compiled separately. Performance improvements 6** possible if the files were compiled separately. Performance improvements
@@ -18,7 +18,7 @@
18** separate file. This file contains only code for the core SQLite library. 18** separate file. This file contains only code for the core SQLite library.
19** 19**
20** The content in this amalgamation comes from Fossil check-in 20** The content in this amalgamation comes from Fossil check-in
21** b95d11e958643b969c47a8e5857f3793b9e6. 21** 2aabe05e2e8cae4847a802ee2daddc1d7413.
22*/ 22*/
23#define SQLITE_CORE 1 23#define SQLITE_CORE 1
24#define SQLITE_AMALGAMATION 1 24#define SQLITE_AMALGAMATION 1
@@ -462,9 +462,9 @@ extern "C" {
462** [sqlite3_libversion_number()], [sqlite3_sourceid()], 462** [sqlite3_libversion_number()], [sqlite3_sourceid()],
463** [sqlite_version()] and [sqlite_source_id()]. 463** [sqlite_version()] and [sqlite_source_id()].
464*/ 464*/
465#define SQLITE_VERSION "3.47.1" 465#define SQLITE_VERSION "3.47.2"
466#define SQLITE_VERSION_NUMBER 3047001 466#define SQLITE_VERSION_NUMBER 3047002
467#define SQLITE_SOURCE_ID "2024-11-25 12:07:48 b95d11e958643b969c47a8e5857f3793b9e69700b8f1469371386369a26e577e" 467#define SQLITE_SOURCE_ID "2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c"
468 468
469/* 469/*
470** CAPI3REF: Run-Time Library Version Numbers 470** CAPI3REF: Run-Time Library Version Numbers
@@ -35697,8 +35697,8 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en
35697 int eValid = 1; /* True exponent is either not used or is well-formed */ 35697 int eValid = 1; /* True exponent is either not used or is well-formed */
35698 int nDigit = 0; /* Number of digits processed */ 35698 int nDigit = 0; /* Number of digits processed */
35699 int eType = 1; /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */ 35699 int eType = 1; /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */
35700 u64 s2; /* round-tripped significand */
35700 double rr[2]; 35701 double rr[2];
35701 u64 s2;
35702 35702
35703 assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE ); 35703 assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
35704 *pResult = 0.0; /* Default return value, in case of an error */ 35704 *pResult = 0.0; /* Default return value, in case of an error */
@@ -35801,7 +35801,7 @@ do_atof_calc:
35801 e = (e*esign) + d; 35801 e = (e*esign) + d;
35802 35802
35803 /* Try to adjust the exponent to make it smaller */ 35803 /* Try to adjust the exponent to make it smaller */
35804 while( e>0 && s<(LARGEST_UINT64/10) ){ 35804 while( e>0 && s<((LARGEST_UINT64-0x7ff)/10) ){
35805 s *= 10; 35805 s *= 10;
35806 e--; 35806 e--;
35807 } 35807 }
@@ -35811,11 +35811,16 @@ do_atof_calc:
35811 } 35811 }
35812 35812
35813 rr[0] = (double)s; 35813 rr[0] = (double)s;
35814 s2 = (u64)rr[0]; 35814 assert( sizeof(s2)==sizeof(rr[0]) );
35815#if defined(_MSC_VER) && _MSC_VER<1700 35815 memcpy(&s2, &rr[0], sizeof(s2));
35816 if( s2==0x8000000000000000LL ){ s2 = 2*(u64)(0.5*rr[0]); } 35816 if( s2<=0x43efffffffffffffLL ){
35817#endif 35817 s2 = (u64)rr[0];
35818 rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s); 35818 rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s);
35819 }else{
35820 rr[1] = 0.0;
35821 }
35822 assert( rr[1]<=1.0e-10*rr[0] ); /* Equal only when rr[0]==0.0 */
35823
35819 if( e>0 ){ 35824 if( e>0 ){
35820 while( e>=100 ){ 35825 while( e>=100 ){
35821 e -= 100; 35826 e -= 100;
@@ -147605,32 +147610,32 @@ static Expr *substExpr(
147605 if( pSubst->isOuterJoin ){ 147610 if( pSubst->isOuterJoin ){
147606 ExprSetProperty(pNew, EP_CanBeNull); 147611 ExprSetProperty(pNew, EP_CanBeNull);
147607 } 147612 }
147608 if( ExprHasProperty(pExpr,EP_OuterON|EP_InnerON) ){ 147613 if( pNew->op==TK_TRUEFALSE ){
147609 sqlite3SetJoinExpr(pNew, pExpr->w.iJoin, 147614 pNew->u.iValue = sqlite3ExprTruthValue(pNew);
147610 pExpr->flags & (EP_OuterON|EP_InnerON)); 147615 pNew->op = TK_INTEGER;
147611 } 147616 ExprSetProperty(pNew, EP_IntValue);
147612 sqlite3ExprDelete(db, pExpr);
147613 pExpr = pNew;
147614 if( pExpr->op==TK_TRUEFALSE ){
147615 pExpr->u.iValue = sqlite3ExprTruthValue(pExpr);
147616 pExpr->op = TK_INTEGER;
147617 ExprSetProperty(pExpr, EP_IntValue);
147618 } 147617 }
147619 147618
147620 /* Ensure that the expression now has an implicit collation sequence, 147619 /* Ensure that the expression now has an implicit collation sequence,
147621 ** just as it did when it was a column of a view or sub-query. */ 147620 ** just as it did when it was a column of a view or sub-query. */
147622 { 147621 {
147623 CollSeq *pNat = sqlite3ExprCollSeq(pSubst->pParse, pExpr); 147622 CollSeq *pNat = sqlite3ExprCollSeq(pSubst->pParse, pNew);
147624 CollSeq *pColl = sqlite3ExprCollSeq(pSubst->pParse, 147623 CollSeq *pColl = sqlite3ExprCollSeq(pSubst->pParse,
147625 pSubst->pCList->a[iColumn].pExpr 147624 pSubst->pCList->a[iColumn].pExpr
147626 ); 147625 );
147627 if( pNat!=pColl || (pExpr->op!=TK_COLUMN && pExpr->op!=TK_COLLATE) ){ 147626 if( pNat!=pColl || (pNew->op!=TK_COLUMN && pNew->op!=TK_COLLATE) ){
147628 pExpr = sqlite3ExprAddCollateString(pSubst->pParse, pExpr, 147627 pNew = sqlite3ExprAddCollateString(pSubst->pParse, pNew,
147629 (pColl ? pColl->zName : "BINARY") 147628 (pColl ? pColl->zName : "BINARY")
147630 ); 147629 );
147631 } 147630 }
147632 } 147631 }
147633 ExprClearProperty(pExpr, EP_Collate); 147632 ExprClearProperty(pNew, EP_Collate);
147633 if( ExprHasProperty(pExpr,EP_OuterON|EP_InnerON) ){
147634 sqlite3SetJoinExpr(pNew, pExpr->w.iJoin,
147635 pExpr->flags & (EP_OuterON|EP_InnerON));
147636 }
147637 sqlite3ExprDelete(db, pExpr);
147638 pExpr = pNew;
147634 } 147639 }
147635 } 147640 }
147636 }else{ 147641 }else{
@@ -254938,7 +254943,7 @@ static void fts5SourceIdFunc(
254938){ 254943){
254939 assert( nArg==0 ); 254944 assert( nArg==0 );
254940 UNUSED_PARAM2(nArg, apUnused); 254945 UNUSED_PARAM2(nArg, apUnused);
254941 sqlite3_result_text(pCtx, "fts5: 2024-11-25 12:07:48 b95d11e958643b969c47a8e5857f3793b9e69700b8f1469371386369a26e577e", -1, SQLITE_TRANSIENT); 254946 sqlite3_result_text(pCtx, "fts5: 2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c", -1, SQLITE_TRANSIENT);
254942} 254947}
254943 254948
254944/* 254949/*
diff --git a/c/sqlite3.h b/c/sqlite3.h
index dbecc3f..d8ce148 100644
--- a/c/sqlite3.h
+++ b/c/sqlite3.h
@@ -146,9 +146,9 @@ extern "C" {
146** [sqlite3_libversion_number()], [sqlite3_sourceid()], 146** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147** [sqlite_version()] and [sqlite_source_id()]. 147** [sqlite_version()] and [sqlite_source_id()].
148*/ 148*/
149#define SQLITE_VERSION "3.47.1" 149#define SQLITE_VERSION "3.47.2"
150#define SQLITE_VERSION_NUMBER 3047001 150#define SQLITE_VERSION_NUMBER 3047002
151#define SQLITE_SOURCE_ID "2024-11-25 12:07:48 b95d11e958643b969c47a8e5857f3793b9e69700b8f1469371386369a26e577e" 151#define SQLITE_SOURCE_ID "2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c"
152 152
153/* 153/*
154** CAPI3REF: Run-Time Library Version Numbers 154** CAPI3REF: Run-Time Library Version Numbers