◐ Shell
clean mode source ↗

deps: update sqlite to 3.50.4 · nodejs/node@db24174

11

/******************************************************************************

22

** This file is an amalgamation of many separate C source files from SQLite

3-

** version 3.50.3. By combining all the individual C code files into this

3+

** version 3.50.4. 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-

** 3ce993b8657d6d9deda380a93cdd6404a8c8 with changes in files:

21+

** 4d8adfb30e03f9cf27f800a2c1ba3c48fb4c with changes in files:

2222

**

2323

**

2424

*/

@@ -465,9 +465,9 @@ extern "C" {

465465

** [sqlite3_libversion_number()], [sqlite3_sourceid()],

466466

** [sqlite_version()] and [sqlite_source_id()].

467467

*/

468-

#define SQLITE_VERSION "3.50.3"

469-

#define SQLITE_VERSION_NUMBER 3050003

470-

#define SQLITE_SOURCE_ID "2025-07-17 13:25:10 3ce993b8657d6d9deda380a93cdd6404a8c8ba1b185b2bc423703e41ae5f2543"

468+

#define SQLITE_VERSION "3.50.4"

469+

#define SQLITE_VERSION_NUMBER 3050004

470+

#define SQLITE_SOURCE_ID "2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3"

471471472472

/*

473473

** CAPI3REF: Run-Time Library Version Numbers

@@ -19440,6 +19440,7 @@ struct Expr {

1944019440

Table *pTab; /* TK_COLUMN: Table containing column. Can be NULL

1944119441

** for a column of an index on an expression */

1944219442

Window *pWin; /* EP_WinFunc: Window/Filter defn for a function */

19443+

int nReg; /* TK_NULLS: Number of registers to NULL out */

1944319444

struct { /* TK_IN, TK_SELECT, and TK_EXISTS */

1944419445

int iAddr; /* Subroutine entry address */

1944519446

int regReturn; /* Register used to hold return address */

@@ -21474,6 +21475,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn(Parse*, Table*, Column*, int)

2147421475

SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, Expr*, int);

2147521476

SQLITE_PRIVATE void sqlite3ExprCodeFactorable(Parse*, Expr*, int);

2147621477

SQLITE_PRIVATE int sqlite3ExprCodeRunJustOnce(Parse*, Expr*, int);

21478+

SQLITE_PRIVATE void sqlite3ExprNullRegisterRange(Parse*, int, int);

2147721479

SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse*, Expr*, int*);

2147821480

SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse*, Expr*, int);

2147921481

SQLITE_PRIVATE int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int, u8);

@@ -115241,6 +115243,12 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)

115241115243

sqlite3VdbeLoadString(v, target, pExpr->u.zToken);

115242115244

return target;

115243115245

}

115246+

case TK_NULLS: {

115247+

/* Set a range of registers to NULL. pExpr->y.nReg registers starting

115248+

** with target */

115249+

sqlite3VdbeAddOp3(v, OP_Null, 0, target, target + pExpr->y.nReg - 1);

115250+

return target;

115251+

}

115244115252

default: {

115245115253

/* Make NULL the default case so that if a bug causes an illegal

115246115254

** Expr node to be passed into this function, it will be handled

@@ -115925,6 +115933,25 @@ SQLITE_PRIVATE int sqlite3ExprCodeRunJustOnce(

115925115933

return regDest;

115926115934

}

115927115935115936+

/*

115937+

** Make arrangements to invoke OP_Null on a range of registers

115938+

** during initialization.

115939+

*/

115940+

SQLITE_PRIVATE SQLITE_NOINLINE void sqlite3ExprNullRegisterRange(

115941+

Parse *pParse, /* Parsing context */

115942+

int iReg, /* First register to set to NULL */

115943+

int nReg /* Number of sequential registers to NULL out */

115944+

){

115945+

u8 okConstFactor = pParse->okConstFactor;

115946+

Expr t;

115947+

memset(&t, 0, sizeof(t));

115948+

t.op = TK_NULLS;

115949+

t.y.nReg = nReg;

115950+

pParse->okConstFactor = 1;

115951+

sqlite3ExprCodeRunJustOnce(pParse, &t, iReg);

115952+

pParse->okConstFactor = okConstFactor;

115953+

}

115954+115928115955

/*

115929115956

** Generate code to evaluate an expression and store the results

115930115957

** into a register. Return the register number where the results

@@ -153175,6 +153202,7 @@ SQLITE_PRIVATE int sqlite3Select(

153175153202

sqlite3VdbeAddOp2(v, OP_Integer, 0, iAbortFlag);

153176153203

VdbeComment((v, "clear abort flag"));

153177153204

sqlite3VdbeAddOp3(v, OP_Null, 0, iAMem, iAMem+pGroupBy->nExpr-1);

153205+

sqlite3ExprNullRegisterRange(pParse, iAMem, pGroupBy->nExpr);

153178153206153179153207

/* Begin a loop that will extract all source rows in GROUP BY order.

153180153208

** This might involve two separate loops with an OP_Sort in between, or

@@ -168470,6 +168498,7 @@ static int whereLoopAddBtree(

168470168498

pNew->u.btree.nEq = 0;

168471168499

pNew->u.btree.nBtm = 0;

168472168500

pNew->u.btree.nTop = 0;

168501+

pNew->u.btree.nDistinctCol = 0;

168473168502

pNew->nSkip = 0;

168474168503

pNew->nLTerm = 0;

168475168504

pNew->iSortIdx = 0;

@@ -169538,8 +169567,6 @@ static i8 wherePathSatisfiesOrderBy(

169538169567

obSat = obDone;

169539169568

}

169540169569

break;

169541-

}else if( wctrlFlags & WHERE_DISTINCTBY ){

169542-

pLoop->u.btree.nDistinctCol = 0;

169543169570

}

169544169571

iCur = pWInfo->pTabList->a[pLoop->iTab].iCursor;

169545169572

@@ -257280,7 +257307,7 @@ static void fts5SourceIdFunc(

257280257307

){

257281257308

assert( nArg==0 );

257282257309

UNUSED_PARAM2(nArg, apUnused);

257283-

sqlite3_result_text(pCtx, "fts5: 2025-07-17 13:25:10 3ce993b8657d6d9deda380a93cdd6404a8c8ba1b185b2bc423703e41ae5f2543", -1, SQLITE_TRANSIENT);

257310+

sqlite3_result_text(pCtx, "fts5: 2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3", -1, SQLITE_TRANSIENT);

257284257311

}

257285257312257286257313

/*