Skip to content

Commit 40a1f69

Browse files
committed
update amalgamation code
1 parent 2e165e0 commit 40a1f69

File tree

2 files changed

+38
-11
lines changed

2 files changed

+38
-11
lines changed

sqlite3-binding.c

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef USE_LIBSQLITE3
22
/******************************************************************************
33
** This file is an amalgamation of many separate C source files from SQLite
4-
** version 3.50.3. By combining all the individual C code files into this
4+
** version 3.50.4. By combining all the individual C code files into this
55
** single large file, the entire code can be compiled as a single translation
66
** unit. This allows many compilers to do optimizations that would not be
77
** possible if the files were compiled separately. Performance improvements
@@ -19,7 +19,7 @@
1919
** separate file. This file contains only code for the core SQLite library.
2020
**
2121
** The content in this amalgamation comes from Fossil check-in
22-
** 3ce993b8657d6d9deda380a93cdd6404a8c8 with changes in files:
22+
** 4d8adfb30e03f9cf27f800a2c1ba3c48fb4c with changes in files:
2323
**
2424
**
2525
*/
@@ -466,9 +466,9 @@ extern "C" {
466466
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
467467
** [sqlite_version()] and [sqlite_source_id()].
468468
*/
469-
#define SQLITE_VERSION "3.50.3"
470-
#define SQLITE_VERSION_NUMBER 3050003
471-
#define SQLITE_SOURCE_ID "2025-07-17 13:25:10 3ce993b8657d6d9deda380a93cdd6404a8c8ba1b185b2bc423703e41ae5f2543"
469+
#define SQLITE_VERSION "3.50.4"
470+
#define SQLITE_VERSION_NUMBER 3050004
471+
#define SQLITE_SOURCE_ID "2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3"
472472

473473
/*
474474
** CAPI3REF: Run-Time Library Version Numbers
@@ -19441,6 +19441,7 @@ struct Expr {
1944119441
Table *pTab; /* TK_COLUMN: Table containing column. Can be NULL
1944219442
** for a column of an index on an expression */
1944319443
Window *pWin; /* EP_WinFunc: Window/Filter defn for a function */
19444+
int nReg; /* TK_NULLS: Number of registers to NULL out */
1944419445
struct { /* TK_IN, TK_SELECT, and TK_EXISTS */
1944519446
int iAddr; /* Subroutine entry address */
1944619447
int regReturn; /* Register used to hold return address */
@@ -21475,6 +21476,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn(Parse*, Table*, Column*, int)
2147521476
SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, Expr*, int);
2147621477
SQLITE_PRIVATE void sqlite3ExprCodeFactorable(Parse*, Expr*, int);
2147721478
SQLITE_PRIVATE int sqlite3ExprCodeRunJustOnce(Parse*, Expr*, int);
21479+
SQLITE_PRIVATE void sqlite3ExprNullRegisterRange(Parse*, int, int);
2147821480
SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse*, Expr*, int*);
2147921481
SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse*, Expr*, int);
2148021482
SQLITE_PRIVATE int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int, u8);
@@ -115242,6 +115244,12 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)
115242115244
sqlite3VdbeLoadString(v, target, pExpr->u.zToken);
115243115245
return target;
115244115246
}
115247+
case TK_NULLS: {
115248+
/* Set a range of registers to NULL. pExpr->y.nReg registers starting
115249+
** with target */
115250+
sqlite3VdbeAddOp3(v, OP_Null, 0, target, target + pExpr->y.nReg - 1);
115251+
return target;
115252+
}
115245115253
default: {
115246115254
/* Make NULL the default case so that if a bug causes an illegal
115247115255
** Expr node to be passed into this function, it will be handled
@@ -115926,6 +115934,25 @@ SQLITE_PRIVATE int sqlite3ExprCodeRunJustOnce(
115926115934
return regDest;
115927115935
}
115928115936

115937+
/*
115938+
** Make arrangements to invoke OP_Null on a range of registers
115939+
** during initialization.
115940+
*/
115941+
SQLITE_PRIVATE SQLITE_NOINLINE void sqlite3ExprNullRegisterRange(
115942+
Parse *pParse, /* Parsing context */
115943+
int iReg, /* First register to set to NULL */
115944+
int nReg /* Number of sequential registers to NULL out */
115945+
){
115946+
u8 okConstFactor = pParse->okConstFactor;
115947+
Expr t;
115948+
memset(&t, 0, sizeof(t));
115949+
t.op = TK_NULLS;
115950+
t.y.nReg = nReg;
115951+
pParse->okConstFactor = 1;
115952+
sqlite3ExprCodeRunJustOnce(pParse, &t, iReg);
115953+
pParse->okConstFactor = okConstFactor;
115954+
}
115955+
115929115956
/*
115930115957
** Generate code to evaluate an expression and store the results
115931115958
** into a register. Return the register number where the results
@@ -153176,6 +153203,7 @@ SQLITE_PRIVATE int sqlite3Select(
153176153203
sqlite3VdbeAddOp2(v, OP_Integer, 0, iAbortFlag);
153177153204
VdbeComment((v, "clear abort flag"));
153178153205
sqlite3VdbeAddOp3(v, OP_Null, 0, iAMem, iAMem+pGroupBy->nExpr-1);
153206+
sqlite3ExprNullRegisterRange(pParse, iAMem, pGroupBy->nExpr);
153179153207

153180153208
/* Begin a loop that will extract all source rows in GROUP BY order.
153181153209
** This might involve two separate loops with an OP_Sort in between, or
@@ -168471,6 +168499,7 @@ static int whereLoopAddBtree(
168471168499
pNew->u.btree.nEq = 0;
168472168500
pNew->u.btree.nBtm = 0;
168473168501
pNew->u.btree.nTop = 0;
168502+
pNew->u.btree.nDistinctCol = 0;
168474168503
pNew->nSkip = 0;
168475168504
pNew->nLTerm = 0;
168476168505
pNew->iSortIdx = 0;
@@ -169539,8 +169568,6 @@ static i8 wherePathSatisfiesOrderBy(
169539169568
obSat = obDone;
169540169569
}
169541169570
break;
169542-
}else if( wctrlFlags & WHERE_DISTINCTBY ){
169543-
pLoop->u.btree.nDistinctCol = 0;
169544169571
}
169545169572
iCur = pWInfo->pTabList->a[pLoop->iTab].iCursor;
169546169573

@@ -257281,7 +257308,7 @@ static void fts5SourceIdFunc(
257281257308
){
257282257309
assert( nArg==0 );
257283257310
UNUSED_PARAM2(nArg, apUnused);
257284-
sqlite3_result_text(pCtx, "fts5: 2025-07-17 13:25:10 3ce993b8657d6d9deda380a93cdd6404a8c8ba1b185b2bc423703e41ae5f2543", -1, SQLITE_TRANSIENT);
257311+
sqlite3_result_text(pCtx, "fts5: 2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3", -1, SQLITE_TRANSIENT);
257285257312
}
257286257313

257287257314
/*

sqlite3-binding.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ extern "C" {
147147
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
148148
** [sqlite_version()] and [sqlite_source_id()].
149149
*/
150-
#define SQLITE_VERSION "3.50.3"
151-
#define SQLITE_VERSION_NUMBER 3050003
152-
#define SQLITE_SOURCE_ID "2025-07-17 13:25:10 3ce993b8657d6d9deda380a93cdd6404a8c8ba1b185b2bc423703e41ae5f2543"
150+
#define SQLITE_VERSION "3.50.4"
151+
#define SQLITE_VERSION_NUMBER 3050004
152+
#define SQLITE_SOURCE_ID "2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3"
153153

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

0 commit comments

Comments
 (0)