Fossil SCM

Update the built-in SQLite to fix a bug in json_remove(). This probably does not affect Fossil, but better safe than sorry.

drh 2023-08-04 13:27 trunk
Commit d3c850cf52ab1033a186eb904207a6c33db00945be047930e8cf6328b0b86ca1
2 files changed +42 -24 +2 -2
+42 -24
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
1616
** if you want a wrapper to interface SQLite with your choice of programming
1717
** language. The code for the "sqlite3" command-line shell is also in a
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
-** a0b9aecbaca9a8e784fd2bcb50f78cbdcf4.
21
+** a7a66db13b28da0b41f03be825a59360847.
2222
*/
2323
#define SQLITE_CORE 1
2424
#define SQLITE_AMALGAMATION 1
2525
#ifndef SQLITE_PRIVATE
2626
# define SQLITE_PRIVATE static
@@ -459,11 +459,11 @@
459459
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
460460
** [sqlite_version()] and [sqlite_source_id()].
461461
*/
462462
#define SQLITE_VERSION "3.43.0"
463463
#define SQLITE_VERSION_NUMBER 3043000
464
-#define SQLITE_SOURCE_ID "2023-08-02 16:06:02 ea0b9aecbaca9a8e784fd2bcb50f78cbdcf4c5cfb45a7700bb222e4cc104c644"
464
+#define SQLITE_SOURCE_ID "2023-08-04 13:19:11 ba7a66db13b28da0b41f03be825a593608474a5ebda89e12d58d89db709b8f65"
465465
466466
/*
467467
** CAPI3REF: Run-Time Library Version Numbers
468468
** KEYWORDS: sqlite3_version sqlite3_sourceid
469469
**
@@ -13116,11 +13116,11 @@
1311613116
**
1311713117
** xPhraseNextColumn()
1311813118
** See xPhraseFirstColumn above.
1311913119
*/
1312013120
struct Fts5ExtensionApi {
13121
- int iVersion; /* Currently always set to 3 */
13121
+ int iVersion; /* Currently always set to 2 */
1312213122
1312313123
void *(*xUserData)(Fts5Context*);
1312413124
1312513125
int (*xColumnCount)(Fts5Context*);
1312613126
int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
@@ -44325,16 +44325,21 @@
4432544325
** requested from the underlying operating system, a number which
4432644326
** might be greater than or equal to the argument, but not less
4432744327
** than the argument.
4432844328
*/
4432944329
static int unixSleep(sqlite3_vfs *NotUsed, int microseconds){
44330
-#if OS_VXWORKS || _POSIX_C_SOURCE >= 199309L
44330
+#if !defined(HAVE_NANOSLEEP) || HAVE_NANOSLEEP+0
4433144331
struct timespec sp;
44332
-
4433344332
sp.tv_sec = microseconds / 1000000;
4433444333
sp.tv_nsec = (microseconds % 1000000) * 1000;
44334
+
44335
+ /* Almost all modern unix systems support nanosleep(). But if you are
44336
+ ** compiling for one of the rare exceptions, you can use
44337
+ ** -DHAVE_NANOSLEEP=0 (perhaps in conjuction with -DHAVE_USLEEP if
44338
+ ** usleep() is available) in order to bypass the use of nanosleep() */
4433544339
nanosleep(&sp, NULL);
44340
+
4433644341
UNUSED_PARAMETER(NotUsed);
4433744342
return microseconds;
4433844343
#elif defined(HAVE_USLEEP) && HAVE_USLEEP
4433944344
if( microseconds>=1000000 ) sleep(microseconds/1000000);
4434044345
if( microseconds%1000000 ) usleep(microseconds%1000000);
@@ -94528,11 +94533,11 @@
9452894533
if( ((p5 = (pOp->p5 & OPFLAG_BYTELENARG))!=0
9452994534
&& (p5==OPFLAG_TYPEOFARG
9453094535
|| (t>=12 && ((t&1)==0 || p5==OPFLAG_BYTELENARG))
9453194536
)
9453294537
)
94533
- || (len = sqlite3VdbeSerialTypeLen(t))==0
94538
+ || sqlite3VdbeSerialTypeLen(t)==0
9453494539
){
9453594540
/* Content is irrelevant for
9453694541
** 1. the typeof() function,
9453794542
** 2. the length(X) function if X is a blob, and
9453894543
** 3. if the content length is zero.
@@ -177637,13 +177642,13 @@
177637177642
*/
177638177643
static int sqliteDefaultBusyCallback(
177639177644
void *ptr, /* Database connection */
177640177645
int count /* Number of times table has been busy */
177641177646
){
177642
-#if SQLITE_OS_WIN || HAVE_USLEEP
177647
+#if SQLITE_OS_WIN || !defined(HAVE_NANOSLEEP) || HAVE_NANOSLEEP
177643177648
/* This case is for systems that have support for sleeping for fractions of
177644
- ** a second. Examples: All windows systems, unix systems with usleep() */
177649
+ ** a second. Examples: All windows systems, unix systems with nanosleep() */
177645177650
static const u8 delays[] =
177646177651
{ 1, 2, 5, 10, 15, 20, 25, 25, 25, 50, 50, 100 };
177647177652
static const u8 totals[] =
177648177653
{ 0, 1, 3, 8, 18, 33, 53, 78, 103, 128, 178, 228 };
177649177654
# define NDELAY ArraySize(delays)
@@ -180132,14 +180137,16 @@
180132180137
sqlite3ShowExprList(0);
180133180138
sqlite3ShowIdList(0);
180134180139
sqlite3ShowSrcList(0);
180135180140
sqlite3ShowWith(0);
180136180141
sqlite3ShowUpsert(0);
180142
+#ifndef SQLITE_OMIT_TRIGGER
180137180143
sqlite3ShowTriggerStep(0);
180138180144
sqlite3ShowTriggerStepList(0);
180139180145
sqlite3ShowTrigger(0);
180140180146
sqlite3ShowTriggerList(0);
180147
+#endif
180141180148
#ifndef SQLITE_OMIT_WINDOWFUNC
180142180149
sqlite3ShowWindow(0);
180143180150
sqlite3ShowWinFunc(0);
180144180151
#endif
180145180152
sqlite3ShowSelect(0);
@@ -180442,10 +180449,11 @@
180442180449
*pU64 = sqlite3LogEstToInt(rLogEst);
180443180450
*pI2 = sqlite3LogEst(*pU64);
180444180451
break;
180445180452
}
180446180453
180454
+#if !defined(SQLITE_OMIT_WSD)
180447180455
/* sqlite3_test_control(SQLITE_TESTCTRL_USELONGDOUBLE, int X);
180448180456
**
180449180457
** X<0 Make no changes to the bUseLongDouble. Just report value.
180450180458
** X==0 Disable bUseLongDouble
180451180459
** X==1 Enable bUseLongDouble
@@ -180456,10 +180464,11 @@
180456180464
if( b==2 ) b = sizeof(LONGDOUBLE_TYPE)>8;
180457180465
if( b>=0 ) sqlite3Config.bUseLongDouble = b>0;
180458180466
rc = sqlite3Config.bUseLongDouble!=0;
180459180467
break;
180460180468
}
180469
+#endif
180461180470
180462180471
180463180472
#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_WSD)
180464180473
/* sqlite3_test_control(SQLITE_TESTCTRL_TUNE, id, *piValue)
180465180474
**
@@ -201910,11 +201919,13 @@
201910201919
JsonNode *p;
201911201920
assert( pParse->aNode!=0 || pParse->nNode>=pParse->nAlloc );
201912201921
if( pParse->nNode>=pParse->nAlloc ){
201913201922
return jsonParseAddNodeExpand(pParse, eType, n, zContent);
201914201923
}
201924
+ assert( pParse->aNode!=0 );
201915201925
p = &pParse->aNode[pParse->nNode];
201926
+ assert( p!=0 );
201916201927
p->eType = (u8)(eType & 0xff);
201917201928
p->jnFlags = (u8)(eType >> 8);
201918201929
VVA( p->eU = zContent ? 1 : 0 );
201919201930
p->n = n;
201920201931
p->u.zJContent = zContent;
@@ -201930,10 +201941,12 @@
201930201941
static void jsonParseAddNodeArray(
201931201942
JsonParse *pParse, /* Append the node to this object */
201932201943
JsonNode *aNode, /* Array of nodes to add */
201933201944
u32 nNode /* Number of elements in aNew */
201934201945
){
201946
+ assert( aNode!=0 );
201947
+ assert( nNode>=1 );
201935201948
if( pParse->nNode + nNode > pParse->nAlloc ){
201936201949
u32 nNew = pParse->nNode + nNode;
201937201950
JsonNode *aNew = sqlite3_realloc64(pParse->aNode, nNew*sizeof(JsonNode));
201938201951
if( aNew==0 ){
201939201952
pParse->oom = 1;
@@ -202827,24 +202840,29 @@
202827202840
u32 i, j, nKey;
202828202841
const char *zKey;
202829202842
JsonNode *pRoot;
202830202843
if( pParse->oom ) return 0;
202831202844
pRoot = &pParse->aNode[iRoot];
202832
- while( (pRoot->jnFlags & JNODE_REPLACE)!=0 && pParse->useMod ){
202833
- u32 idx = (u32)(pRoot - pParse->aNode);
202834
- i = pParse->iSubst;
202835
- while( 1 /*exit-by-break*/ ){
202836
- assert( i<pParse->nNode );
202837
- assert( pParse->aNode[i].eType==JSON_SUBST );
202838
- assert( pParse->aNode[i].eU==4 );
202839
- assert( pParse->aNode[i].u.iPrev<i );
202840
- if( pParse->aNode[i].n==idx ){
202841
- pRoot = &pParse->aNode[i+1];
202842
- iRoot = i+1;
202843
- break;
202844
- }
202845
- i = pParse->aNode[i].u.iPrev;
202845
+ if( pRoot->jnFlags & (JNODE_REPLACE|JNODE_REMOVE) && pParse->useMod ){
202846
+ while( (pRoot->jnFlags & JNODE_REPLACE)!=0 ){
202847
+ u32 idx = (u32)(pRoot - pParse->aNode);
202848
+ i = pParse->iSubst;
202849
+ while( 1 /*exit-by-break*/ ){
202850
+ assert( i<pParse->nNode );
202851
+ assert( pParse->aNode[i].eType==JSON_SUBST );
202852
+ assert( pParse->aNode[i].eU==4 );
202853
+ assert( pParse->aNode[i].u.iPrev<i );
202854
+ if( pParse->aNode[i].n==idx ){
202855
+ pRoot = &pParse->aNode[i+1];
202856
+ iRoot = i+1;
202857
+ break;
202858
+ }
202859
+ i = pParse->aNode[i].u.iPrev;
202860
+ }
202861
+ }
202862
+ if( pRoot->jnFlags & JNODE_REMOVE ){
202863
+ return 0;
202846202864
}
202847202865
}
202848202866
if( zPath[0]==0 ) return pRoot;
202849202867
if( zPath[0]=='.' ){
202850202868
if( pRoot->eType!=JSON_OBJECT ) return 0;
@@ -225621,11 +225639,11 @@
225621225639
**
225622225640
** xPhraseNextColumn()
225623225641
** See xPhraseFirstColumn above.
225624225642
*/
225625225643
struct Fts5ExtensionApi {
225626
- int iVersion; /* Currently always set to 3 */
225644
+ int iVersion; /* Currently always set to 2 */
225627225645
225628225646
void *(*xUserData)(Fts5Context*);
225629225647
225630225648
int (*xColumnCount)(Fts5Context*);
225631225649
int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
@@ -245297,11 +245315,11 @@
245297245315
int nArg, /* Number of args */
245298245316
sqlite3_value **apUnused /* Function arguments */
245299245317
){
245300245318
assert( nArg==0 );
245301245319
UNUSED_PARAM2(nArg, apUnused);
245302
- sqlite3_result_text(pCtx, "fts5: 2023-08-01 11:03:06 aa55c83f35c2ab134e0842201e46e021079283f9c65595c86664060b3aa8d715", -1, SQLITE_TRANSIENT);
245320
+ sqlite3_result_text(pCtx, "fts5: 2023-08-04 13:19:11 ba7a66db13b28da0b41f03be825a593608474a5ebda89e12d58d89db709b8f65", -1, SQLITE_TRANSIENT);
245303245321
}
245304245322
245305245323
/*
245306245324
** Return true if zName is the extension on one of the shadow tables used
245307245325
** by this module.
245308245326
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
18 ** separate file. This file contains only code for the core SQLite library.
19 **
20 ** The content in this amalgamation comes from Fossil check-in
21 ** a0b9aecbaca9a8e784fd2bcb50f78cbdcf4.
22 */
23 #define SQLITE_CORE 1
24 #define SQLITE_AMALGAMATION 1
25 #ifndef SQLITE_PRIVATE
26 # define SQLITE_PRIVATE static
@@ -459,11 +459,11 @@
459 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
460 ** [sqlite_version()] and [sqlite_source_id()].
461 */
462 #define SQLITE_VERSION "3.43.0"
463 #define SQLITE_VERSION_NUMBER 3043000
464 #define SQLITE_SOURCE_ID "2023-08-02 16:06:02 ea0b9aecbaca9a8e784fd2bcb50f78cbdcf4c5cfb45a7700bb222e4cc104c644"
465
466 /*
467 ** CAPI3REF: Run-Time Library Version Numbers
468 ** KEYWORDS: sqlite3_version sqlite3_sourceid
469 **
@@ -13116,11 +13116,11 @@
13116 **
13117 ** xPhraseNextColumn()
13118 ** See xPhraseFirstColumn above.
13119 */
13120 struct Fts5ExtensionApi {
13121 int iVersion; /* Currently always set to 3 */
13122
13123 void *(*xUserData)(Fts5Context*);
13124
13125 int (*xColumnCount)(Fts5Context*);
13126 int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
@@ -44325,16 +44325,21 @@
44325 ** requested from the underlying operating system, a number which
44326 ** might be greater than or equal to the argument, but not less
44327 ** than the argument.
44328 */
44329 static int unixSleep(sqlite3_vfs *NotUsed, int microseconds){
44330 #if OS_VXWORKS || _POSIX_C_SOURCE >= 199309L
44331 struct timespec sp;
44332
44333 sp.tv_sec = microseconds / 1000000;
44334 sp.tv_nsec = (microseconds % 1000000) * 1000;
 
 
 
 
 
44335 nanosleep(&sp, NULL);
 
44336 UNUSED_PARAMETER(NotUsed);
44337 return microseconds;
44338 #elif defined(HAVE_USLEEP) && HAVE_USLEEP
44339 if( microseconds>=1000000 ) sleep(microseconds/1000000);
44340 if( microseconds%1000000 ) usleep(microseconds%1000000);
@@ -94528,11 +94533,11 @@
94528 if( ((p5 = (pOp->p5 & OPFLAG_BYTELENARG))!=0
94529 && (p5==OPFLAG_TYPEOFARG
94530 || (t>=12 && ((t&1)==0 || p5==OPFLAG_BYTELENARG))
94531 )
94532 )
94533 || (len = sqlite3VdbeSerialTypeLen(t))==0
94534 ){
94535 /* Content is irrelevant for
94536 ** 1. the typeof() function,
94537 ** 2. the length(X) function if X is a blob, and
94538 ** 3. if the content length is zero.
@@ -177637,13 +177642,13 @@
177637 */
177638 static int sqliteDefaultBusyCallback(
177639 void *ptr, /* Database connection */
177640 int count /* Number of times table has been busy */
177641 ){
177642 #if SQLITE_OS_WIN || HAVE_USLEEP
177643 /* This case is for systems that have support for sleeping for fractions of
177644 ** a second. Examples: All windows systems, unix systems with usleep() */
177645 static const u8 delays[] =
177646 { 1, 2, 5, 10, 15, 20, 25, 25, 25, 50, 50, 100 };
177647 static const u8 totals[] =
177648 { 0, 1, 3, 8, 18, 33, 53, 78, 103, 128, 178, 228 };
177649 # define NDELAY ArraySize(delays)
@@ -180132,14 +180137,16 @@
180132 sqlite3ShowExprList(0);
180133 sqlite3ShowIdList(0);
180134 sqlite3ShowSrcList(0);
180135 sqlite3ShowWith(0);
180136 sqlite3ShowUpsert(0);
 
180137 sqlite3ShowTriggerStep(0);
180138 sqlite3ShowTriggerStepList(0);
180139 sqlite3ShowTrigger(0);
180140 sqlite3ShowTriggerList(0);
 
180141 #ifndef SQLITE_OMIT_WINDOWFUNC
180142 sqlite3ShowWindow(0);
180143 sqlite3ShowWinFunc(0);
180144 #endif
180145 sqlite3ShowSelect(0);
@@ -180442,10 +180449,11 @@
180442 *pU64 = sqlite3LogEstToInt(rLogEst);
180443 *pI2 = sqlite3LogEst(*pU64);
180444 break;
180445 }
180446
 
180447 /* sqlite3_test_control(SQLITE_TESTCTRL_USELONGDOUBLE, int X);
180448 **
180449 ** X<0 Make no changes to the bUseLongDouble. Just report value.
180450 ** X==0 Disable bUseLongDouble
180451 ** X==1 Enable bUseLongDouble
@@ -180456,10 +180464,11 @@
180456 if( b==2 ) b = sizeof(LONGDOUBLE_TYPE)>8;
180457 if( b>=0 ) sqlite3Config.bUseLongDouble = b>0;
180458 rc = sqlite3Config.bUseLongDouble!=0;
180459 break;
180460 }
 
180461
180462
180463 #if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_WSD)
180464 /* sqlite3_test_control(SQLITE_TESTCTRL_TUNE, id, *piValue)
180465 **
@@ -201910,11 +201919,13 @@
201910 JsonNode *p;
201911 assert( pParse->aNode!=0 || pParse->nNode>=pParse->nAlloc );
201912 if( pParse->nNode>=pParse->nAlloc ){
201913 return jsonParseAddNodeExpand(pParse, eType, n, zContent);
201914 }
 
201915 p = &pParse->aNode[pParse->nNode];
 
201916 p->eType = (u8)(eType & 0xff);
201917 p->jnFlags = (u8)(eType >> 8);
201918 VVA( p->eU = zContent ? 1 : 0 );
201919 p->n = n;
201920 p->u.zJContent = zContent;
@@ -201930,10 +201941,12 @@
201930 static void jsonParseAddNodeArray(
201931 JsonParse *pParse, /* Append the node to this object */
201932 JsonNode *aNode, /* Array of nodes to add */
201933 u32 nNode /* Number of elements in aNew */
201934 ){
 
 
201935 if( pParse->nNode + nNode > pParse->nAlloc ){
201936 u32 nNew = pParse->nNode + nNode;
201937 JsonNode *aNew = sqlite3_realloc64(pParse->aNode, nNew*sizeof(JsonNode));
201938 if( aNew==0 ){
201939 pParse->oom = 1;
@@ -202827,24 +202840,29 @@
202827 u32 i, j, nKey;
202828 const char *zKey;
202829 JsonNode *pRoot;
202830 if( pParse->oom ) return 0;
202831 pRoot = &pParse->aNode[iRoot];
202832 while( (pRoot->jnFlags & JNODE_REPLACE)!=0 && pParse->useMod ){
202833 u32 idx = (u32)(pRoot - pParse->aNode);
202834 i = pParse->iSubst;
202835 while( 1 /*exit-by-break*/ ){
202836 assert( i<pParse->nNode );
202837 assert( pParse->aNode[i].eType==JSON_SUBST );
202838 assert( pParse->aNode[i].eU==4 );
202839 assert( pParse->aNode[i].u.iPrev<i );
202840 if( pParse->aNode[i].n==idx ){
202841 pRoot = &pParse->aNode[i+1];
202842 iRoot = i+1;
202843 break;
202844 }
202845 i = pParse->aNode[i].u.iPrev;
 
 
 
 
 
202846 }
202847 }
202848 if( zPath[0]==0 ) return pRoot;
202849 if( zPath[0]=='.' ){
202850 if( pRoot->eType!=JSON_OBJECT ) return 0;
@@ -225621,11 +225639,11 @@
225621 **
225622 ** xPhraseNextColumn()
225623 ** See xPhraseFirstColumn above.
225624 */
225625 struct Fts5ExtensionApi {
225626 int iVersion; /* Currently always set to 3 */
225627
225628 void *(*xUserData)(Fts5Context*);
225629
225630 int (*xColumnCount)(Fts5Context*);
225631 int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
@@ -245297,11 +245315,11 @@
245297 int nArg, /* Number of args */
245298 sqlite3_value **apUnused /* Function arguments */
245299 ){
245300 assert( nArg==0 );
245301 UNUSED_PARAM2(nArg, apUnused);
245302 sqlite3_result_text(pCtx, "fts5: 2023-08-01 11:03:06 aa55c83f35c2ab134e0842201e46e021079283f9c65595c86664060b3aa8d715", -1, SQLITE_TRANSIENT);
245303 }
245304
245305 /*
245306 ** Return true if zName is the extension on one of the shadow tables used
245307 ** by this module.
245308
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
16 ** if you want a wrapper to interface SQLite with your choice of programming
17 ** language. The code for the "sqlite3" command-line shell is also in a
18 ** separate file. This file contains only code for the core SQLite library.
19 **
20 ** The content in this amalgamation comes from Fossil check-in
21 ** a7a66db13b28da0b41f03be825a59360847.
22 */
23 #define SQLITE_CORE 1
24 #define SQLITE_AMALGAMATION 1
25 #ifndef SQLITE_PRIVATE
26 # define SQLITE_PRIVATE static
@@ -459,11 +459,11 @@
459 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
460 ** [sqlite_version()] and [sqlite_source_id()].
461 */
462 #define SQLITE_VERSION "3.43.0"
463 #define SQLITE_VERSION_NUMBER 3043000
464 #define SQLITE_SOURCE_ID "2023-08-04 13:19:11 ba7a66db13b28da0b41f03be825a593608474a5ebda89e12d58d89db709b8f65"
465
466 /*
467 ** CAPI3REF: Run-Time Library Version Numbers
468 ** KEYWORDS: sqlite3_version sqlite3_sourceid
469 **
@@ -13116,11 +13116,11 @@
13116 **
13117 ** xPhraseNextColumn()
13118 ** See xPhraseFirstColumn above.
13119 */
13120 struct Fts5ExtensionApi {
13121 int iVersion; /* Currently always set to 2 */
13122
13123 void *(*xUserData)(Fts5Context*);
13124
13125 int (*xColumnCount)(Fts5Context*);
13126 int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
@@ -44325,16 +44325,21 @@
44325 ** requested from the underlying operating system, a number which
44326 ** might be greater than or equal to the argument, but not less
44327 ** than the argument.
44328 */
44329 static int unixSleep(sqlite3_vfs *NotUsed, int microseconds){
44330 #if !defined(HAVE_NANOSLEEP) || HAVE_NANOSLEEP+0
44331 struct timespec sp;
 
44332 sp.tv_sec = microseconds / 1000000;
44333 sp.tv_nsec = (microseconds % 1000000) * 1000;
44334
44335 /* Almost all modern unix systems support nanosleep(). But if you are
44336 ** compiling for one of the rare exceptions, you can use
44337 ** -DHAVE_NANOSLEEP=0 (perhaps in conjuction with -DHAVE_USLEEP if
44338 ** usleep() is available) in order to bypass the use of nanosleep() */
44339 nanosleep(&sp, NULL);
44340
44341 UNUSED_PARAMETER(NotUsed);
44342 return microseconds;
44343 #elif defined(HAVE_USLEEP) && HAVE_USLEEP
44344 if( microseconds>=1000000 ) sleep(microseconds/1000000);
44345 if( microseconds%1000000 ) usleep(microseconds%1000000);
@@ -94528,11 +94533,11 @@
94533 if( ((p5 = (pOp->p5 & OPFLAG_BYTELENARG))!=0
94534 && (p5==OPFLAG_TYPEOFARG
94535 || (t>=12 && ((t&1)==0 || p5==OPFLAG_BYTELENARG))
94536 )
94537 )
94538 || sqlite3VdbeSerialTypeLen(t)==0
94539 ){
94540 /* Content is irrelevant for
94541 ** 1. the typeof() function,
94542 ** 2. the length(X) function if X is a blob, and
94543 ** 3. if the content length is zero.
@@ -177637,13 +177642,13 @@
177642 */
177643 static int sqliteDefaultBusyCallback(
177644 void *ptr, /* Database connection */
177645 int count /* Number of times table has been busy */
177646 ){
177647 #if SQLITE_OS_WIN || !defined(HAVE_NANOSLEEP) || HAVE_NANOSLEEP
177648 /* This case is for systems that have support for sleeping for fractions of
177649 ** a second. Examples: All windows systems, unix systems with nanosleep() */
177650 static const u8 delays[] =
177651 { 1, 2, 5, 10, 15, 20, 25, 25, 25, 50, 50, 100 };
177652 static const u8 totals[] =
177653 { 0, 1, 3, 8, 18, 33, 53, 78, 103, 128, 178, 228 };
177654 # define NDELAY ArraySize(delays)
@@ -180132,14 +180137,16 @@
180137 sqlite3ShowExprList(0);
180138 sqlite3ShowIdList(0);
180139 sqlite3ShowSrcList(0);
180140 sqlite3ShowWith(0);
180141 sqlite3ShowUpsert(0);
180142 #ifndef SQLITE_OMIT_TRIGGER
180143 sqlite3ShowTriggerStep(0);
180144 sqlite3ShowTriggerStepList(0);
180145 sqlite3ShowTrigger(0);
180146 sqlite3ShowTriggerList(0);
180147 #endif
180148 #ifndef SQLITE_OMIT_WINDOWFUNC
180149 sqlite3ShowWindow(0);
180150 sqlite3ShowWinFunc(0);
180151 #endif
180152 sqlite3ShowSelect(0);
@@ -180442,10 +180449,11 @@
180449 *pU64 = sqlite3LogEstToInt(rLogEst);
180450 *pI2 = sqlite3LogEst(*pU64);
180451 break;
180452 }
180453
180454 #if !defined(SQLITE_OMIT_WSD)
180455 /* sqlite3_test_control(SQLITE_TESTCTRL_USELONGDOUBLE, int X);
180456 **
180457 ** X<0 Make no changes to the bUseLongDouble. Just report value.
180458 ** X==0 Disable bUseLongDouble
180459 ** X==1 Enable bUseLongDouble
@@ -180456,10 +180464,11 @@
180464 if( b==2 ) b = sizeof(LONGDOUBLE_TYPE)>8;
180465 if( b>=0 ) sqlite3Config.bUseLongDouble = b>0;
180466 rc = sqlite3Config.bUseLongDouble!=0;
180467 break;
180468 }
180469 #endif
180470
180471
180472 #if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_WSD)
180473 /* sqlite3_test_control(SQLITE_TESTCTRL_TUNE, id, *piValue)
180474 **
@@ -201910,11 +201919,13 @@
201919 JsonNode *p;
201920 assert( pParse->aNode!=0 || pParse->nNode>=pParse->nAlloc );
201921 if( pParse->nNode>=pParse->nAlloc ){
201922 return jsonParseAddNodeExpand(pParse, eType, n, zContent);
201923 }
201924 assert( pParse->aNode!=0 );
201925 p = &pParse->aNode[pParse->nNode];
201926 assert( p!=0 );
201927 p->eType = (u8)(eType & 0xff);
201928 p->jnFlags = (u8)(eType >> 8);
201929 VVA( p->eU = zContent ? 1 : 0 );
201930 p->n = n;
201931 p->u.zJContent = zContent;
@@ -201930,10 +201941,12 @@
201941 static void jsonParseAddNodeArray(
201942 JsonParse *pParse, /* Append the node to this object */
201943 JsonNode *aNode, /* Array of nodes to add */
201944 u32 nNode /* Number of elements in aNew */
201945 ){
201946 assert( aNode!=0 );
201947 assert( nNode>=1 );
201948 if( pParse->nNode + nNode > pParse->nAlloc ){
201949 u32 nNew = pParse->nNode + nNode;
201950 JsonNode *aNew = sqlite3_realloc64(pParse->aNode, nNew*sizeof(JsonNode));
201951 if( aNew==0 ){
201952 pParse->oom = 1;
@@ -202827,24 +202840,29 @@
202840 u32 i, j, nKey;
202841 const char *zKey;
202842 JsonNode *pRoot;
202843 if( pParse->oom ) return 0;
202844 pRoot = &pParse->aNode[iRoot];
202845 if( pRoot->jnFlags & (JNODE_REPLACE|JNODE_REMOVE) && pParse->useMod ){
202846 while( (pRoot->jnFlags & JNODE_REPLACE)!=0 ){
202847 u32 idx = (u32)(pRoot - pParse->aNode);
202848 i = pParse->iSubst;
202849 while( 1 /*exit-by-break*/ ){
202850 assert( i<pParse->nNode );
202851 assert( pParse->aNode[i].eType==JSON_SUBST );
202852 assert( pParse->aNode[i].eU==4 );
202853 assert( pParse->aNode[i].u.iPrev<i );
202854 if( pParse->aNode[i].n==idx ){
202855 pRoot = &pParse->aNode[i+1];
202856 iRoot = i+1;
202857 break;
202858 }
202859 i = pParse->aNode[i].u.iPrev;
202860 }
202861 }
202862 if( pRoot->jnFlags & JNODE_REMOVE ){
202863 return 0;
202864 }
202865 }
202866 if( zPath[0]==0 ) return pRoot;
202867 if( zPath[0]=='.' ){
202868 if( pRoot->eType!=JSON_OBJECT ) return 0;
@@ -225621,11 +225639,11 @@
225639 **
225640 ** xPhraseNextColumn()
225641 ** See xPhraseFirstColumn above.
225642 */
225643 struct Fts5ExtensionApi {
225644 int iVersion; /* Currently always set to 2 */
225645
225646 void *(*xUserData)(Fts5Context*);
225647
225648 int (*xColumnCount)(Fts5Context*);
225649 int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
@@ -245297,11 +245315,11 @@
245315 int nArg, /* Number of args */
245316 sqlite3_value **apUnused /* Function arguments */
245317 ){
245318 assert( nArg==0 );
245319 UNUSED_PARAM2(nArg, apUnused);
245320 sqlite3_result_text(pCtx, "fts5: 2023-08-04 13:19:11 ba7a66db13b28da0b41f03be825a593608474a5ebda89e12d58d89db709b8f65", -1, SQLITE_TRANSIENT);
245321 }
245322
245323 /*
245324 ** Return true if zName is the extension on one of the shadow tables used
245325 ** by this module.
245326
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,11 +146,11 @@
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149149
#define SQLITE_VERSION "3.43.0"
150150
#define SQLITE_VERSION_NUMBER 3043000
151
-#define SQLITE_SOURCE_ID "2023-08-02 16:06:02 ea0b9aecbaca9a8e784fd2bcb50f78cbdcf4c5cfb45a7700bb222e4cc104c644"
151
+#define SQLITE_SOURCE_ID "2023-08-04 13:19:11 ba7a66db13b28da0b41f03be825a593608474a5ebda89e12d58d89db709b8f65"
152152
153153
/*
154154
** CAPI3REF: Run-Time Library Version Numbers
155155
** KEYWORDS: sqlite3_version sqlite3_sourceid
156156
**
@@ -12803,11 +12803,11 @@
1280312803
**
1280412804
** xPhraseNextColumn()
1280512805
** See xPhraseFirstColumn above.
1280612806
*/
1280712807
struct Fts5ExtensionApi {
12808
- int iVersion; /* Currently always set to 3 */
12808
+ int iVersion; /* Currently always set to 2 */
1280912809
1281012810
void *(*xUserData)(Fts5Context*);
1281112811
1281212812
int (*xColumnCount)(Fts5Context*);
1281312813
int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
1281412814
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,11 +146,11 @@
146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147 ** [sqlite_version()] and [sqlite_source_id()].
148 */
149 #define SQLITE_VERSION "3.43.0"
150 #define SQLITE_VERSION_NUMBER 3043000
151 #define SQLITE_SOURCE_ID "2023-08-02 16:06:02 ea0b9aecbaca9a8e784fd2bcb50f78cbdcf4c5cfb45a7700bb222e4cc104c644"
152
153 /*
154 ** CAPI3REF: Run-Time Library Version Numbers
155 ** KEYWORDS: sqlite3_version sqlite3_sourceid
156 **
@@ -12803,11 +12803,11 @@
12803 **
12804 ** xPhraseNextColumn()
12805 ** See xPhraseFirstColumn above.
12806 */
12807 struct Fts5ExtensionApi {
12808 int iVersion; /* Currently always set to 3 */
12809
12810 void *(*xUserData)(Fts5Context*);
12811
12812 int (*xColumnCount)(Fts5Context*);
12813 int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
12814
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,11 +146,11 @@
146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147 ** [sqlite_version()] and [sqlite_source_id()].
148 */
149 #define SQLITE_VERSION "3.43.0"
150 #define SQLITE_VERSION_NUMBER 3043000
151 #define SQLITE_SOURCE_ID "2023-08-04 13:19:11 ba7a66db13b28da0b41f03be825a593608474a5ebda89e12d58d89db709b8f65"
152
153 /*
154 ** CAPI3REF: Run-Time Library Version Numbers
155 ** KEYWORDS: sqlite3_version sqlite3_sourceid
156 **
@@ -12803,11 +12803,11 @@
12803 **
12804 ** xPhraseNextColumn()
12805 ** See xPhraseFirstColumn above.
12806 */
12807 struct Fts5ExtensionApi {
12808 int iVersion; /* Currently always set to 2 */
12809
12810 void *(*xUserData)(Fts5Context*);
12811
12812 int (*xColumnCount)(Fts5Context*);
12813 int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
12814

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button