Skip to content

Commit 62d6935

Browse files
authored
Embed sqlite amalgamation 3.50.4 source code (#93)
1 parent 1c0c6e7 commit 62d6935

File tree

3 files changed

+40
-13
lines changed

3 files changed

+40
-13
lines changed

Sources/CSQLite/include/sqlite_nio_sqlite3.h

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

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

Sources/CSQLite/sqlite_nio_sqlite3.c

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
33
/******************************************************************************
44
** This file is an amalgamation of many separate C source files from SQLite
5-
** version 3.50.3. By combining all the individual C code files into this
5+
** version 3.50.4. By combining all the individual C code files into this
66
** single large file, the entire code can be compiled as a single translation
77
** unit. This allows many compilers to do optimizations that would not be
88
** possible if the files were compiled separately. Performance improvements
@@ -20,7 +20,7 @@
2020
** separate file. This file contains only code for the core SQLite library.
2121
**
2222
** The content in this amalgamation comes from Fossil check-in
23-
** 3ce993b8657d6d9deda380a93cdd6404a8c8 with changes in files:
23+
** 4d8adfb30e03f9cf27f800a2c1ba3c48fb4c with changes in files:
2424
**
2525
**
2626
*/
@@ -467,9 +467,9 @@ extern "C" {
467467
** [sqlite_nio_sqlite3_libversion_number()], [sqlite_nio_sqlite3_sourceid()],
468468
** [sqlite_version()] and [sqlite_source_id()].
469469
*/
470-
#define SQLITE_VERSION "3.50.3"
471-
#define SQLITE_VERSION_NUMBER 3050003
472-
#define SQLITE_SOURCE_ID "2025-07-17 13:25:10 3ce993b8657d6d9deda380a93cdd6404a8c8ba1b185b2bc423703e41ae5f2543"
470+
#define SQLITE_VERSION "3.50.4"
471+
#define SQLITE_VERSION_NUMBER 3050004
472+
#define SQLITE_SOURCE_ID "2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3"
473473

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

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

153181153209
/* Begin a loop that will extract all source rows in GROUP BY order.
153182153210
** This might involve two separate loops with an OP_Sort in between, or
@@ -168472,6 +168500,7 @@ static int whereLoopAddBtree(
168472168500
pNew->u.btree.nEq = 0;
168473168501
pNew->u.btree.nBtm = 0;
168474168502
pNew->u.btree.nTop = 0;
168503+
pNew->u.btree.nDistinctCol = 0;
168475168504
pNew->nSkip = 0;
168476168505
pNew->nLTerm = 0;
168477168506
pNew->iSortIdx = 0;
@@ -169540,8 +169569,6 @@ static i8 wherePathSatisfiesOrderBy(
169540169569
obSat = obDone;
169541169570
}
169542169571
break;
169543-
}else if( wctrlFlags & WHERE_DISTINCTBY ){
169544-
pLoop->u.btree.nDistinctCol = 0;
169545169572
}
169546169573
iCur = pWInfo->pTabList->a[pLoop->iTab].iCursor;
169547169574

@@ -257285,7 +257312,7 @@ static void fts5SourceIdFunc(
257285257312
){
257286257313
assert( nArg==0 );
257287257314
UNUSED_PARAM2(nArg, apUnused);
257288-
sqlite_nio_sqlite3_result_text(pCtx, "fts5: 2025-07-17 13:25:10 3ce993b8657d6d9deda380a93cdd6404a8c8ba1b185b2bc423703e41ae5f2543", -1, SQLITE_TRANSIENT);
257315+
sqlite_nio_sqlite3_result_text(pCtx, "fts5: 2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3", -1, SQLITE_TRANSIENT);
257289257316
}
257290257317

257291257318
/*

Sources/CSQLite/version.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// This directory is generated from SQLite sources downloaded from https://sqlite.org/2025/sqlite-amalgamation-3500300.zip
2-
3.50.3
1+
// This directory is generated from SQLite sources downloaded from https://sqlite.org/2025/sqlite-amalgamation-3500400.zip
2+
3.50.4

0 commit comments

Comments
 (0)