Compare commits

...

2 Commits

8 changed files with 140 additions and 99 deletions

View File

@ -23,7 +23,7 @@ VERSION_NAME := This program kills fascists.
IPHONEOS_VERSION_MIN=14.0 IPHONEOS_VERSION_MIN=14.0
SQLITE_URL := https://www.sqlite.org/2025/sqlite-amalgamation-3490100.zip SQLITE_URL := https://www.sqlite.org/2025/sqlite-amalgamation-3490200.zip
BUNDLETOOL_URL := https://github.com/google/bundletool/releases/download/1.17.0/bundletool-all-1.17.0.jar BUNDLETOOL_URL := https://github.com/google/bundletool/releases/download/1.17.0/bundletool-all-1.17.0.jar
APPIMAGETOOL_URL := https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage APPIMAGETOOL_URL := https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
APPIMAGETOOL_MD5 := e989fadfc4d685fd3d6aeeb9b525d74d out/appimagetool APPIMAGETOOL_MD5 := e989fadfc4d685fd3d6aeeb9b525d74d out/appimagetool

View File

@ -191,8 +191,15 @@ class TfElement extends LitElement {
try { try {
while (true) { while (true) {
let max_seen; let max_seen;
for (let account_chunk = 0; account_chunk < ids.length; account_chunk += k_account_chunk_size) { for (
let ids_chunk = ids.slice(account_chunk, account_chunk + k_account_chunk_size); let account_chunk = 0;
account_chunk < ids.length;
account_chunk += k_account_chunk_size
) {
let ids_chunk = ids.slice(
account_chunk,
account_chunk + k_account_chunk_size
);
let abouts = await tfrpc.rpc.query( let abouts = await tfrpc.rpc.query(
` `
WITH WITH
@ -464,16 +471,18 @@ class TfElement extends LitElement {
} }
async load_recent_reactions() { async load_recent_reactions() {
this.recent_reactions = (await tfrpc.rpc.query( this.recent_reactions = (
` await tfrpc.rpc.query(
`
SELECT DISTINCT content ->> '$.vote.expression' AS value SELECT DISTINCT content ->> '$.vote.expression' AS value
FROM messages FROM messages
WHERE author = ? AND WHERE author = ? AND
content ->> '$.type' = 'vote' content ->> '$.type' = 'vote'
ORDER BY timestamp DESC LIMIT 10 ORDER BY timestamp DESC LIMIT 10
`, `,
[this.whoami] [this.whoami]
)).map((x) => x.value); )
).map((x) => x.value);
} }
async load() { async load() {

View File

@ -234,9 +234,9 @@
<div class="w3-container w3-padding-64 w3-light-grey w3-center"> <div class="w3-container w3-padding-64 w3-light-grey w3-center">
<h1 class="w3-jumbo"><b>Built the Old Fashioned Way</b></h1> <h1 class="w3-jumbo"><b>Built the Old Fashioned Way</b></h1>
<p> <p>
Tilde Friends strives to use only simple and widely adopted Tilde Friends strives to use only simple and widely adopted dependencies
dependencies in order to keep it easy to build for all sorts of in order to keep it easy to build for all sorts of platforms and
platforms and maintainable for a very long time. maintainable for a very long time.
</p> </p>
<p> <p>
Though of course for building Tilde Friends apps, you are free to use Though of course for building Tilde Friends apps, you are free to use

71
deps/sqlite/shell.c vendored
View File

@ -6267,8 +6267,7 @@ int sqlite3_ieee_init(
** step HIDDEN ** step HIDDEN
** ); ** );
** **
** The virtual table also has a rowid, logically equivalent to n+1 where ** The virtual table also has a rowid which is an alias for the value.
** "n" is the ascending integer in the aforesaid production definition.
** **
** Function arguments in queries against this virtual table are translated ** Function arguments in queries against this virtual table are translated
** into equality constraints against successive hidden columns. In other ** into equality constraints against successive hidden columns. In other
@ -6323,6 +6322,7 @@ SQLITE_EXTENSION_INIT1
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#include <math.h>
#ifndef SQLITE_OMIT_VIRTUALTABLE #ifndef SQLITE_OMIT_VIRTUALTABLE
/* /*
@ -6483,6 +6483,7 @@ static int seriesConnect(
int rc; int rc;
/* Column numbers */ /* Column numbers */
#define SERIES_COLUMN_ROWID (-1)
#define SERIES_COLUMN_VALUE 0 #define SERIES_COLUMN_VALUE 0
#define SERIES_COLUMN_START 1 #define SERIES_COLUMN_START 1
#define SERIES_COLUMN_STOP 2 #define SERIES_COLUMN_STOP 2
@ -6570,13 +6571,11 @@ static int seriesColumn(
#endif #endif
/* /*
** Return the rowid for the current row, logically equivalent to n+1 where ** The rowid is the same as the value.
** "n" is the ascending integer in the aforesaid production definition.
*/ */
static int seriesRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){ static int seriesRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
series_cursor *pCur = (series_cursor*)cur; series_cursor *pCur = (series_cursor*)cur;
sqlite3_uint64 n = pCur->ss.uSeqIndexNow; *pRowid = pCur->ss.iValueNow;
*pRowid = (sqlite3_int64)((n<LARGEST_UINT64)? n+1 : 0);
return SQLITE_OK; return SQLITE_OK;
} }
@ -6689,25 +6688,52 @@ static int seriesFilter(
** constraints on the "value" column. ** constraints on the "value" column.
*/ */
if( idxNum & 0x0080 ){ if( idxNum & 0x0080 ){
iMin = iMax = sqlite3_value_int64(argv[i++]); if( sqlite3_value_numeric_type(argv[i])==SQLITE_FLOAT ){
double r = sqlite3_value_double(argv[i++]);
if( r==ceil(r) ){
iMin = iMax = (sqlite3_int64)r;
}else{
returnNoRows = 1;
}
}else{
iMin = iMax = sqlite3_value_int64(argv[i++]);
}
}else{ }else{
if( idxNum & 0x0300 ){ if( idxNum & 0x0300 ){
iMin = sqlite3_value_int64(argv[i++]); if( sqlite3_value_numeric_type(argv[i])==SQLITE_FLOAT ){
if( idxNum & 0x0200 ){ double r = sqlite3_value_double(argv[i++]);
if( iMin==LARGEST_INT64 ){ if( idxNum & 0x0200 && r==ceil(r) ){
returnNoRows = 1; iMin = (sqlite3_int64)ceil(r+1.0);
}else{ }else{
iMin++; iMin = (sqlite3_int64)ceil(r);
}
}else{
iMin = sqlite3_value_int64(argv[i++]);
if( idxNum & 0x0200 ){
if( iMin==LARGEST_INT64 ){
returnNoRows = 1;
}else{
iMin++;
}
} }
} }
} }
if( idxNum & 0x3000 ){ if( idxNum & 0x3000 ){
iMax = sqlite3_value_int64(argv[i++]); if( sqlite3_value_numeric_type(argv[i])==SQLITE_FLOAT ){
if( idxNum & 0x2000 ){ double r = sqlite3_value_double(argv[i++]);
if( iMax==SMALLEST_INT64 ){ if( (idxNum & 0x2000)!=0 && r==floor(r) ){
returnNoRows = 1; iMax = (sqlite3_int64)(r-1.0);
}else{ }else{
iMax--; iMax = (sqlite3_int64)floor(r);
}
}else{
iMax = sqlite3_value_int64(argv[i++]);
if( idxNum & 0x2000 ){
if( iMax==SMALLEST_INT64 ){
returnNoRows = 1;
}else{
iMax--;
}
} }
} }
} }
@ -6726,8 +6752,7 @@ static int seriesFilter(
pCur->ss.iBase += ((d+szStep-1)/szStep)*szStep; pCur->ss.iBase += ((d+szStep-1)/szStep)*szStep;
} }
if( pCur->ss.iTerm>iMax ){ if( pCur->ss.iTerm>iMax ){
sqlite3_uint64 d = pCur->ss.iTerm - iMax; pCur->ss.iTerm = iMax;
pCur->ss.iTerm -= ((d+szStep-1)/szStep)*szStep;
} }
}else{ }else{
sqlite3_int64 szStep = -pCur->ss.iStep; sqlite3_int64 szStep = -pCur->ss.iStep;
@ -6737,8 +6762,7 @@ static int seriesFilter(
pCur->ss.iBase -= ((d+szStep-1)/szStep)*szStep; pCur->ss.iBase -= ((d+szStep-1)/szStep)*szStep;
} }
if( pCur->ss.iTerm<iMin ){ if( pCur->ss.iTerm<iMin ){
sqlite3_uint64 d = iMin - pCur->ss.iTerm; pCur->ss.iTerm = iMin;
pCur->ss.iTerm += ((d+szStep-1)/szStep)*szStep;
} }
} }
} }
@ -6866,7 +6890,10 @@ static int seriesBestIndex(
continue; continue;
} }
if( pConstraint->iColumn<SERIES_COLUMN_START ){ if( pConstraint->iColumn<SERIES_COLUMN_START ){
if( pConstraint->iColumn==SERIES_COLUMN_VALUE && pConstraint->usable ){ if( (pConstraint->iColumn==SERIES_COLUMN_VALUE ||
pConstraint->iColumn==SERIES_COLUMN_ROWID)
&& pConstraint->usable
){
switch( op ){ switch( op ){
case SQLITE_INDEX_CONSTRAINT_EQ: case SQLITE_INDEX_CONSTRAINT_EQ:
case SQLITE_INDEX_CONSTRAINT_IS: { case SQLITE_INDEX_CONSTRAINT_IS: {

121
deps/sqlite/sqlite3.c vendored
View File

@ -1,6 +1,6 @@
/****************************************************************************** /******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite ** This file is an amalgamation of many separate C source files from SQLite
** version 3.49.1. By combining all the individual C code files into this ** version 3.49.2. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a single translation ** single large file, the entire code can be compiled as a single translation
** unit. This allows many compilers to do optimizations that would not be ** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements ** possible if the files were compiled separately. Performance improvements
@ -18,7 +18,7 @@
** separate file. This file contains only code for the core SQLite library. ** separate file. This file contains only code for the core SQLite library.
** **
** The content in this amalgamation comes from Fossil check-in ** The content in this amalgamation comes from Fossil check-in
** 873d4e274b4988d260ba8354a9718324a1c2 with changes in files: ** 17144570b0d96ae63cd6f3edca39e27ebd74 with changes in files:
** **
** **
*/ */
@ -465,9 +465,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()]. ** [sqlite_version()] and [sqlite_source_id()].
*/ */
#define SQLITE_VERSION "3.49.1" #define SQLITE_VERSION "3.49.2"
#define SQLITE_VERSION_NUMBER 3049001 #define SQLITE_VERSION_NUMBER 3049002
#define SQLITE_SOURCE_ID "2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70" #define SQLITE_SOURCE_ID "2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1"
/* /*
** CAPI3REF: Run-Time Library Version Numbers ** CAPI3REF: Run-Time Library Version Numbers
@ -19064,6 +19064,7 @@ struct Index {
unsigned bLowQual:1; /* sqlite_stat1 says this is a low-quality index */ unsigned bLowQual:1; /* sqlite_stat1 says this is a low-quality index */
unsigned bNoQuery:1; /* Do not use this index to optimize queries */ unsigned bNoQuery:1; /* Do not use this index to optimize queries */
unsigned bAscKeyBug:1; /* True if the bba7b69f9849b5bf bug applies */ unsigned bAscKeyBug:1; /* True if the bba7b69f9849b5bf bug applies */
unsigned bIdxRowid:1; /* One or more of the index keys is the ROWID */
unsigned bHasVCol:1; /* Index references one or more VIRTUAL columns */ unsigned bHasVCol:1; /* Index references one or more VIRTUAL columns */
unsigned bHasExpr:1; /* Index contains an expression, either a literal unsigned bHasExpr:1; /* Index contains an expression, either a literal
** expression, or a reference to a VIRTUAL column */ ** expression, or a reference to a VIRTUAL column */
@ -97241,6 +97242,7 @@ case OP_MakeRecord: {
zHdr += sqlite3PutVarint(zHdr, serial_type); zHdr += sqlite3PutVarint(zHdr, serial_type);
if( pRec->n ){ if( pRec->n ){
assert( pRec->z!=0 ); assert( pRec->z!=0 );
assert( pRec->z!=(const char*)sqlite3CtypeMap );
memcpy(zPayload, pRec->z, pRec->n); memcpy(zPayload, pRec->z, pRec->n);
zPayload += pRec->n; zPayload += pRec->n;
} }
@ -115468,11 +115470,11 @@ SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int
assert( TK_ISNULL==OP_IsNull ); testcase( op==TK_ISNULL ); assert( TK_ISNULL==OP_IsNull ); testcase( op==TK_ISNULL );
assert( TK_NOTNULL==OP_NotNull ); testcase( op==TK_NOTNULL ); assert( TK_NOTNULL==OP_NotNull ); testcase( op==TK_NOTNULL );
r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1); r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
sqlite3VdbeTypeofColumn(v, r1); assert( regFree1==0 || regFree1==r1 );
if( regFree1 ) sqlite3VdbeTypeofColumn(v, r1);
sqlite3VdbeAddOp2(v, op, r1, dest); sqlite3VdbeAddOp2(v, op, r1, dest);
VdbeCoverageIf(v, op==TK_ISNULL); VdbeCoverageIf(v, op==TK_ISNULL);
VdbeCoverageIf(v, op==TK_NOTNULL); VdbeCoverageIf(v, op==TK_NOTNULL);
testcase( regFree1==0 );
break; break;
} }
case TK_BETWEEN: { case TK_BETWEEN: {
@ -115643,11 +115645,11 @@ SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int
case TK_ISNULL: case TK_ISNULL:
case TK_NOTNULL: { case TK_NOTNULL: {
r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1); r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
sqlite3VdbeTypeofColumn(v, r1); assert( regFree1==0 || regFree1==r1 );
if( regFree1 ) sqlite3VdbeTypeofColumn(v, r1);
sqlite3VdbeAddOp2(v, op, r1, dest); sqlite3VdbeAddOp2(v, op, r1, dest);
testcase( op==TK_ISNULL ); VdbeCoverageIf(v, op==TK_ISNULL); testcase( op==TK_ISNULL ); VdbeCoverageIf(v, op==TK_ISNULL);
testcase( op==TK_NOTNULL ); VdbeCoverageIf(v, op==TK_NOTNULL); testcase( op==TK_NOTNULL ); VdbeCoverageIf(v, op==TK_NOTNULL);
testcase( regFree1==0 );
break; break;
} }
case TK_BETWEEN: { case TK_BETWEEN: {
@ -126336,6 +126338,7 @@ SQLITE_PRIVATE void sqlite3CreateIndex(
assert( j<=0x7fff ); assert( j<=0x7fff );
if( j<0 ){ if( j<0 ){
j = pTab->iPKey; j = pTab->iPKey;
pIndex->bIdxRowid = 1;
}else{ }else{
if( pTab->aCol[j].notNull==0 ){ if( pTab->aCol[j].notNull==0 ){
pIndex->uniqNotNull = 0; pIndex->uniqNotNull = 0;
@ -139132,48 +139135,48 @@ static const char *const pragCName[] = {
/* 13 */ "pk", /* 13 */ "pk",
/* 14 */ "hidden", /* 14 */ "hidden",
/* table_info reuses 8 */ /* table_info reuses 8 */
/* 15 */ "schema", /* Used by: table_list */ /* 15 */ "name", /* Used by: function_list */
/* 16 */ "name", /* 16 */ "builtin",
/* 17 */ "type", /* 17 */ "type",
/* 18 */ "ncol", /* 18 */ "enc",
/* 19 */ "wr", /* 19 */ "narg",
/* 20 */ "strict", /* 20 */ "flags",
/* 21 */ "seqno", /* Used by: index_xinfo */ /* 21 */ "schema", /* Used by: table_list */
/* 22 */ "cid", /* 22 */ "name",
/* 23 */ "name", /* 23 */ "type",
/* 24 */ "desc", /* 24 */ "ncol",
/* 25 */ "coll", /* 25 */ "wr",
/* 26 */ "key", /* 26 */ "strict",
/* 27 */ "name", /* Used by: function_list */ /* 27 */ "seqno", /* Used by: index_xinfo */
/* 28 */ "builtin", /* 28 */ "cid",
/* 29 */ "type", /* 29 */ "name",
/* 30 */ "enc", /* 30 */ "desc",
/* 31 */ "narg", /* 31 */ "coll",
/* 32 */ "flags", /* 32 */ "key",
/* 33 */ "tbl", /* Used by: stats */ /* 33 */ "seq", /* Used by: index_list */
/* 34 */ "idx", /* 34 */ "name",
/* 35 */ "wdth", /* 35 */ "unique",
/* 36 */ "hght", /* 36 */ "origin",
/* 37 */ "flgs", /* 37 */ "partial",
/* 38 */ "seq", /* Used by: index_list */ /* 38 */ "tbl", /* Used by: stats */
/* 39 */ "name", /* 39 */ "idx",
/* 40 */ "unique", /* 40 */ "wdth",
/* 41 */ "origin", /* 41 */ "hght",
/* 42 */ "partial", /* 42 */ "flgs",
/* 43 */ "table", /* Used by: foreign_key_check */ /* 43 */ "table", /* Used by: foreign_key_check */
/* 44 */ "rowid", /* 44 */ "rowid",
/* 45 */ "parent", /* 45 */ "parent",
/* 46 */ "fkid", /* 46 */ "fkid",
/* index_info reuses 21 */ /* 47 */ "busy", /* Used by: wal_checkpoint */
/* 47 */ "seq", /* Used by: database_list */ /* 48 */ "log",
/* 48 */ "name", /* 49 */ "checkpointed",
/* 49 */ "file", /* 50 */ "seq", /* Used by: database_list */
/* 50 */ "busy", /* Used by: wal_checkpoint */ /* 51 */ "name",
/* 51 */ "log", /* 52 */ "file",
/* 52 */ "checkpointed", /* index_info reuses 27 */
/* collation_list reuses 38 */
/* 53 */ "database", /* Used by: lock_status */ /* 53 */ "database", /* Used by: lock_status */
/* 54 */ "status", /* 54 */ "status",
/* collation_list reuses 33 */
/* 55 */ "cache_size", /* Used by: default_cache_size */ /* 55 */ "cache_size", /* Used by: default_cache_size */
/* module_list pragma_list reuses 9 */ /* module_list pragma_list reuses 9 */
/* 56 */ "timeout", /* Used by: busy_timeout */ /* 56 */ "timeout", /* Used by: busy_timeout */
@ -139266,7 +139269,7 @@ static const PragmaName aPragmaName[] = {
{/* zName: */ "collation_list", {/* zName: */ "collation_list",
/* ePragTyp: */ PragTyp_COLLATION_LIST, /* ePragTyp: */ PragTyp_COLLATION_LIST,
/* ePragFlg: */ PragFlg_Result0, /* ePragFlg: */ PragFlg_Result0,
/* ColNames: */ 38, 2, /* ColNames: */ 33, 2,
/* iArg: */ 0 }, /* iArg: */ 0 },
#endif #endif
#if !defined(SQLITE_OMIT_COMPILEOPTION_DIAGS) #if !defined(SQLITE_OMIT_COMPILEOPTION_DIAGS)
@ -139301,7 +139304,7 @@ static const PragmaName aPragmaName[] = {
{/* zName: */ "database_list", {/* zName: */ "database_list",
/* ePragTyp: */ PragTyp_DATABASE_LIST, /* ePragTyp: */ PragTyp_DATABASE_LIST,
/* ePragFlg: */ PragFlg_Result0, /* ePragFlg: */ PragFlg_Result0,
/* ColNames: */ 47, 3, /* ColNames: */ 50, 3,
/* iArg: */ 0 }, /* iArg: */ 0 },
#endif #endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED) #if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED)
@ -139381,7 +139384,7 @@ static const PragmaName aPragmaName[] = {
{/* zName: */ "function_list", {/* zName: */ "function_list",
/* ePragTyp: */ PragTyp_FUNCTION_LIST, /* ePragTyp: */ PragTyp_FUNCTION_LIST,
/* ePragFlg: */ PragFlg_Result0, /* ePragFlg: */ PragFlg_Result0,
/* ColNames: */ 27, 6, /* ColNames: */ 15, 6,
/* iArg: */ 0 }, /* iArg: */ 0 },
#endif #endif
#endif #endif
@ -139410,17 +139413,17 @@ static const PragmaName aPragmaName[] = {
{/* zName: */ "index_info", {/* zName: */ "index_info",
/* ePragTyp: */ PragTyp_INDEX_INFO, /* ePragTyp: */ PragTyp_INDEX_INFO,
/* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt, /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
/* ColNames: */ 21, 3, /* ColNames: */ 27, 3,
/* iArg: */ 0 }, /* iArg: */ 0 },
{/* zName: */ "index_list", {/* zName: */ "index_list",
/* ePragTyp: */ PragTyp_INDEX_LIST, /* ePragTyp: */ PragTyp_INDEX_LIST,
/* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt, /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
/* ColNames: */ 38, 5, /* ColNames: */ 33, 5,
/* iArg: */ 0 }, /* iArg: */ 0 },
{/* zName: */ "index_xinfo", {/* zName: */ "index_xinfo",
/* ePragTyp: */ PragTyp_INDEX_INFO, /* ePragTyp: */ PragTyp_INDEX_INFO,
/* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt, /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
/* ColNames: */ 21, 6, /* ColNames: */ 27, 6,
/* iArg: */ 1 }, /* iArg: */ 1 },
#endif #endif
#if !defined(SQLITE_OMIT_INTEGRITY_CHECK) #if !defined(SQLITE_OMIT_INTEGRITY_CHECK)
@ -139599,7 +139602,7 @@ static const PragmaName aPragmaName[] = {
{/* zName: */ "stats", {/* zName: */ "stats",
/* ePragTyp: */ PragTyp_STATS, /* ePragTyp: */ PragTyp_STATS,
/* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq, /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,
/* ColNames: */ 33, 5, /* ColNames: */ 38, 5,
/* iArg: */ 0 }, /* iArg: */ 0 },
#endif #endif
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) #if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
@ -139618,7 +139621,7 @@ static const PragmaName aPragmaName[] = {
{/* zName: */ "table_list", {/* zName: */ "table_list",
/* ePragTyp: */ PragTyp_TABLE_LIST, /* ePragTyp: */ PragTyp_TABLE_LIST,
/* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1, /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1,
/* ColNames: */ 15, 6, /* ColNames: */ 21, 6,
/* iArg: */ 0 }, /* iArg: */ 0 },
{/* zName: */ "table_xinfo", {/* zName: */ "table_xinfo",
/* ePragTyp: */ PragTyp_TABLE_INFO, /* ePragTyp: */ PragTyp_TABLE_INFO,
@ -139695,7 +139698,7 @@ static const PragmaName aPragmaName[] = {
{/* zName: */ "wal_checkpoint", {/* zName: */ "wal_checkpoint",
/* ePragTyp: */ PragTyp_WAL_CHECKPOINT, /* ePragTyp: */ PragTyp_WAL_CHECKPOINT,
/* ePragFlg: */ PragFlg_NeedSchema, /* ePragFlg: */ PragFlg_NeedSchema,
/* ColNames: */ 50, 3, /* ColNames: */ 47, 3,
/* iArg: */ 0 }, /* iArg: */ 0 },
#endif #endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS) #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
@ -147073,6 +147076,7 @@ static int multiSelect(
multi_select_end: multi_select_end:
pDest->iSdst = dest.iSdst; pDest->iSdst = dest.iSdst;
pDest->nSdst = dest.nSdst; pDest->nSdst = dest.nSdst;
pDest->iSDParm2 = dest.iSDParm2;
if( pDelete ){ if( pDelete ){
sqlite3ParserAddCleanup(pParse, sqlite3SelectDeleteGeneric, pDelete); sqlite3ParserAddCleanup(pParse, sqlite3SelectDeleteGeneric, pDelete);
} }
@ -151027,6 +151031,7 @@ static void agginfoFree(sqlite3 *db, void *pArg){
** * There is no WHERE or GROUP BY or HAVING clauses on the subqueries ** * There is no WHERE or GROUP BY or HAVING clauses on the subqueries
** * The outer query is a simple count(*) with no WHERE clause or other ** * The outer query is a simple count(*) with no WHERE clause or other
** extraneous syntax. ** extraneous syntax.
** * None of the subqueries are DISTINCT (forumpost/a860f5fb2e 2025-03-10)
** **
** Return TRUE if the optimization is undertaken. ** Return TRUE if the optimization is undertaken.
*/ */
@ -151059,7 +151064,11 @@ static int countOfViewOptimization(Parse *pParse, Select *p){
if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */ if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */
if( pSub->pWhere ) return 0; /* No WHERE clause */ if( pSub->pWhere ) return 0; /* No WHERE clause */
if( pSub->pLimit ) return 0; /* No LIMIT clause */ if( pSub->pLimit ) return 0; /* No LIMIT clause */
if( pSub->selFlags & SF_Aggregate ) return 0; /* Not an aggregate */ if( pSub->selFlags & (SF_Aggregate|SF_Distinct) ){
testcase( pSub->selFlags & SF_Aggregate );
testcase( pSub->selFlags & SF_Distinct );
return 0; /* Not an aggregate nor DISTINCT */
}
assert( pSub->pHaving==0 ); /* Due to the previous */ assert( pSub->pHaving==0 ); /* Due to the previous */
pSub = pSub->pPrior; /* Repeat over compound */ pSub = pSub->pPrior; /* Repeat over compound */
}while( pSub ); }while( pSub );
@ -166881,7 +166890,7 @@ static int whereLoopAddBtreeIndex(
if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0
&& pNew->u.btree.nEq<pProbe->nColumn && pNew->u.btree.nEq<pProbe->nColumn
&& (pNew->u.btree.nEq<pProbe->nKeyCol || && (pNew->u.btree.nEq<pProbe->nKeyCol ||
pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY) (pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY && !pProbe->bIdxRowid))
){ ){
if( pNew->u.btree.nEq>3 ){ if( pNew->u.btree.nEq>3 ){
sqlite3ProgressCheck(pParse); sqlite3ProgressCheck(pParse);
@ -255874,7 +255883,7 @@ static void fts5SourceIdFunc(
){ ){
assert( nArg==0 ); assert( nArg==0 );
UNUSED_PARAM2(nArg, apUnused); UNUSED_PARAM2(nArg, apUnused);
sqlite3_result_text(pCtx, "fts5: 2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70", -1, SQLITE_TRANSIENT); sqlite3_result_text(pCtx, "fts5: 2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1", -1, SQLITE_TRANSIENT);
} }
/* /*

View File

@ -146,9 +146,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()]. ** [sqlite_version()] and [sqlite_source_id()].
*/ */
#define SQLITE_VERSION "3.49.1" #define SQLITE_VERSION "3.49.2"
#define SQLITE_VERSION_NUMBER 3049001 #define SQLITE_VERSION_NUMBER 3049002
#define SQLITE_SOURCE_ID "2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70" #define SQLITE_SOURCE_ID "2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1"
/* /*
** CAPI3REF: Run-Time Library Version Numbers ** CAPI3REF: Run-Time Library Version Numbers

View File

@ -1469,9 +1469,9 @@ static void _tf_ssb_rpc_checkpoint(tf_ssb_t* ssb)
sqlite3* db = tf_ssb_acquire_db_writer(ssb); sqlite3* db = tf_ssb_acquire_db_writer(ssb);
int log = 0; int log = 0;
int checkpointed = 0; int checkpointed = 0;
if (sqlite3_wal_checkpoint_v2(db, NULL, SQLITE_CHECKPOINT_TRUNCATE, &log, &checkpointed) == SQLITE_OK) if (sqlite3_wal_checkpoint_v2(db, NULL, SQLITE_CHECKPOINT_PASSIVE, &log, &checkpointed) == SQLITE_OK)
{ {
tf_printf("Checkpointed %d frames in %d ms. Log is now %d frames.\n", (int)((uv_hrtime() - checkpoint_start_ms) / 1000000LL), checkpointed, log); tf_printf("Checkpointed %d frames in %d ms. Log is now %d frames.\n", checkpointed, (int)((uv_hrtime() - checkpoint_start_ms) / 1000000LL), log);
} }
else else
{ {
@ -1541,7 +1541,7 @@ static void _tf_ssb_rpc_delete_blobs_work(tf_ssb_t* ssb, void* user_data)
static void _tf_ssb_rpc_delete_blobs_after_work(tf_ssb_t* ssb, int status, void* user_data) static void _tf_ssb_rpc_delete_blobs_after_work(tf_ssb_t* ssb, int status, void* user_data)
{ {
delete_t* delete = user_data; delete_t* delete = user_data;
_tf_ssb_rpc_start_delete_blobs(ssb, delete->deleted ? (int)delete->duration_ms : (15 * 60 * 1000)); _tf_ssb_rpc_start_delete_blobs(ssb, delete->deleted ? (int)delete->duration_ms : (5 * 60 * 1000));
tf_free(delete); tf_free(delete);
} }

View File

@ -1532,11 +1532,7 @@ static char* _subprocess_check_output(const char* command)
static bool _isspace(char c) static bool _isspace(char c)
{ {
return return c == ' ' || c == '\t' || c == '\r' || c == '\n';
c == ' ' ||
c == '\t' ||
c == '\r' ||
c == '\n';
} }
static char* _trim(char* p) static char* _trim(char* p)