From 9d2c15192c890a8876bcb9a2ef918756d03718b6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 19 Sep 2024 06:07:40 +0200 Subject: Adding upstream version 3.46.1. Signed-off-by: Daniel Baumann --- VERSION | 2 +- autoconf/tea/configure.ac | 2 +- configure | 18 +-- ext/consio/console_io.c | 5 - ext/expert/expert1.test | 7 ++ ext/expert/sqlite3expert.c | 20 +-- ext/fts5/fts5_expr.c | 7 +- ext/fts5/fts5_main.c | 29 +++-- ext/fts5/fts5_tokenize.c | 12 +- ext/fts5/test/fts5aux.test | 24 ++++ ext/fts5/test/fts5integrity.test | 27 +++++ ext/fts5/test/fts5secure8.test | 16 +++ ext/fts5/test/fts5tokenizer2.test | 20 +++ ext/fts5/test/fts5trigram.test | 5 +- ext/fts5/test/fts5trigram2.test | 3 + ext/recover/sqlite3recover.c | 2 +- ext/wasm/api/sqlite3-opfs-async-proxy.js | 187 +++++----------------------- ext/wasm/api/sqlite3-vfs-opfs.c-pp.js | 36 ++++-- manifest | 77 ++++++------ manifest.uuid | 2 +- src/alter.c | 2 +- src/build.c | 7 +- src/func.c | 2 + src/insert.c | 1 + src/parse.y | 6 +- src/resolve.c | 17 +-- src/shell.c.in | 13 +- src/sqliteInt.h | 2 +- src/vdbeaux.c | 6 +- src/where.c | 51 +++----- test/returning1.test | 13 ++ test/select7.test | 32 +++++ test/shell5.test | 12 ++ test/window1.test | 18 +++ www/c3ref/c_source_id.html | 6 +- www/capi3ref.html | 6 +- www/carray.html | 2 +- www/changes.html | 31 ++++- www/chronology.html | 6 +- www/cli.html | 23 ++-- www/compile.html | 26 ++-- www/cves.html | 4 +- www/doc_backlink_crossref.html | 69 +++++++++-- www/doc_keyword_crossref.html | 2 +- www/doc_pagelink_crossref.html | 6 +- www/doc_target_crossref.html | 6 +- www/fileformat.html | 46 +++---- www/fileformat2.html | 46 +++---- www/flextypegood.html | 8 +- www/floatingpoint.html | 2 +- www/fts5.html | 2 +- www/fullsql.html | 2 +- www/index.html | 4 +- www/json1.html | 2 +- www/keyword_index.html | 4 + www/lang_createtrigger.html | 2 +- www/lang_expr.html | 92 +++++++------- www/lang_select.html | 2 +- www/news.html | 8 +- www/opcode.html | 8 +- www/optoverview.html | 7 +- www/printf.html | 4 +- www/quickstart.html | 2 +- www/quirks.html | 43 ++++--- www/releaselog/3_44_0.html | 2 +- www/releaselog/3_44_1.html | 2 +- www/releaselog/3_44_2.html | 2 +- www/releaselog/3_46_1.html | 201 +++++++++++++++++++++++++++++++ www/releaselog/current.html | 36 +++++- www/rescode.html | 9 +- www/search.d/search.db | Bin 9916416 -> 9924608 bytes www/sessionintro.html | 4 +- www/toc.db | Bin 90112 -> 90112 bytes www/vtab.html | 8 +- www/wal.html | 14 +-- 75 files changed, 923 insertions(+), 509 deletions(-) create mode 100644 www/releaselog/3_46_1.html diff --git a/VERSION b/VERSION index 850ac8f..421931e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.46.0 +3.46.1 diff --git a/autoconf/tea/configure.ac b/autoconf/tea/configure.ac index f188f22..ea7eeda 100644 --- a/autoconf/tea/configure.ac +++ b/autoconf/tea/configure.ac @@ -19,7 +19,7 @@ dnl to configure the system for the local environment. # so that we create the export library with the dll. #----------------------------------------------------------------------- -AC_INIT([sqlite],[3.46.0]) +AC_INIT([sqlite],[3.46.1]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. diff --git a/configure b/configure index f6717f9..5ad0cca 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.46.0. +# Generated by GNU Autoconf 2.69 for sqlite 3.46.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -726,8 +726,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.46.0' -PACKAGE_STRING='sqlite 3.46.0' +PACKAGE_VERSION='3.46.1' +PACKAGE_STRING='sqlite 3.46.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1472,7 +1472,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.46.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.46.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1537,7 +1537,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.46.0:";; + short | recursive ) echo "Configuration of sqlite 3.46.1:";; esac cat <<\_ACEOF @@ -1668,7 +1668,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.46.0 +sqlite configure 3.46.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2087,7 +2087,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.46.0, which was +It was created by sqlite $as_me 3.46.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -12481,7 +12481,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.46.0, which was +This file was extended by sqlite $as_me 3.46.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12547,7 +12547,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.46.0 +sqlite config.status 3.46.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/ext/consio/console_io.c b/ext/consio/console_io.c index 3e2f556..3fa613b 100755 --- a/ext/consio/console_io.c +++ b/ext/consio/console_io.c @@ -53,11 +53,6 @@ # define CIO_WIN_WC_XLATE 0 /* Not exposing translation routines at all */ #endif -#if CIO_WIN_WC_XLATE -/* Character used to represent a known-incomplete UTF-8 char group (�) */ -static WCHAR cBadGroup = 0xfffd; -#endif - #if CIO_WIN_WC_XLATE static HANDLE handleOfFile(FILE *pf){ int fileDesc = _fileno(pf); diff --git a/ext/expert/expert1.test b/ext/expert/expert1.test index c456c30..72c4fd7 100644 --- a/ext/expert/expert1.test +++ b/ext/expert/expert1.test @@ -465,6 +465,13 @@ do_execsql_test 5.3 { t2 t2_idx_0001295b {100 20 5} } +do_catchsql_test 5.4 { + SELECT sqlite_expert_rem(123, 123); +} {1 {no such function: sqlite_expert_rem}} +do_catchsql_test 5.5 { + SELECT sqlite_expert_sample(); +} {1 {no such function: sqlite_expert_sample}} + if 0 { do_test expert1-6.0 { catchcmd :memory: { diff --git a/ext/expert/sqlite3expert.c b/ext/expert/sqlite3expert.c index 276c2cc..b59a597 100644 --- a/ext/expert/sqlite3expert.c +++ b/ext/expert/sqlite3expert.c @@ -626,7 +626,7 @@ static int expertFilter( pCsr->pData = 0; if( rc==SQLITE_OK ){ rc = idxPrintfPrepareStmt(pExpert->db, &pCsr->pData, &pVtab->base.zErrMsg, - "SELECT * FROM main.%Q WHERE sample()", pVtab->pTab->zName + "SELECT * FROM main.%Q WHERE sqlite_expert_sample()", pVtab->pTab->zName ); } @@ -1500,7 +1500,7 @@ struct IdxRemCtx { }; /* -** Implementation of scalar function rem(). +** Implementation of scalar function sqlite_expert_rem(). */ static void idxRemFunc( sqlite3_context *pCtx, @@ -1513,7 +1513,7 @@ static void idxRemFunc( assert( argc==2 ); iSlot = sqlite3_value_int(argv[0]); - assert( iSlot<=p->nSlot ); + assert( iSlotnSlot ); pSlot = &p->aSlot[iSlot]; switch( pSlot->eType ){ @@ -1624,7 +1624,8 @@ static int idxPopulateOneStat1( const char *zName = (const char*)sqlite3_column_text(pIndexXInfo, 0); const char *zColl = (const char*)sqlite3_column_text(pIndexXInfo, 1); zCols = idxAppendText(&rc, zCols, - "%sx.%Q IS rem(%d, x.%Q) COLLATE %s", zComma, zName, nCol, zName, zColl + "%sx.%Q IS sqlite_expert_rem(%d, x.%Q) COLLATE %s", + zComma, zName, nCol, zName, zColl ); zOrder = idxAppendText(&rc, zOrder, "%s%d", zComma, ++nCol); } @@ -1757,13 +1758,13 @@ static int idxPopulateStat1(sqlite3expert *p, char **pzErr){ if( rc==SQLITE_OK ){ sqlite3 *dbrem = (p->iSample==100 ? p->db : p->dbv); - rc = sqlite3_create_function( - dbrem, "rem", 2, SQLITE_UTF8, (void*)pCtx, idxRemFunc, 0, 0 + rc = sqlite3_create_function(dbrem, "sqlite_expert_rem", + 2, SQLITE_UTF8, (void*)pCtx, idxRemFunc, 0, 0 ); } if( rc==SQLITE_OK ){ - rc = sqlite3_create_function( - p->db, "sample", 0, SQLITE_UTF8, (void*)&samplectx, idxSampleFunc, 0, 0 + rc = sqlite3_create_function(p->db, "sqlite_expert_sample", + 0, SQLITE_UTF8, (void*)&samplectx, idxSampleFunc, 0, 0 ); } @@ -1815,6 +1816,9 @@ static int idxPopulateStat1(sqlite3expert *p, char **pzErr){ rc = sqlite3_exec(p->dbm, "ANALYZE sqlite_schema", 0, 0, 0); } + sqlite3_create_function(p->db, "sqlite_expert_rem", 2, SQLITE_UTF8, 0,0,0,0); + sqlite3_create_function(p->db, "sqlite_expert_sample", 0,SQLITE_UTF8,0,0,0,0); + sqlite3_exec(p->db, "DROP TABLE IF EXISTS temp."UNIQUE_TABLE_NAME,0,0,0); return rc; } diff --git a/ext/fts5/fts5_expr.c b/ext/fts5/fts5_expr.c index 05c1b59..960a4d4 100644 --- a/ext/fts5/fts5_expr.c +++ b/ext/fts5/fts5_expr.c @@ -324,7 +324,11 @@ int sqlite3Fts5ExprNew( } sqlite3_free(sParse.apPhrase); - *pzErr = sParse.zErr; + if( 0==*pzErr ){ + *pzErr = sParse.zErr; + }else{ + sqlite3_free(sParse.zErr); + } return sParse.rc; } @@ -2452,6 +2456,7 @@ Fts5ExprNode *sqlite3Fts5ParseImplicitAnd( assert( pRight->eType==FTS5_STRING || pRight->eType==FTS5_TERM || pRight->eType==FTS5_EOF + || (pRight->eType==FTS5_AND && pParse->bPhraseToAnd) ); if( pLeft->eType==FTS5_AND ){ diff --git a/ext/fts5/fts5_main.c b/ext/fts5/fts5_main.c index f609f7f..837ea40 100644 --- a/ext/fts5/fts5_main.c +++ b/ext/fts5/fts5_main.c @@ -1700,6 +1700,7 @@ static int fts5UpdateMethod( rc = SQLITE_ERROR; }else{ rc = fts5SpecialDelete(pTab, apVal); + bUpdateOrDelete = 1; } }else{ rc = fts5SpecialInsert(pTab, z, apVal[2 + pConfig->nCol + 1]); @@ -2874,14 +2875,16 @@ int sqlite3Fts5GetTokenizer( if( pMod==0 ){ assert( nArg>0 ); rc = SQLITE_ERROR; - *pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]); + if( pzErr ) *pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]); }else{ rc = pMod->x.xCreate( pMod->pUserData, (azArg?&azArg[1]:0), (nArg?nArg-1:0), &pConfig->pTok ); pConfig->pTokApi = &pMod->x; if( rc!=SQLITE_OK ){ - if( pzErr ) *pzErr = sqlite3_mprintf("error in tokenizer constructor"); + if( pzErr && rc!=SQLITE_NOMEM ){ + *pzErr = sqlite3_mprintf("error in tokenizer constructor"); + } }else{ pConfig->ePattern = sqlite3Fts5TokenizerPattern( pMod->x.xCreate, pConfig->pTok @@ -2975,17 +2978,23 @@ static int fts5IntegrityMethod( assert( pzErr!=0 && *pzErr==0 ); UNUSED_PARAM(isQuick); + assert( pTab->p.pConfig->pzErrmsg==0 ); + pTab->p.pConfig->pzErrmsg = pzErr; rc = sqlite3Fts5StorageIntegrity(pTab->pStorage, 0); - if( (rc&0xff)==SQLITE_CORRUPT ){ - *pzErr = sqlite3_mprintf("malformed inverted index for FTS5 table %s.%s", - zSchema, zTabname); - rc = (*pzErr) ? SQLITE_OK : SQLITE_NOMEM; - }else if( rc!=SQLITE_OK ){ - *pzErr = sqlite3_mprintf("unable to validate the inverted index for" - " FTS5 table %s.%s: %s", - zSchema, zTabname, sqlite3_errstr(rc)); + if( *pzErr==0 && rc!=SQLITE_OK ){ + if( (rc&0xff)==SQLITE_CORRUPT ){ + *pzErr = sqlite3_mprintf("malformed inverted index for FTS5 table %s.%s", + zSchema, zTabname); + rc = (*pzErr) ? SQLITE_OK : SQLITE_NOMEM; + }else{ + *pzErr = sqlite3_mprintf("unable to validate the inverted index for" + " FTS5 table %s.%s: %s", + zSchema, zTabname, sqlite3_errstr(rc)); + } } + sqlite3Fts5IndexCloseReader(pTab->p.pIndex); + pTab->p.pConfig->pzErrmsg = 0; return rc; } diff --git a/ext/fts5/fts5_tokenize.c b/ext/fts5/fts5_tokenize.c index f120561..2200e78 100644 --- a/ext/fts5/fts5_tokenize.c +++ b/ext/fts5/fts5_tokenize.c @@ -79,7 +79,7 @@ static int fts5AsciiCreate( int i; memset(p, 0, sizeof(AsciiTokenizer)); memcpy(p->aTokenChar, aAsciiTokenChar, sizeof(aAsciiTokenChar)); - for(i=0; rc==SQLITE_OK && ibFold = 1; pNew->iFoldParam = 0; - for(i=0; rc==SQLITE_OK && iiFoldParam!=0 && pNew->bFold==0 ){ rc = SQLITE_ERROR; diff --git a/ext/fts5/test/fts5aux.test b/ext/fts5/test/fts5aux.test index 5569f48..7963006 100644 --- a/ext/fts5/test/fts5aux.test +++ b/ext/fts5/test/fts5aux.test @@ -377,4 +377,28 @@ do_catchsql_test 12.3.3 { SELECT fts5_collist(t1, 1) FROM t1('one AND two'); } {0 1} +#------------------------------------------------------------------------- +reset_db +do_execsql_test 13.1 { + CREATE VIRTUAL TABLE t1 USING fts5(a, tokenize=ascii); + INSERT INTO t1 VALUES('a b c'), ('d e f'); + PRAGMA integrity_check; +} {ok} + +do_catchsql_test 13.2 { + SELECT highlight(t1, 0, '[', ']') FROM t1 +} {0 {{a b c} {d e f}}} + +do_execsql_test 13.3 { + PRAGMA writable_schema = 1; + UPDATE sqlite_schema SET sql = 'CREATE VIRTUAL TABLE t1 USING fts5(a, tokenize=blah)' + WHERE name = 't1'; +} + +db close +sqlite3 db test.db +do_catchsql_test 13.4 { + SELECT highlight(t1, 0, '[', ']') FROM t1 +} {1 {no such tokenizer: blah}} + finish_test diff --git a/ext/fts5/test/fts5integrity.test b/ext/fts5/test/fts5integrity.test index 1bb3675..5ed659b 100644 --- a/ext/fts5/test/fts5integrity.test +++ b/ext/fts5/test/fts5integrity.test @@ -380,5 +380,32 @@ do_execsql_test 12.3 { } {ok} +#------------------------------------------------------------------- +reset_db +do_execsql_test 13.1 { + CREATE VIRTUAL TABLE t1 USING fts5(a, tokenize=ascii); + INSERT INTO t1 VALUES('a b c'), ('d e f'); + PRAGMA integrity_check; +} {ok} + +db close +sqlite3 db test.db +do_catchsql_test 13.2 { + PRAGMA integrity_check; +} {0 ok} + +do_execsql_test 13.3 { + PRAGMA writable_schema = 1; + UPDATE sqlite_schema SET sql = 'CREATE VIRTUAL TABLE t1 USING fts5(a, tokenize=blah)' + WHERE name = 't1'; +} + +db close +sqlite3 db test.db +breakpoint +do_catchsql_test 13.4 { + PRAGMA integrity_check; +} {1 {no such tokenizer: blah}} + finish_test diff --git a/ext/fts5/test/fts5secure8.test b/ext/fts5/test/fts5secure8.test index 8ceb963..0216bb6 100644 --- a/ext/fts5/test/fts5secure8.test +++ b/ext/fts5/test/fts5secure8.test @@ -42,6 +42,22 @@ do_execsql_test 1.2 { PRAGMA integrity_check; } {ok} +do_execsql_test 2.0 { + CREATE VIRTUAL TABLE xyz USING fts5 ( + name, + content='' + ); + + INSERT INTO xyz(xyz, rank) VALUES('secure-delete', 1); + INSERT INTO xyz (rowid, name) VALUES(1, 'A'); + INSERT INTO xyz (rowid, name) VALUES(2, 'A'); + INSERT INTO xyz(xyz, rowid, name) VALUES('delete', 2, 'A'); +} + +do_execsql_test 2.1 { + pragma quick_check; +} {ok} + diff --git a/ext/fts5/test/fts5tokenizer2.test b/ext/fts5/test/fts5tokenizer2.test index bdabd53..52b3032 100644 --- a/ext/fts5/test/fts5tokenizer2.test +++ b/ext/fts5/test/fts5tokenizer2.test @@ -85,5 +85,25 @@ do_execsql_test 1.7 { SELECT highlight(t1, 0, '>', '<') FROM t1('BB mess'); } {AAdont>BBmess<} +# 2024-08-06 https://sqlite.org/forum/forumpost/171bcc2bcd +# Error handling of tokenize= arguments. +# +foreach {n tkz} { + 1 {ascii none} + 2 {unicode61 none} + 3 {porter none} + 4 {trigram none} + 5 {ascii none 0} + 6 {unicode61 none 0} + 7 {porter none 0} + 8 {trigram none 0} +} { + db eval {DROP TABLE IF EXISTS t2;} + do_catchsql_test 2.$n " + DROP TABLE IF EXISTS t2; + CREATE VIRTUAL TABLE t2 USING fts5(a,b,c,tokenize='$tkz'); + " {1 {error in tokenizer constructor}} +} + finish_test diff --git a/ext/fts5/test/fts5trigram.test b/ext/fts5/test/fts5trigram.test index 351c059..7526866 100644 --- a/ext/fts5/test/fts5trigram.test +++ b/ext/fts5/test/fts5trigram.test @@ -69,6 +69,9 @@ do_execsql_test 2.0 { INSERT INTO t1 VALUES('abcdefghijklm'); INSERT INTO t1 VALUES('กรุงเทพมหานคร'); } +do_catchsql_test 2.0.1 { + CREATE VIRTUAL TABLE t2 USING fts5(z, tokenize='trigram case_sensitive'); +} {1 {error in tokenizer constructor}} foreach {tn s res} { 1 abc "(abc)defghijklm" @@ -206,7 +209,7 @@ do_execsql_test 7.0 { (20, "жираф.png"), (30, "cat.png"), (40, "кот.png"), - (50, "misic-🎵-.mp3"); + (50, "misic-🎵-.mp3"); } do_execsql_test 7.1 { SELECT rowid FROM f WHERE +filename GLOB '*ир*'; diff --git a/ext/fts5/test/fts5trigram2.test b/ext/fts5/test/fts5trigram2.test index f5beae5..395d899 100644 --- a/ext/fts5/test/fts5trigram2.test +++ b/ext/fts5/test/fts5trigram2.test @@ -21,6 +21,9 @@ do_execsql_test 1.0 " INSERT INTO t1 VALUES('abc\u0303defghijklm'); INSERT INTO t1 VALUES('a\u0303b\u0303c\u0303defghijklm'); " +do_catchsql_test 1.0.1 { + CREATE VIRTUAL TABLE t2 USING fts5(z, tokenize='trigram remove_diacritics'); +} {1 {error in tokenizer constructor}} do_execsql_test 1.1 { SELECT highlight(t1, 0, '(', ')') FROM t1('abc'); diff --git a/ext/recover/sqlite3recover.c b/ext/recover/sqlite3recover.c index 1d858c0..afa1ae8 100644 --- a/ext/recover/sqlite3recover.c +++ b/ext/recover/sqlite3recover.c @@ -363,8 +363,8 @@ static int recoverError( va_start(ap, zFmt); if( zFmt ){ z = sqlite3_vmprintf(zFmt, ap); - va_end(ap); } + va_end(ap); sqlite3_free(p->zErrMsg); p->zErrMsg = z; p->errCode = errCode; diff --git a/ext/wasm/api/sqlite3-opfs-async-proxy.js b/ext/wasm/api/sqlite3-opfs-async-proxy.js index e671094..3e2b20f 100644 --- a/ext/wasm/api/sqlite3-opfs-async-proxy.js +++ b/ext/wasm/api/sqlite3-opfs-async-proxy.js @@ -87,35 +87,6 @@ const installAsyncProxy = function(){ const log = (...args)=>logImpl(2, ...args); const warn = (...args)=>logImpl(1, ...args); const error = (...args)=>logImpl(0, ...args); - const metrics = Object.create(null); - metrics.reset = ()=>{ - let k; - const r = (m)=>(m.count = m.time = m.wait = 0); - for(k in state.opIds){ - r(metrics[k] = Object.create(null)); - } - let s = metrics.s11n = Object.create(null); - s = s.serialize = Object.create(null); - s.count = s.time = 0; - s = metrics.s11n.deserialize = Object.create(null); - s.count = s.time = 0; - }; - metrics.dump = ()=>{ - let k, n = 0, t = 0, w = 0; - for(k in state.opIds){ - const m = metrics[k]; - n += m.count; - t += m.time; - w += m.wait; - m.avgTime = (m.count && m.time) ? (m.time / m.count) : 0; - } - console.log(globalThis?.location?.href, - "metrics for",globalThis?.location?.href,":\n", - metrics, - "\nTotal of",n,"op(s) for",t,"ms", - "approx",w,"ms spent waiting on OPFS APIs."); - console.log("Serialization metrics:",metrics.s11n); - }; /** __openFiles is a map of sqlite3_file pointers (integers) to @@ -265,23 +236,34 @@ const installAsyncProxy = function(){ this.name = 'GetSyncHandleError'; } }; + + /** + Attempts to find a suitable SQLITE_xyz result code for Error + object e. Returns either such a translation or rc if if it does + not know how to translate the exception. + */ GetSyncHandleError.convertRc = (e,rc)=>{ - if(1){ - return ( - e instanceof GetSyncHandleError - && ((e.cause.name==='NoModificationAllowedError') - /* Inconsistent exception.name from Chrome/ium with the - same exception.message text: */ - || (e.cause.name==='DOMException' - && 0===e.cause.message.indexOf('Access Handles cannot'))) - ) ? ( - /*console.warn("SQLITE_BUSY",e),*/ - state.sq3Codes.SQLITE_BUSY - ) : rc; - }else{ - return rc; + if( e instanceof GetSyncHandleError ){ + if( e.cause.name==='NoModificationAllowedError' + /* Inconsistent exception.name from Chrome/ium with the + same exception.message text: */ + || (e.cause.name==='DOMException' + && 0===e.cause.message.indexOf('Access Handles cannot')) ){ + return state.sq3Codes.SQLITE_BUSY; + }else if( 'NotFoundError'===e.cause.name ){ + /** + Maintenance reminder: SQLITE_NOTFOUND, though it looks like + a good match, has different semantics than NotFoundError + and is not suitable here. + */ + return state.sq3Codes.SQLITE_CANTOPEN; + } + }else if( 'NotFoundError'===e?.name ){ + return state.sq3Codes.SQLITE_CANTOPEN; } - } + return rc; + }; + /** Returns the sync access handle associated with the given file handle object (which must be a valid handle object, as created by @@ -347,37 +329,6 @@ const installAsyncProxy = function(){ if(fh.readOnly) toss(opName+"(): File is read-only: "+fh.filenameAbs); }; - /** - We track 2 different timers: the "metrics" timer records how much - time we spend performing work. The "wait" timer records how much - time we spend waiting on the underlying OPFS timer. See the calls - to mTimeStart(), mTimeEnd(), wTimeStart(), and wTimeEnd() - throughout this file to see how they're used. - */ - const __mTimer = Object.create(null); - __mTimer.op = undefined; - __mTimer.start = undefined; - const mTimeStart = (op)=>{ - __mTimer.start = performance.now(); - __mTimer.op = op; - //metrics[op] || toss("Maintenance required: missing metrics for",op); - ++metrics[op].count; - }; - const mTimeEnd = ()=>( - metrics[__mTimer.op].time += performance.now() - __mTimer.start - ); - const __wTimer = Object.create(null); - __wTimer.op = undefined; - __wTimer.start = undefined; - const wTimeStart = (op)=>{ - __wTimer.start = performance.now(); - __wTimer.op = op; - //metrics[op] || toss("Maintenance required: missing metrics for",op); - }; - const wTimeEnd = ()=>( - metrics[__wTimer.op].wait += performance.now() - __wTimer.start - ); - /** Gets set to true by the 'opfs-async-shutdown' command to quit the wait loop. This is only intended for debugging purposes: we cannot @@ -388,37 +339,24 @@ const installAsyncProxy = function(){ /** Asynchronous wrappers for sqlite3_vfs and sqlite3_io_methods - methods, as well as helpers like mkdir(). Maintenance reminder: - members are in alphabetical order to simplify finding them. + methods, as well as helpers like mkdir(). */ const vfsAsyncImpls = { - 'opfs-async-metrics': async ()=>{ - mTimeStart('opfs-async-metrics'); - metrics.dump(); - storeAndNotify('opfs-async-metrics', 0); - mTimeEnd(); - }, 'opfs-async-shutdown': async ()=>{ flagAsyncShutdown = true; storeAndNotify('opfs-async-shutdown', 0); }, mkdir: async (dirname)=>{ - mTimeStart('mkdir'); let rc = 0; - wTimeStart('mkdir'); try { await getDirForFilename(dirname+"/filepart", true); }catch(e){ state.s11n.storeException(2,e); rc = state.sq3Codes.SQLITE_IOERR; - }finally{ - wTimeEnd(); } storeAndNotify('mkdir', rc); - mTimeEnd(); }, xAccess: async (filename)=>{ - mTimeStart('xAccess'); /* OPFS cannot support the full range of xAccess() queries sqlite3 calls for. We can essentially just tell if the file is accessible, but if it is then it's automatically writable @@ -431,26 +369,20 @@ const installAsyncProxy = function(){ accessible, non-0 means not accessible. */ let rc = 0; - wTimeStart('xAccess'); try{ const [dh, fn] = await getDirForFilename(filename); await dh.getFileHandle(fn); }catch(e){ state.s11n.storeException(2,e); rc = state.sq3Codes.SQLITE_IOERR; - }finally{ - wTimeEnd(); } storeAndNotify('xAccess', rc); - mTimeEnd(); }, xClose: async function(fid/*sqlite3_file pointer*/){ const opName = 'xClose'; - mTimeStart(opName); __implicitLocks.delete(fid); const fh = __openFiles[fid]; let rc = 0; - wTimeStart(opName); if(fh){ delete __openFiles[fid]; await closeSyncHandle(fh); @@ -462,15 +394,11 @@ const installAsyncProxy = function(){ state.s11n.serialize(); rc = state.sq3Codes.SQLITE_NOTFOUND; } - wTimeEnd(); storeAndNotify(opName, rc); - mTimeEnd(); }, xDelete: async function(...args){ - mTimeStart('xDelete'); const rc = await vfsAsyncImpls.xDeleteNoWait(...args); storeAndNotify('xDelete', rc); - mTimeEnd(); }, xDeleteNoWait: async function(filename, syncDir = 0, recursive = false){ /* The syncDir flag is, for purposes of the VFS API's semantics, @@ -486,7 +414,6 @@ const installAsyncProxy = function(){ is false. */ let rc = 0; - wTimeStart('xDelete'); try { while(filename){ const [hDir, filenamePart] = await getDirForFilename(filename, false); @@ -502,14 +429,11 @@ const installAsyncProxy = function(){ state.s11n.storeException(2,e); rc = state.sq3Codes.SQLITE_IOERR_DELETE; } - wTimeEnd(); return rc; }, xFileSize: async function(fid/*sqlite3_file pointer*/){ - mTimeStart('xFileSize'); const fh = __openFiles[fid]; let rc = 0; - wTimeStart('xFileSize'); try{ const sz = await (await getSyncHandle(fh,'xFileSize')).getSize(); state.s11n.serialize(Number(sz)); @@ -518,19 +442,15 @@ const installAsyncProxy = function(){ rc = GetSyncHandleError.convertRc(e,state.sq3Codes.SQLITE_IOERR); } await releaseImplicitLock(fh); - wTimeEnd(); storeAndNotify('xFileSize', rc); - mTimeEnd(); }, xLock: async function(fid/*sqlite3_file pointer*/, lockType/*SQLITE_LOCK_...*/){ - mTimeStart('xLock'); const fh = __openFiles[fid]; let rc = 0; const oldLockType = fh.xLock; fh.xLock = lockType; if( !fh.syncHandle ){ - wTimeStart('xLock'); try { await getSyncHandle(fh,'xLock'); __implicitLocks.delete(fid); @@ -539,18 +459,14 @@ const installAsyncProxy = function(){ rc = GetSyncHandleError.convertRc(e,state.sq3Codes.SQLITE_IOERR_LOCK); fh.xLock = oldLockType; } - wTimeEnd(); } storeAndNotify('xLock',rc); - mTimeEnd(); }, xOpen: async function(fid/*sqlite3_file pointer*/, filename, flags/*SQLITE_OPEN_...*/, opfsFlags/*OPFS_...*/){ const opName = 'xOpen'; - mTimeStart(opName); const create = (state.sq3Codes.SQLITE_OPEN_CREATE & flags); - wTimeStart('xOpen'); try{ let hDir, filenamePart; try { @@ -558,8 +474,6 @@ const installAsyncProxy = function(){ }catch(e){ state.s11n.storeException(1,e); storeAndNotify(opName, state.sq3Codes.SQLITE_NOTFOUND); - mTimeEnd(); - wTimeEnd(); return; } if( state.opfsFlags.OPFS_UNLINK_BEFORE_OPEN & opfsFlags ){ @@ -571,7 +485,6 @@ const installAsyncProxy = function(){ } } const hFile = await hDir.getFileHandle(filenamePart, {create}); - wTimeEnd(); const fh = Object.assign(Object.create(null),{ fid: fid, filenameAbs: filename, @@ -586,76 +499,50 @@ const installAsyncProxy = function(){ fh.releaseImplicitLocks = (opfsFlags & state.opfsFlags.OPFS_UNLOCK_ASAP) || state.opfsFlags.defaultUnlockAsap; - if(0 /* this block is modelled after something wa-sqlite - does but it leads to immediate contention on journal files. - Update: this approach reportedly only works for DELETE journal - mode. */ - && (0===(flags & state.sq3Codes.SQLITE_OPEN_MAIN_DB))){ - /* sqlite does not lock these files, so go ahead and grab an OPFS - lock. */ - fh.xLock = "xOpen"/* Truthy value to keep entry from getting - flagged as auto-locked. String value so - that we can easily distinguish is later - if needed. */; - await getSyncHandle(fh,'xOpen'); - } __openFiles[fid] = fh; storeAndNotify(opName, 0); }catch(e){ - wTimeEnd(); error(opName,e); state.s11n.storeException(1,e); storeAndNotify(opName, state.sq3Codes.SQLITE_IOERR); } - mTimeEnd(); }, xRead: async function(fid/*sqlite3_file pointer*/,n,offset64){ - mTimeStart('xRead'); let rc = 0, nRead; const fh = __openFiles[fid]; try{ - wTimeStart('xRead'); nRead = (await getSyncHandle(fh,'xRead')).read( fh.sabView.subarray(0, n), {at: Number(offset64)} ); - wTimeEnd(); if(nRead < n){/* Zero-fill remaining bytes */ fh.sabView.fill(0, nRead, n); rc = state.sq3Codes.SQLITE_IOERR_SHORT_READ; } }catch(e){ - if(undefined===nRead) wTimeEnd(); error("xRead() failed",e,fh); state.s11n.storeException(1,e); rc = GetSyncHandleError.convertRc(e,state.sq3Codes.SQLITE_IOERR_READ); } await releaseImplicitLock(fh); storeAndNotify('xRead',rc); - mTimeEnd(); }, xSync: async function(fid/*sqlite3_file pointer*/,flags/*ignored*/){ - mTimeStart('xSync'); const fh = __openFiles[fid]; let rc = 0; if(!fh.readOnly && fh.syncHandle){ try { - wTimeStart('xSync'); await fh.syncHandle.flush(); }catch(e){ state.s11n.storeException(2,e); rc = state.sq3Codes.SQLITE_IOERR_FSYNC; } - wTimeEnd(); } storeAndNotify('xSync',rc); - mTimeEnd(); }, xTruncate: async function(fid/*sqlite3_file pointer*/,size){ - mTimeStart('xTruncate'); let rc = 0; const fh = __openFiles[fid]; - wTimeStart('xTruncate'); try{ affirmNotRO('xTruncate', fh); await (await getSyncHandle(fh,'xTruncate')).truncate(size); @@ -665,33 +552,25 @@ const installAsyncProxy = function(){ rc = GetSyncHandleError.convertRc(e,state.sq3Codes.SQLITE_IOERR_TRUNCATE); } await releaseImplicitLock(fh); - wTimeEnd(); storeAndNotify('xTruncate',rc); - mTimeEnd(); }, xUnlock: async function(fid/*sqlite3_file pointer*/, lockType/*SQLITE_LOCK_...*/){ - mTimeStart('xUnlock'); let rc = 0; const fh = __openFiles[fid]; if( state.sq3Codes.SQLITE_LOCK_NONE===lockType && fh.syncHandle ){ - wTimeStart('xUnlock'); try { await closeSyncHandle(fh) } catch(e){ state.s11n.storeException(1,e); rc = state.sq3Codes.SQLITE_IOERR_UNLOCK; } - wTimeEnd(); } storeAndNotify('xUnlock',rc); - mTimeEnd(); }, xWrite: async function(fid/*sqlite3_file pointer*/,n,offset64){ - mTimeStart('xWrite'); let rc; const fh = __openFiles[fid]; - wTimeStart('xWrite'); try{ affirmNotRO('xWrite', fh); rc = ( @@ -705,9 +584,7 @@ const installAsyncProxy = function(){ rc = GetSyncHandleError.convertRc(e,state.sq3Codes.SQLITE_IOERR_WRITE); } await releaseImplicitLock(fh); - wTimeEnd(); storeAndNotify('xWrite',rc); - mTimeEnd(); } }/*vfsAsyncImpls*/; @@ -741,8 +618,6 @@ const installAsyncProxy = function(){ } }; state.s11n.deserialize = function(clear=false){ - ++metrics.s11n.deserialize.count; - const t = performance.now(); const argc = viewU8[0]; const rc = argc ? [] : null; if(argc){ @@ -767,12 +642,9 @@ const installAsyncProxy = function(){ } if(clear) viewU8[0] = 0; //log("deserialize:",argc, rc); - metrics.s11n.deserialize.time += performance.now() - t; return rc; }; state.s11n.serialize = function(...args){ - const t = performance.now(); - ++metrics.s11n.serialize.count; if(args.length){ //log("serialize():",args); const typeIds = []; @@ -803,7 +675,6 @@ const installAsyncProxy = function(){ }else{ viewU8[0] = 0; } - metrics.s11n.serialize.time += performance.now() - t; }; state.s11n.storeException = state.asyncS11nExceptions @@ -885,7 +756,6 @@ const installAsyncProxy = function(){ } }); initS11n(); - metrics.reset(); log("init state",state); wPost('opfs-async-inited'); waitLoop(); @@ -898,9 +768,6 @@ const installAsyncProxy = function(){ waitLoop(); } break; - case 'opfs-async-metrics': - metrics.dump(); - break; } }; wPost('opfs-async-loaded'); diff --git a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js index 4c654c3..5b74e78 100644 --- a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js +++ b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js @@ -392,6 +392,7 @@ const installOpfsVfs = function callee(options){ 'SQLITE_ACCESS_EXISTS', 'SQLITE_ACCESS_READWRITE', 'SQLITE_BUSY', + 'SQLITE_CANTOPEN', 'SQLITE_ERROR', 'SQLITE_IOERR', 'SQLITE_IOERR_ACCESS', @@ -444,7 +445,7 @@ const installOpfsVfs = function callee(options){ OPFS_UNLINK_BEFORE_OPEN: 0x02, /** If true, any async routine which implicitly acquires a sync - access handle (i.e. an OPFS lock) will release that locks at + access handle (i.e. an OPFS lock) will release that lock at the end of the call which acquires it. If false, such "autolocks" are not released until the VFS is idle for some brief amount of time. @@ -471,9 +472,22 @@ const installOpfsVfs = function callee(options){ Atomics.notify(state.sabOPView, state.opIds.whichOp) /* async thread will take over here */; const t = performance.now(); - Atomics.wait(state.sabOPView, state.opIds.rc, -1) - /* When this wait() call returns, the async half will have - completed the operation and reported its results. */; + while('not-equal'!==Atomics.wait(state.sabOPView, state.opIds.rc, -1)){ + /* + The reason for this loop is buried in the details of a long + discussion at: + + https://github.com/sqlite/sqlite-wasm/issues/12 + + Summary: in at least one browser flavor, under high loads, + the wait()/notify() pairings can get out of sync. Calling + wait() here until it returns 'not-equal' gets them back in + sync. + */ + } + /* When the above wait() call returns 'not-equal', the async + half will have completed the operation and reported its results + in the state.opIds.rc slot of the SAB. */ const rc = Atomics.load(state.sabOPView, state.opIds.rc); metrics[op].wait += performance.now() - t; if(rc && state.asyncS11nExceptions){ @@ -720,9 +734,18 @@ const installOpfsVfs = function callee(options){ involve an inherent race condition. For the time being, pending a better solution, we simply report whether the given pFile is open. + + Update 2024-06-12: based on forum discussions, this + function now always sets pOut to 0 (false): + + https://sqlite.org/forum/forumpost/a2f573b00cda1372 */ - const f = __openFiles[pFile]; - wasm.poke(pOut, f.lockType ? 1 : 0, 'i32'); + if(1){ + wasm.poke(pOut, 0, 'i32'); + }else{ + const f = __openFiles[pFile]; + wasm.poke(pOut, f.lockType ? 1 : 0, 'i32'); + } return 0; }, xClose: function(pFile){ @@ -738,7 +761,6 @@ const installOpfsVfs = function callee(options){ return rc; }, xDeviceCharacteristics: function(pFile){ - //debug("xDeviceCharacteristics(",pFile,")"); return capi.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN; }, xFileControl: function(pFile, opId, pArg){ diff --git a/manifest b/manifest index 430e219..a83c5c0 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Version\s3.46.0 -D 2024-05-23T13:25:27.566 +C Version\s3.46.1 +D 2024-08-13T09:16:08.704 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -7,7 +7,7 @@ F Makefile.in 993a7874e3d3721df61846f03dda4a9ef7490da11953ae36ba1bb0c0346eaf4a F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 F Makefile.msc e64a52619310d3067f6c38f56eedd15918a82dade70954197d6da486ad99d7f4 F README.md 6358805260a03ebead84e168bbf3740ddf3f683b477e478567186aa7afb490d3 -F VERSION c84541c6a9e8426462176fbb1f9ecb5cfd7d1bb56228053ff7eeba8841673eb6 +F VERSION 01b0b94ee03b29c27cb72ef03c460cd9476dee97b0cf8cf74b17a201e199820a F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5 F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d87031 @@ -24,7 +24,7 @@ F autoconf/configure.ac ec7fa914c5e74ff212fe879f9bb6918e1234497e05facfb641f30c4d F autoconf/tea/Makefile.in 106a96f2f745d41a0f6193f1de98d7355830b65d45032c18cd7c90295ec24196 F autoconf/tea/README 3e9a3c060f29a44344ab50aec506f4db903fb873 F autoconf/tea/aclocal.m4 52c47aac44ce0ddb1f918b6993e8beb8eee88f43 -F autoconf/tea/configure.ac 9e74135563a901d9b1a019bad1c9d73a6659fa32325f6a565bef72bfb0ec7297 +F autoconf/tea/configure.ac 629148599fb2c29003b34e72dd161473b5fe23b6f26a2281200e9581daaede95 F autoconf/tea/doc/sqlite3.n e1fe45d4f5286ee3d0ccc877aca2a0def488e9bb F autoconf/tea/license.terms 13bd403c9610fd2b76ece0ab50c4c5eda933d523 F autoconf/tea/pkgIndex.tcl.in b9eb6dd37f64e08e637d576b3c83259814b9cddd78bec4af2e5abfc6c5c750ce @@ -35,7 +35,7 @@ F autoconf/tea/win/nmakehlp.c b01f822eabbe1ed2b64e70882d97d48402b42d2689a1ea0034 F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63 F config.guess 883205ddf25b46f10c181818bf42c09da9888884af96f79e1719264345053bd6 F config.sub c2d0260f17f3e4bc0b6808fccf1b291cb5e9126c14fc5890efc77b9fd0175559 -F configure 40f7af9ed5ca0d44a4b9bc7ad34f1ee4867bb4eeb19e75036be6bed66193a498 x +F configure 1728380292e4153caf04870b0734c771b9cdc73be655181618f7b8253f2d9d5c x F configure.ac f25bd7843120f2c2b8bc9db5a92b0502bbdd28e68907415c3d42fc8e57c657b9 F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd @@ -53,12 +53,12 @@ F ext/README.md fd5f78013b0a2bc6f0067afb19e6ad040e89a10179b4f6f03eee58fac5f169bd F ext/async/README.txt e12275968f6fde133a80e04387d0e839b0c51f91 F ext/async/sqlite3async.c 6f247666b495c477628dd19364d279c78ea48cd90c72d9f9b98ad1aff3294f94 F ext/async/sqlite3async.h 46b47c79357b97ad85d20d2795942c0020dc20c532114a49808287f04aa5309a -F ext/consio/console_io.c f32b757c9ee7fdf68e7586bee306f8368759e7cd12febb2a6839199b1c1af395 x +F ext/consio/console_io.c b4885dfea71ed583315de8f0792a29d5fc7c7460b4a26c0aebe5cda5da8b38f8 x F ext/consio/console_io.h 0548b83d7c4b7270ad544a67f2bb90cebc519637fa39b1838df4744cf0d87646 F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3 F ext/expert/expert.c d548d603a4cc9e61f446cc179c120c6713511c413f82a4a32b1e1e69d3f086a4 -F ext/expert/expert1.test 53a749de08939e3bc14f804e97410927d46fa772cbce0247d7e8fa6fc2523b0c -F ext/expert/sqlite3expert.c c8cea5ff15fbe792cccc4992a9b40b706411c41d32611f617897fecac6ff06a4 +F ext/expert/expert1.test 661f873fd451127edf822ef0d520088faa319135f6a15bd10be6801ac284ac9b +F ext/expert/sqlite3expert.c 8b09aeb2b95a9fca8b6628b522bf4d69aa746ff64c38eb1e99a9b5fad8cf03b9 F ext/expert/sqlite3expert.h ca81efc2679a92373a13a3e76a6138d0310e32be53d6c3bfaedabd158ea8969b F ext/expert/test_expert.c d56c194b769bdc90cf829a14c9ecbc1edca9c850b837a4d0b13be14095c32a72 F ext/fts3/README.content b9078d0843a094d86af0d48dffbff13c906702b4c3558012e67b9c7cc3bf59ee @@ -97,15 +97,15 @@ F ext/fts5/fts5Int.h defa43c0932265138ee910ca416e6baccf8b774e0f3d610e74be1ab2880 F ext/fts5/fts5_aux.c 4584e88878e54828bf7d4d0d83deedd232ec60628b7731be02bad6adb62304b1 F ext/fts5/fts5_buffer.c 0eec58bff585f1a44ea9147eae5da2447292080ea435957f7488c70673cb6f09 F ext/fts5/fts5_config.c 8072a207034b51ae9b7694121d1b5715c794e94b275e088f70ae532378ca5cdf -F ext/fts5/fts5_expr.c e91156ebdcc08d837f4f324168f69f3c0d7fdef0e521fd561efb48ef3297b696 +F ext/fts5/fts5_expr.c d6a48d81aa96d68090187059f48dba2184e0cb0fd3b50a5a84a649a865cb31a5 F ext/fts5/fts5_hash.c adda4272be401566a6e0ba1acbe70ee5cb97fce944bc2e04dc707152a0ec91b1 F ext/fts5/fts5_index.c ee0f4d50bc0c58a7c5ef7d645e7e38e1e59315b8ea9d722ae00c5f949ee65379 -F ext/fts5/fts5_main.c d68bd9533d5a638b7f6fae61c3cb0a15257dcdcccedaf3d0b3c9f55940c85048 +F ext/fts5/fts5_main.c 0a8fc885851d76af6ea670090231ed23b9f8f349f44080e79a0f59b1d54511bb F ext/fts5/fts5_storage.c f9e31b0d155e9b2c92d5d3a09ad7a56b937fbf1c7f962e10f4ca6281349f3934 F ext/fts5/fts5_tcl.c fdf7e2bb9a9186cfcaf2d2ce11d338309342b7a7593c2812bc54455db53da5d2 F ext/fts5/fts5_test_mi.c 08c11ec968148d4cb4119d96d819f8c1f329812c568bac3684f5464be177d3ee F ext/fts5/fts5_test_tok.c 3cb0a9b508b30d17ef025ccddd26ae3dc8ddffbe76c057616e59a9aa85d36f3b -F ext/fts5/fts5_tokenize.c 83cfcede3898001cab84432a36ce1503e3080cf9b1c682b022ec82e267ea4c13 +F ext/fts5/fts5_tokenize.c 2321cbcef0bb99ed326d58f02cbd907e678c86572a72a434d08f6cb78e346dbd F ext/fts5/fts5_unicode2.c eca63dbc797f8ff0572e97caf4631389c0ab900d6364861b915bdd4735973f00 F ext/fts5/fts5_varint.c e64d2113f6e1bfee0032972cffc1207b77af63319746951bf1d09885d1dadf80 F ext/fts5/fts5_vocab.c 209e0c151e108d5f3621fa24b91e9b02f3750ee6c3f9ccec312df39481b68a09 @@ -126,7 +126,7 @@ F ext/fts5/test/fts5ak.test f459a64c9d38698af72a7c657ab6349bca96150241dd69fcce75 F ext/fts5/test/fts5al.test 00c4c1c6a1366b73aa48ce2068c634520867c3cf7f5d1676ebbb775ee1f35734 F ext/fts5/test/fts5alter.test 5565f7e4605512b69171ac18ca84398603f9f6456dbe377beeca97e83cc242cd F ext/fts5/test/fts5auto.test 78989e6527ce69c9eddbef7392fea5c10b0010cd2b2ae68eec7bc869c471e691 -F ext/fts5/test/fts5aux.test ed3596469f85a6cff5f6060e0cd9e3f9602051d8db2b497f5d12c85d39f20a62 +F ext/fts5/test/fts5aux.test e0866d924289423164c539576229ea589990e6dd38d05a0b6f8752ad51d70bb4 F ext/fts5/test/fts5auxdata.test eacc97ff04892f1a5f3d4df5a73f8bcbc3955ea1d12c9f24137eb1fc079e7611 F ext/fts5/test/fts5bigid.test 2860854c2561a57594192b00c33a29f91cb85e25f3d6c03b5c2b8f62708f39dd F ext/fts5/test/fts5bigpl.test 6466c89b38439f0aba26ac09e232a6b963f29b1cbe1304f6a664fe1e7a8f5fd3 @@ -178,7 +178,7 @@ F ext/fts5/test/fts5first.test 3fcf2365c00a15fc9704233674789a3b95131d12de18a9b99 F ext/fts5/test/fts5full.test e1701a112354e0ff9a1fdffb0c940c576530c33732ee20ac5e8361777070d717 F ext/fts5/test/fts5fuzz1.test 238d8c45f3b81342aa384de3e581ff2fa330bf922a7b69e484bbc06051a1080e F ext/fts5/test/fts5hash.test dc7bc7e0cdeb42cfce31294ad2f8fcf43192bfd0145bb7f3ecc5465d8c72696f -F ext/fts5/test/fts5integrity.test f1723fe9fb9381b26c946ab4d7505041434df2c449d1cd53f45c7bf8c098dfa2 +F ext/fts5/test/fts5integrity.test f7a9dc2c2b8db0db024eaa546ed56add97f869b67064e258c36dcdd0243f25f2 F ext/fts5/test/fts5interrupt.test 09613247b273a99889808ef852898177e671406fe71fdde7ea00e78ea283d227 F ext/fts5/test/fts5lastrowid.test be98fe3e03235296585b72daad7aed5717ba0062bae5e5c18dd6e04e194c6b28 F ext/fts5/test/fts5leftjoin.test c0b4cafb9661379e576dc4405c0891d8fcc2782680740513c4d1fc114b43d4ad @@ -218,7 +218,7 @@ F ext/fts5/test/fts5secure4.test 0d10a80590c07891478700af7793b232962042677432b98 F ext/fts5/test/fts5secure5.test c07a68ced5951567ac116c22f2d2aafae497e47fe9fcb6a335c22f9c7a4f2c3a F ext/fts5/test/fts5secure6.test 74bf04733cc523bccca519bb03d3b4e2ed6f6e3db7c59bf6be82c88a0ac857fd F ext/fts5/test/fts5secure7.test fd03d0868d64340a1db8615b02e5508fea409de13910114e4f19eaefc120777a -F ext/fts5/test/fts5secure8.test eb3579e9d58b0acad97e8082dee1f99b2d393198f03500b453c2b25761c0c298 +F ext/fts5/test/fts5secure8.test e68c0ac4447f415ff3e4e82531e99548289286f9f3a29c8cd53036113fe28602 F ext/fts5/test/fts5securefault.test dbca2b6a1c16700017f5051138991b705410889933f2a37c57ae8a23b296b10b F ext/fts5/test/fts5simple.test a298670508c1458b88ce6030440f26a30673931884eb5f4094ac1773b3ba217b F ext/fts5/test/fts5simple2.test 8dd2389ee75e21a1429fe87e5f8c7d9a97ad1470304a8a2d3ba4b8c3c345fecd @@ -228,9 +228,9 @@ F ext/fts5/test/fts5synonym2.test e2f6ff68c4fbe12a866a3a87510f553d9dac99bcb74c10 F ext/fts5/test/fts5tok1.test 1f7817499f5971450d8c4a652114b3d833393c8134e32422d0af27884ffe9cef F ext/fts5/test/fts5tok2.test dcacb32d4a2a3f0dd3215d4a3987f78ae4be21a2 F ext/fts5/test/fts5tokenizer.test ac3c9112b263a639fb0508ae73a3ee886bf4866d2153771a8e8a20c721305a43 -F ext/fts5/test/fts5tokenizer2.test cb5428c7cfb3b6a74b7adfcde65506e329112003e8dffa7501d01c2d18d02569 -F ext/fts5/test/fts5trigram.test 6c4e37864f3e7d90673db5563d9736d7e40080ab94d10ebdffa94c1b77941da0 -F ext/fts5/test/fts5trigram2.test 9fe4207f8a4241747aff1005258b564958588d21bfd240d6cd4c2e955d31c156 +F ext/fts5/test/fts5tokenizer2.test b9d734c1b10bc317a377ffea3ecb5c2937313113a02e364f167d0c7f8c81c282 +F ext/fts5/test/fts5trigram.test be914555deb8504dde682bd5aa343d00c4da37dfad20709a5bac30d5f97f2ef5 +F ext/fts5/test/fts5trigram2.test 4043f8836bbbb0ce37b86dd1e741431c6c595c7e4ba4fc8e26f21dc3b540e228 F ext/fts5/test/fts5ubsan.test 783d5a8d13ebfa169e634940228db54540780e3ba7a87ad1e4510e61440bf64b F ext/fts5/test/fts5umlaut.test a42fe2fe6387c40c49ab27ccbd070e1ae38e07f38d05926482cc0bccac9ad602 F ext/fts5/test/fts5unicode.test 17056f4efe6b0a5d4f41fdf7a7dc9af2873004562eaa899d40633b93dc95f5a9 @@ -494,7 +494,7 @@ F ext/recover/recoverpgsz.test 3658ab8e68475b1bb87d6af88baa04551c84b73280a566a1b F ext/recover/recoverrowid.test f948bf4024a5f41b0e21b8af80c60564c5b5d78c05a8d64fc00787715ff9f45f F ext/recover/recoverslowidx.test 5205a9742dd9490ee99950dabb622307355ef1662dea6a3a21030057bfd81411 F ext/recover/recoversql.test e66d01f95302a223bcd3fd42b5ee58dc2b53d70afa90b0d00e41e4b8eab20486 -F ext/recover/sqlite3recover.c 65ef0f56301a16c0536c9839fb7e23540c9c4f75da0afe3b7b4d163c8f624404 +F ext/recover/sqlite3recover.c 2dcf6b56c5e0e2b43fc4c6115b689ab194c374ced7f7f8380ad9a24d8ef24ac9 F ext/recover/sqlite3recover.h 011c799f02deb70ab685916f6f538e6bb32c4e0025e79bfd0e24ff9c74820959 F ext/recover/test_recover.c fd871a40f2238022bedcbdf3cb493b91225edaa94d6ae8892af97a10e7ccc4ba F ext/repair/README.md 92f5e8aae749a4dae14f02eea8e1bb42d4db2b6ce5e83dbcdd6b1446997e0c15 @@ -614,10 +614,10 @@ F ext/wasm/api/sqlite3-api-oo1.js c373cc04625a96bd3f01ce8ebeac93a5d38dbda6215818 F ext/wasm/api/sqlite3-api-prologue.js b347a0c5350247f90174a0ad9b9e72a99a5f837f31f78f60fcdb829b2ca30b63 F ext/wasm/api/sqlite3-api-worker1.js 9704b77b5eb9d0d498ceeaf3e7a837021b14c52ac15d6556c7f97e278ec725c3 F ext/wasm/api/sqlite3-license-version-header.js 0c807a421f0187e778dc1078f10d2994b915123c1223fe752b60afdcd1263f89 -F ext/wasm/api/sqlite3-opfs-async-proxy.js 196ad83d36ca794e564044788c9d21b964679d63cad865f604da37c4afc9a285 +F ext/wasm/api/sqlite3-opfs-async-proxy.js dd4054e4f673027c330c96a04cf0a03b118156f01b076dc4e9d604dbdd7bfc51 F ext/wasm/api/sqlite3-vfs-helper.c-pp.js 3f828cc66758acb40e9c5b4dcfd87fd478a14c8fb7f0630264e6c7fa0e57515d F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js 8433ee332d5f5e39fb19427fccb7bad7f44aa99b5504daad3343fc128c311e78 -F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js 3c72f1a0e6a7343c8c882d29d01bb440f10be12c844651605b486e76f3d6cc8c +F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js 834dcea56e27064ae8429780c85393c82b8f83fc23a1ebebb41849392bfe30bf F ext/wasm/api/sqlite3-vtab-helper.c-pp.js a2fcbc3fecdd0eea229283584ebc122f29d98194083675dbe5cb2cf3a17fe309 F ext/wasm/api/sqlite3-wasm.c 9267174b9b0591b4f71193542ab57adf95bb9415f7d3453acf4a8ca8052f5e6c F ext/wasm/api/sqlite3-worker1-promiser.c-pp.js 46f303ba8ddd1b2f0a391798837beddfa72e8c897038c8047eda49ce7d5ed46b @@ -686,7 +686,7 @@ F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b F sqlite3.1 acdff36db796e2d00225b911d3047d580cd136547298435426ce9d40347973cc F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a F sqlite_cfg.h.in baf2e409c63d4e7a765e17769b6ff17c5a82bbd9cbf1e284fd2e4cefaff3fcf2 -F src/alter.c e1b6782b85dd758f89e5c588e4e3eb82638c2dafc0c857b79a43bb8ec1746fca +F src/alter.c bb663fddf1fe0e2e6d8758b2b7fb6374e7c057a6ca3955f37a48986806029765 F src/analyze.c a3df28274e2565ba5656577d7e3fd262169a213e6eb0bd47890e0f0729a4031c F src/attach.c cc9d00d30da916ff656038211410ccf04ed784b7564639b9b61d1839ed69fd39 F src/auth.c 19b7ccacae3dfba23fc6f1d0af68134fa216e9040e53b0681b4715445ea030b4 @@ -696,7 +696,7 @@ F src/btmutex.c 79a43670447eacc651519a429f6ece9fd638563cf95b469d6891185ddae2b522 F src/btree.c 71b80e77b255144db47180fda8138740608e382a44231942464029b1a45fc036 F src/btree.h 55066f513eb095db935169dab1dc2f7c7a747ef223c533f5d4ad4dfed346cbd0 F src/btreeInt.h 98aadb6dcb77b012cab2574d6a728fad56b337fc946839b9898c4b4c969e30b6 -F src/build.c 11ec7014a3c468e7b3ccc8dda8d9111cd5a29a358df18818788601e0600aaabd +F src/build.c 237ccc0290d131d646be722f418e92ee0a38043aee25e7dfdc75f8ce5b3abe4e F src/callback.c db3a45e376deff6a16c0058163fe0ae2b73a2945f3f408ca32cf74960b28d490 F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e F src/ctime.c 64e4b1227b4ed123146f0aa2989131d1fbd9b927b11e80c9d58c6a68f9cd5ce3 @@ -707,13 +707,13 @@ F src/delete.c cb766727c78e715f9fb7ec8a7d03658ed2a3016343ca687acfcec9083cdca500 F src/expr.c f7bad20d2f74005f1f876e7fbb627222ea28250e44b296b047403720c5c21818 F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007 F src/fkey.c a47610f0a5c6cb0ad79f8fcef039c01833dec0c751bb695f28dc0ec6a4c3ba00 -F src/func.c 283d4f3b2751a1d9339fd93a8a013d1948fd5f4474a3cab0955eb4fafd445d0f +F src/func.c f1f57c6863c1380f31ecf3d61732495bfff847a8e35a832c7e306e310db5a799 F src/global.c 61a419dd9e993b9be0f91de4c4ccf322b053eb829868e089f0321dd669be3b90 F src/hash.c 9ee4269fb1d6632a6fecfb9479c93a1f29271bddbbaf215dd60420bcb80c7220 F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51 F src/hwtime.h f9c2dfb84dce7acf95ce6d289e46f5f9d3d1afd328e53da8f8e9008e3b3caae6 F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71 -F src/insert.c 4bd7c7e54a1062dcd0214b7a6296f7194eb10fb14d3ddca1ed20b01c2a86a18c +F src/insert.c 8ff11e9e54c5fc1fe89707b3d41cf44ad2822f712bd3b5da68338ea42518847e F src/json.c bf1b51e32158b3d01d96a878d3dba8d2e633a7e5bf2534d4617f89de8a6b9a91 F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa F src/loadext.c 7432c944ff197046d67a1207790a1b13eec4548c85a9457eb0896bb3641dfb36 @@ -743,7 +743,7 @@ F src/os_win.c 6ff43bac175bd9ed79e7c0f96840b139f2f51d01689a638fd05128becf94908a F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a F src/pager.c 9beb80f6e330dd63c5d8ba0f7a7f3a55fff22067a68d424949c389bfc6fa0c56 F src/pager.h 4b1140d691860de0be1347474c51fee07d5420bd7f802d38cbab8ea4ab9f538a -F src/parse.y 50516253433303673ff6b009983bb246d1527415e5a9af22acc51b0eedb9a10d +F src/parse.y 1a526e56da1d8255196bd59d4ca3e26d912d3dc26d18663ade25dd328945062e F src/pcache.c 040b165f30622a21b7a9a77c6f2e4877a32fb7f22d4c7f0d2a6fa6833a156a75 F src/pcache.h 1497ce1b823cf00094bb0cf3bac37b345937e6f910890c626b16512316d3abf5 F src/pcache1.c 602acb23c471bb8d557a6f0083cc2be641d6cafcafa19e481eba7ef4c9ca0f00 @@ -752,14 +752,14 @@ F src/pragma.h e690a356c18e98414d2e870ea791c1be1545a714ba623719deb63f7f226d8bb7 F src/prepare.c d99931f45416652895e502328ca49fe782cfc4e1ebdcda13b3736d991ebf42ce F src/printf.c 8b250972305e14b365561be5117ed0fd364e4fd58968776df1ce64c6280b90f9 F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c -F src/resolve.c 22f1fa3423b377c02ae78d451cfeb1c2d96dcf0389c0642cbdcd19d3bfd7ae01 +F src/resolve.c 4f4c99b8714fa04844a0f1f96ee69eefc8928e300af9247a46cfe80f78f8997c F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c 1a841c38974d45cf15a7611398479182b61ad4c187423c380741d8b1688fe607 -F src/shell.c.in 885dafabb3f16d68bdb4576683afb0e39a1939f50985b162255bf656c470babf +F src/shell.c.in ebb698028ec031e0b1595865500097d2005f977be0efd14bd8b0ddf634d5ed8d F src/sqlite.h.in c71d9ef76a6d32dc7ff2d373f2e57ce09056af26c1457bcadae5358b7628c7c3 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54 -F src/sqliteInt.h 6a9fa3902c9faca2b57060e822f2afadfbf96d64c4ede81e201f0e0c42d7e4aa +F src/sqliteInt.h 9d022fc8dc3fccd69e518c115101ab4c3d4cb45a79549c1a4c26fec492eb2cfb F src/sqliteLimit.h 6878ab64bdeb8c24a1d762d45635e34b96da21132179023338c93f820eee6728 F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1 @@ -828,7 +828,7 @@ F src/vdbe.c 3b1793c5d2235ae89b01ef051a33d7d2ad3704c71799653b112686735ad401ff F src/vdbe.h c2d78d15112c3fc5ab87f5e8e0b75d2db1c624409de2e858c3d1aafb1650bb4f F src/vdbeInt.h 949669dfd8a41550d27dcb905b494f2ccde9a2e6c1b0b04daa1227e2e74c2b2c F src/vdbeapi.c 80235ac380e9467fec1cb0883354d841f2a771976e766995f7e0c77f845406df -F src/vdbeaux.c 3bcf13776c39bf660a52b4b97f6389a421c2756f9ffbf4c0d94f73e1935d8d9c +F src/vdbeaux.c 6e37cb918506c28fe7657454fcbc2e01e66bfba4164f306c2f075fd5c5fef609 F src/vdbeblob.c 13f9287b55b6356b4b1845410382d6bede203ceb29ef69388a4a3d007ffacbe5 F src/vdbemem.c 831a244831eaa45335f9ae276b50a7a82ee10d8c46c2c72492d4eb8c98d94d89 F src/vdbesort.c 237840ca1947511fa59bd4e18b9eeae93f2af2468c34d2427b059f896230a547 @@ -839,7 +839,7 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9 F src/wal.c 887fc4ca3f020ebb2e376f222069570834ac63bf50111ef0cbf3ae417048ed89 F src/wal.h ba252daaa94f889f4b2c17c027e823d9be47ce39da1d3799886bbd51f0490452 F src/walker.c 7c7ea0115345851c3da4e04e2e239a29983b61fb5b038b94eede6aba462640e2 -F src/where.c 6f02c3936d1f9a637d8d7b5ad7362371af3e4434b0ec1eb950189a83de560d59 +F src/where.c 839956666ce9f6b5d4951fc1f27e976951aac66920c82f9cdc5036b61b54ef7b F src/whereInt.h 82a13766f13d1a53b05387c2e60726289ef26404bc7b9b1f7770204d97357fb8 F src/wherecode.c f5255f49d1f42b6e7e6b0362ff3522fa88cbcaa7213e52f9374744027ecdebca F src/whereexpr.c 67d15caf88a1a9528283d68ff578e024cf9fe810b517bb0343e5aaf695ad97dd @@ -1536,7 +1536,7 @@ F test/regexp2.test 55ed41da802b0e284ac7e2fe944be3948f93ff25abbca0361a609acfed13 F test/reindex.test cd9d6021729910ece82267b4f5e1b5ac2911a7566c43b43c176a6a4732e2118d F test/resetdb.test 54c06f18bc832ac6d6319e5ab23d5c8dd49fdbeec7c696d791682a8006bd5fc3 F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb -F test/returning1.test 38eee9d07ac1dd4fbd4ce7373497f3783db86b9a76f13ea6a9f9afaf934f888b +F test/returning1.test 212cd4111bb941a60abf608f20250db666c21eb1bc4d49217e96c87ff3ab9d1a F test/returningfault.test ae4c4b5e8745813287a359d9ccdb9d5c883c2e68afb18fb0767937d5de5692a4 F test/rollback.test 06680159bc6746d0f26276e339e3ae2f951c64812468308838e0a3362d911eaa F test/rollback2.test 3f3a4e20401825017df7e7671e9f31b6de5fae5620c2b9b49917f52f8c160a8f @@ -1584,7 +1584,7 @@ F test/select3.test 180223af31e1ca5537dd395ef9708ae18e651a233777fd366fd0d75469fc F test/select4.test f0684d3da3bccacbe2a1ebadf6fb49d9df6f53acb4c6ebc228a88d0d6054cc7b F test/select5.test 8afc5e5dcdebc2be54472e73ebd9cd1adef1225fd15d37a1c62f969159f390ae F test/select6.test 9b2fb4ffedf52e1b5703cfcae1212e7a4a063f014c0458d78d29aca3db766d1f -F test/select7.test f659f231489349e8c5734e610803d7654207318f +F test/select7.test b825420da8a0b5722fdb77f3369f6396a3d198c46e8787eb26ff9425d4ac9d27 F test/select8.test 8c8f5ae43894c891efc5755ed905467d1d67ad5d F test/select9.test f7586b207ce2304ab80dc93d3146469a28fd4403621dd3a82d06644563d3c812 F test/selectA.test 1da8ce3884c326e11d2855baffb76436b0d7e044404af8a2a70d1399a4ff7e29 @@ -1614,7 +1614,7 @@ F test/shell1.test 17a5ca9c6f24f807b2f505b4b38fcbce143d96cd8664c06c34bbbe0672bf7 F test/shell2.test 56da24128304c9ab67da2964cc80beff7b35761c446ec6e6e98bff2775b15026 F test/shell3.test 5ad4b2813717956414f2c0c8a2027895cd98ccf7dd54dbacbde4d4f5591ce5a1 F test/shell4.test 522fdc628c55eff697b061504fb0a9e4e6dfc5d9087a633ab0f3dd11bcc4f807 -F test/shell5.test 5b2ab1c0540217773f939927c24163a56257446da3f564d4724042620bfea762 +F test/shell5.test 6a49440bddc33a132f856fb189e71228f8132963655d12a2c8b8a161263b9632 F test/shell6.test e3b883b61d4916b6906678a35f9d19054861123ad91b856461e0a456273bdbb8 F test/shell7.test 753c6ece5361df50025a50cadf378ea36db9cc05fb23d7a96cff7fa130626ef9 F test/shell8.test aea51ecbcd4494c746b096aeff51d841d04d5f0dc4b62eb42427f16109b87acd @@ -2034,7 +2034,7 @@ F test/win32heap.test 10fd891266bd00af68671e702317726375e5407561d859be1aa04696f2 F test/win32lock.test e0924eb8daac02bf80e9da88930747bd44dd9b230b7759fed927b1655b467c9c F test/win32longpath.test 4baffc3acb2e5188a5e3a895b2b543ed09e62f7c72d713c1feebf76222fe9976 F test/win32nolock.test ac4f08811a562e45a5755e661f45ca85892bdbbc -F test/window1.test 5e8abe56a7d667eeddbba6de180086dcf69ed528d046447a25464f945ece101f +F test/window1.test 79dc3b9a2226f622d7e104a1fc750d1c4c3c08d6147b59085bdbe05352947ffa F test/window2.tcl 492c125fa550cda1dd3555768a2303b3effbeceee215293adf8871efc25f1476 F test/window2.test e466a88bd626d66edc3d352d7d7e1d5531e0079b549ba44efb029d1fbff9fd3c F test/window3.tcl acea6e86a4324a210fd608d06741010ca83ded9fde438341cb978c49928faf03 @@ -2191,11 +2191,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 3210e1ca4d0efedf9710c97abd050ba10d3af98cb1f029c26daa84daf42fbc7e -R 03f38bbe86d08cc2accd8330faccbd25 -T +sym-major-release * +P fc956353d3762d0e655b88f9d0c1a3840b40453a22e97160ccdf60485be56a92 +R 47b9d94ac84047bf00fd35221bcbfde9 T +sym-release * -T +sym-version-3.46.0 * +T +sym-version-3.46.1 * U drh -Z 82f35d0822d1dfbb574e5dd2459b4a36 +Z 519cc14a63561bb4dfa17935ffe00a32 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 7dd5f56..43d669e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e +c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33 diff --git a/src/alter.c b/src/alter.c index c1e0a29..a8556d1 100644 --- a/src/alter.c +++ b/src/alter.c @@ -1320,7 +1320,7 @@ static int renameResolveTrigger(Parse *pParse){ /* ALWAYS() because if the table of the trigger does not exist, the ** error would have been hit before this point */ if( ALWAYS(pParse->pTriggerTab) ){ - rc = sqlite3ViewGetColumnNames(pParse, pParse->pTriggerTab); + rc = sqlite3ViewGetColumnNames(pParse, pParse->pTriggerTab)!=0; } /* Resolve symbols in WHEN clause */ diff --git a/src/build.c b/src/build.c index 10aa342..9747810 100644 --- a/src/build.c +++ b/src/build.c @@ -3064,8 +3064,9 @@ create_view_fail: #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) /* ** The Table structure pTable is really a VIEW. Fill in the names of -** the columns of the view in the pTable structure. Return the number -** of errors. If an error is seen leave an error message in pParse->zErrMsg. +** the columns of the view in the pTable structure. Return non-zero if +** there are errors. If an error is seen an error message is left +** in pParse->zErrMsg. */ static SQLITE_NOINLINE int viewGetColumnNames(Parse *pParse, Table *pTable){ Table *pSelTab; /* A fake table from which we get the result set */ @@ -3188,7 +3189,7 @@ static SQLITE_NOINLINE int viewGetColumnNames(Parse *pParse, Table *pTable){ sqlite3DeleteColumnNames(db, pTable); } #endif /* SQLITE_OMIT_VIEW */ - return nErr; + return nErr + pParse->nErr; } int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){ assert( pTable!=0 ); diff --git a/src/func.c b/src/func.c index 1800498..058f71c 100644 --- a/src/func.c +++ b/src/func.c @@ -2206,6 +2206,8 @@ static void groupConcatValue(sqlite3_context *context){ sqlite3_result_error_toobig(context); }else if( pAccum->accError==SQLITE_NOMEM ){ sqlite3_result_error_nomem(context); + }else if( pGCC->nAccum>0 && pAccum->nChar==0 ){ + sqlite3_result_text(context, "", 1, SQLITE_STATIC); }else{ const char *zText = sqlite3_str_value(pAccum); sqlite3_result_text(context, zText, pAccum->nChar, SQLITE_TRANSIENT); diff --git a/src/insert.c b/src/insert.c index 072386e..a7e9442 100644 --- a/src/insert.c +++ b/src/insert.c @@ -717,6 +717,7 @@ Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){ pRet->pSrc->nSrc = 1; pRet->pPrior = pLeft->pPrior; pRet->op = pLeft->op; + if( pRet->pPrior ) pRet->selFlags |= SF_Values; pLeft->pPrior = 0; pLeft->op = TK_SELECT; assert( pLeft->pNext==0 ); diff --git a/src/parse.y b/src/parse.y index 071e10a..2ada5eb 100644 --- a/src/parse.y +++ b/src/parse.y @@ -530,9 +530,9 @@ cmd ::= select(X). { break; } } - if( (p->selFlags & SF_MultiValue)==0 && - (mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0 && - cnt>mxSelect + if( (p->selFlags & (SF_MultiValue|SF_Values))==0 + && (mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0 + && cnt>mxSelect ){ sqlite3ErrorMsg(pParse, "too many terms in compound SELECT"); } diff --git a/src/resolve.c b/src/resolve.c index bf8326a..590f8ae 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -228,7 +228,7 @@ static void extendFJMatch( static SQLITE_NOINLINE int isValidSchemaTableName( const char *zTab, /* Name as it appears in the SQL */ Table *pTab, /* The schema table we are trying to match */ - Schema *pSchema /* non-NULL if a database qualifier is present */ + const char *zDb /* non-NULL if a database qualifier is present */ ){ const char *zLegacy; assert( pTab!=0 ); @@ -239,7 +239,7 @@ static SQLITE_NOINLINE int isValidSchemaTableName( if( sqlite3StrICmp(zTab+7, &PREFERRED_TEMP_SCHEMA_TABLE[7])==0 ){ return 1; } - if( pSchema==0 ) return 0; + if( zDb==0 ) return 0; if( sqlite3StrICmp(zTab+7, &LEGACY_SCHEMA_TABLE[7])==0 ) return 1; if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1; }else{ @@ -422,7 +422,7 @@ static int lookupName( } }else if( sqlite3StrICmp(zTab, pTab->zName)!=0 ){ if( pTab->tnum!=1 ) continue; - if( !isValidSchemaTableName(zTab, pTab, pSchema) ) continue; + if( !isValidSchemaTableName(zTab, pTab, zDb) ) continue; } assert( ExprUseYTab(pExpr) ); if( IN_RENAME_OBJECT && pItem->zAlias ){ @@ -2154,6 +2154,9 @@ int sqlite3ResolveExprNames( ** Resolve all names for all expression in an expression list. This is ** just like sqlite3ResolveExprNames() except that it works for an expression ** list rather than a single expression. +** +** The return value is SQLITE_OK (0) for success or SQLITE_ERROR (1) for a +** failure. */ int sqlite3ResolveExprListNames( NameContext *pNC, /* Namespace to resolve expressions in. */ @@ -2162,7 +2165,7 @@ int sqlite3ResolveExprListNames( int i; int savedHasAgg = 0; Walker w; - if( pList==0 ) return WRC_Continue; + if( pList==0 ) return SQLITE_OK; w.pParse = pNC->pParse; w.xExprCallback = resolveExprStep; w.xSelectCallback = resolveSelectStep; @@ -2176,7 +2179,7 @@ int sqlite3ResolveExprListNames( #if SQLITE_MAX_EXPR_DEPTH>0 w.pParse->nHeight += pExpr->nHeight; if( sqlite3ExprCheckHeight(w.pParse, w.pParse->nHeight) ){ - return WRC_Abort; + return SQLITE_ERROR; } #endif sqlite3WalkExprNN(&w, pExpr); @@ -2193,10 +2196,10 @@ int sqlite3ResolveExprListNames( (NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg); pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg); } - if( w.pParse->nErr>0 ) return WRC_Abort; + if( w.pParse->nErr>0 ) return SQLITE_ERROR; } pNC->ncFlags |= savedHasAgg; - return WRC_Continue; + return SQLITE_OK; } /* diff --git a/src/shell.c.in b/src/shell.c.in index 0029682..7960acf 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -8977,7 +8977,6 @@ static int do_meta_command(char *zLine, ShellState *p){ import_cleanup(&sCtx); shell_out_of_memory(); } - nByte = strlen(zSql); rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); sqlite3_free(zSql); zSql = 0; @@ -8996,16 +8995,21 @@ static int do_meta_command(char *zLine, ShellState *p){ sqlite3_finalize(pStmt); pStmt = 0; if( nCol==0 ) return 0; /* no columns, no error */ - zSql = sqlite3_malloc64( nByte*2 + 20 + nCol*2 ); + + nByte = 64 /* space for "INSERT INTO", "VALUES(", ")\0" */ + + (zSchema ? strlen(zSchema)*2 + 2: 0) /* Quoted schema name */ + + strlen(zTable)*2 + 2 /* Quoted table name */ + + nCol*2; /* Space for ",?" for each column */ + zSql = sqlite3_malloc64( nByte ); if( zSql==0 ){ import_cleanup(&sCtx); shell_out_of_memory(); } if( zSchema ){ - sqlite3_snprintf(nByte+20, zSql, "INSERT INTO \"%w\".\"%w\" VALUES(?", + sqlite3_snprintf(nByte, zSql, "INSERT INTO \"%w\".\"%w\" VALUES(?", zSchema, zTable); }else{ - sqlite3_snprintf(nByte+20, zSql, "INSERT INTO \"%w\" VALUES(?", zTable); + sqlite3_snprintf(nByte, zSql, "INSERT INTO \"%w\" VALUES(?", zTable); } j = strlen30(zSql); for(i=1; i=2 ){ oputf("Insert using: %s\n", zSql); } diff --git a/src/sqliteInt.h b/src/sqliteInt.h index d98a4f7..ec126b0 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3388,7 +3388,7 @@ struct SrcList { #define WHERE_AGG_DISTINCT 0x0400 /* Query is "SELECT agg(DISTINCT ...)" */ #define WHERE_ORDERBY_LIMIT 0x0800 /* ORDERBY+LIMIT on the inner loop */ #define WHERE_RIGHT_JOIN 0x1000 /* Processing a RIGHT JOIN */ - /* 0x2000 not currently used */ +#define WHERE_KEEP_ALL_JOINS 0x2000 /* Do not do the omit-noop-join opt */ #define WHERE_USE_LIMIT 0x4000 /* Use the LIMIT in cost estimates */ /* 0x8000 not currently used */ diff --git a/src/vdbeaux.c b/src/vdbeaux.c index e4c174e..665f6cd 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -5336,7 +5336,8 @@ sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff){ assert( iVar>0 ); if( v ){ Mem *pMem = &v->aVar[iVar-1]; - assert( (v->db->flags & SQLITE_EnableQPSG)==0 ); + assert( (v->db->flags & SQLITE_EnableQPSG)==0 + || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 ); if( 0==(pMem->flags & MEM_Null) ){ sqlite3_value *pRet = sqlite3ValueNew(v->db); if( pRet ){ @@ -5356,7 +5357,8 @@ sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff){ */ void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){ assert( iVar>0 ); - assert( (v->db->flags & SQLITE_EnableQPSG)==0 ); + assert( (v->db->flags & SQLITE_EnableQPSG)==0 + || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 ); if( iVar>=32 ){ v->expmask |= 0x80000000; }else{ diff --git a/src/where.c b/src/where.c index fac0f6c..84deb5e 100644 --- a/src/where.c +++ b/src/where.c @@ -3959,7 +3959,9 @@ static int whereLoopAddBtree( " according to whereIsCoveringIndex()\n", pProbe->zName)); } } - }else if( m==0 ){ + }else if( m==0 + && (HasRowid(pTab) || pWInfo->pSelect!=0 || sqlite3FaultSim(700)) + ){ WHERETRACE(0x200, ("-> %s a covering index according to bitmasks\n", pProbe->zName, m==0 ? "is" : "is not")); @@ -5848,6 +5850,10 @@ static void showAllWhereLoops(WhereInfo *pWInfo, WhereClause *pWC){ ** the right-most table of a subquery that was flattened into the ** main query and that subquery was the right-hand operand of an ** inner join that held an ON or USING clause. +** 6) The ORDER BY clause has 63 or fewer terms +** 7) The omit-noop-join optimization is enabled. +** +** Items (1), (6), and (7) are checked by the caller. ** ** For example, given: ** @@ -6261,6 +6267,7 @@ WhereInfo *sqlite3WhereBegin( if( pOrderBy && pOrderBy->nExpr>=BMS ){ pOrderBy = 0; wctrlFlags &= ~WHERE_WANT_DISTINCT; + wctrlFlags |= WHERE_KEEP_ALL_JOINS; /* Disable omit-noop-join opt */ } /* The number of tables in the FROM clause is limited by the number of @@ -6561,10 +6568,10 @@ WhereInfo *sqlite3WhereBegin( ** in-line sqlite3WhereCodeOneLoopStart() for performance reasons. */ notReady = ~(Bitmask)0; - if( pWInfo->nLevel>=2 - && pResultSet!=0 /* these two combine to guarantee */ - && 0==(wctrlFlags & WHERE_AGG_DISTINCT) /* condition (1) above */ - && OptimizationEnabled(db, SQLITE_OmitNoopJoin) + if( pWInfo->nLevel>=2 /* Must be a join, or this opt8n is pointless */ + && pResultSet!=0 /* Condition (1) */ + && 0==(wctrlFlags & (WHERE_AGG_DISTINCT|WHERE_KEEP_ALL_JOINS)) /* (1),(6) */ + && OptimizationEnabled(db, SQLITE_OmitNoopJoin) /* (7) */ ){ notReady = whereOmitNoopJoin(pWInfo, notReady); nTabList = pWInfo->nLevel; @@ -6884,26 +6891,6 @@ whereBeginError: } #endif -#ifdef SQLITE_DEBUG -/* -** Return true if cursor iCur is opened by instruction k of the -** bytecode. Used inside of assert() only. -*/ -static int cursorIsOpen(Vdbe *v, int iCur, int k){ - while( k>=0 ){ - VdbeOp *pOp = sqlite3VdbeGetOp(v,k--); - if( pOp->p1!=iCur ) continue; - if( pOp->opcode==OP_Close ) return 0; - if( pOp->opcode==OP_OpenRead ) return 1; - if( pOp->opcode==OP_OpenWrite ) return 1; - if( pOp->opcode==OP_OpenDup ) return 1; - if( pOp->opcode==OP_OpenAutoindex ) return 1; - if( pOp->opcode==OP_OpenEphemeral ) return 1; - } - return 0; -} -#endif /* SQLITE_DEBUG */ - /* ** Generate the end of the WHERE loop. See comments on ** sqlite3WhereBegin() for additional information. @@ -7203,16 +7190,10 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){ ** reference. Verify that this is harmless - that the ** table being referenced really is open. */ -#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC - assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 - || cursorIsOpen(v,pOp->p1,k) - || pOp->opcode==OP_Offset - ); -#else - assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 - || cursorIsOpen(v,pOp->p1,k) - ); -#endif + if( pLoop->wsFlags & WHERE_IDX_ONLY ){ + sqlite3ErrorMsg(pParse, "internal query planner error"); + pParse->rc = SQLITE_INTERNAL; + } } }else if( pOp->opcode==OP_Rowid ){ pOp->p1 = pLevel->iIdxCur; diff --git a/test/returning1.test b/test/returning1.test index 05bd445..e7be7c6 100644 --- a/test/returning1.test +++ b/test/returning1.test @@ -531,4 +531,17 @@ do_execsql_test 21.1 { INSERT INTO sqlite_temp_schema DEFAULT VALUES RETURNING sqlite_temp_schema.name; } {{}} +#------------------------------------------------------------------------- +reset_db +do_execsql_test 22.0 { + PRAGMA writable_schema=ON; + CREATE TABLE xyz (a); +} +do_catchsql_test 22.1 { + INSERT INTO sqlite_temp_schema DEFAULT VALUES + RETURNING + (SELECT * FROM xyz AS sqlite_master WHERE a=sqlite_master.name); +} {1 {no such column: sqlite_master.name}} + + finish_test diff --git a/test/select7.test b/test/select7.test index d705ebf..0c40510 100644 --- a/test/select7.test +++ b/test/select7.test @@ -155,6 +155,38 @@ if {[clang_sanitize_address]==0} { } } +# https://issues.chromium.org/issues/358174302 +# Need to support an unlimited number of terms in a VALUES clause, even +# if some of those terms contain double-quoted string literals. +# +do_execsql_test select7-6.5 { + DROP TABLE IF EXISTS t1; + CREATE TABLE t1(a,b,c); +} +sqlite3_limit db SQLITE_LIMIT_COMPOUND_SELECT 10 +sqlite3_db_config db SQLITE_DBCONFIG_DQS_DML 0 +do_catchsql_test select7-6.6 { + INSERT INTO t1 VALUES + (NULL,0,""), (X'',0.0,0.0), (X'',X'',""), (0.0,0.0,""), (NULL,NULL,0.0), + (0,"",0), (0.0,X'',0), ("",X'',0.0), (0.0,X'',NULL), (0,NULL,""), + (0,"",NULL), (0.0,NULL,X''), ("",X'',NULL), (NULL,0,""), + (0,NULL,0), (X'',X'',0.0); +} {1 {no such column: "" - should this be a string literal in single-quotes?}} +do_execsql_test select7-6.7 { + SELECT count(*) FROM t1; +} {0} +sqlite3_db_config db SQLITE_DBCONFIG_DQS_DML 1 +do_catchsql_test select7-6.8 { + INSERT INTO t1 VALUES + (NULL,0,""), (X'',0.0,0.0), (X'',X'',""), (0.0,0.0,""), (NULL,NULL,0.0), + (0,"",0), (0.0,X'',0), ("",X'',0.0), (0.0,X'',NULL), (0,NULL,""), + (0,"",NULL), (0.0,NULL,X''), ("",X'',NULL), (NULL,0,""), + (0,NULL,0), (X'',X'',0.0); +} {0 {}} +do_execsql_test select7-6.9 { + SELECT count(*) FROM t1; +} {16} + # This block of tests verifies that bug aa92c76cd4 is fixed. # do_test select7-7.1 { diff --git a/test/shell5.test b/test/shell5.test index 877676d..8727eda 100644 --- a/test/shell5.test +++ b/test/shell5.test @@ -585,4 +585,16 @@ do_test shell5-7.1 { SELECT * FROM t1;} } {0 aaa|bbb|aaabbb} +#------------------------------------------------------------------------- + +do_test shell5-8.1 { + + set out [open shell5.csv w] + fconfigure $out -translation lf + puts $out x + close $out + + catchcmd :memory: {.import --csv shell5.csv '""""""""""""""""""""""""""""""""""""""""""""""'} +} {0 {}} + finish_test diff --git a/test/window1.test b/test/window1.test index d8348a8..457852c 100644 --- a/test/window1.test +++ b/test/window1.test @@ -2375,5 +2375,23 @@ do_execsql_test 77.2 { SELECT max(~likely(x)) FILTER (WHERE true) FROM t1 INDEXED BY t1x GROUP BY x; } {-2 -3 -5 -9} +# 2024-05-23 https://sqlite.org/forum/forumpost/bf8f43aa522c2299 +# +# A bug in group_concat() when used as a window function, reported +# just hours after the 3.46.0 release, though first appearing +# in 3.28.0. +# +# When used as a window function, a group_concat() was not +# correctly distinguishing between NULL and empty-string for +# its return value. +# +do_execsql_test 78.1 { + SELECT quote(group_concat(x) OVER ()) FROM (SELECT '' AS x); +} '' +do_execsql_test 78.2 { + SELECT quote(group_concat(x) OVER ( + ORDER BY y RANGE BETWEEN 1 FOLLOWING AND 2 FOLLOWING + )) FROM (SELECT 'abc' AS x, 1 AS y); +} NULL finish_test diff --git a/www/c3ref/c_source_id.html b/www/c3ref/c_source_id.html index 82e7547..7a4d2d7 100644 --- a/www/c3ref/c_source_id.html +++ b/www/c3ref/c_source_id.html @@ -121,9 +121,9 @@ antiRobotDefense();

Compile-Time Library Version Numbers

-#define SQLITE_VERSION        "3.46.0"
-#define SQLITE_VERSION_NUMBER 3046000
-#define SQLITE_SOURCE_ID      "2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e"
+#define SQLITE_VERSION        "3.46.1"
+#define SQLITE_VERSION_NUMBER 3046001
+#define SQLITE_SOURCE_ID      "2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33"
 

The SQLITE_VERSION C preprocessor macro in the sqlite3.h header diff --git a/www/capi3ref.html b/www/capi3ref.html index 54ae2b8..e70456f 100644 --- a/www/capi3ref.html +++ b/www/capi3ref.html @@ -6912,9 +6912,9 @@ and EXCLUSIVE.

Compile-Time Library Version Numbers

-#define SQLITE_VERSION        "3.46.0"
-#define SQLITE_VERSION_NUMBER 3046000
-#define SQLITE_SOURCE_ID      "2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e"
+#define SQLITE_VERSION        "3.46.1"
+#define SQLITE_VERSION_NUMBER 3046001
+#define SQLITE_SOURCE_ID      "2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33"
 

The SQLITE_VERSION C preprocessor macro in the sqlite3.h header diff --git a/www/carray.html b/www/carray.html index 4e18e43..d168eec 100644 --- a/www/carray.html +++ b/www/carray.html @@ -251,5 +251,5 @@ taken from a C-language array at address $PTR.

SELECT * FROM obj WHERE rowid IN carray($PTR, 10);
 
-

This page last modified on 2023-02-17 13:24:09 UTC

+ diff --git a/www/changes.html b/www/changes.html index f7954ca..35f73a4 100644 --- a/www/changes.html +++ b/www/changes.html @@ -129,6 +129,35 @@ https://www.sqlite.org/src/timeline?t=release. See the chronology a succinct listing of releases.

+ +

2024-08-13 (3.46.1)

    +
  1. Improved robustness while parsing the tokenize= arguments in FTS5. + Forum post 171bcc2bcd. +
  2. Enhancements to covering index prediction in the query planner. + Add early detection of over-prediction of covering indexes so that + sqlite3_prepare() will return an error rather than just generate bad bytecode. + Forum post e60e4c295d22f8ce. +
  3. Do not let the number of terms on a VALUES clause be limited by + SQLITE_LIMIT_COMPOUND_SELECT, even if the VALUES clause contains + elements that appear to be variables due to + double-quoted string literals. +
  4. Fix the window function version of group_concat() so that it returns + an empty string if it has one or more empty string inputs. +
  5. In FTS5 secure-delete mode, fix false-positive + integrity-check reports about corrupt indexes. +
  6. Syntax errors in ALTER TABLE should always return SQLITE_ERROR. In + some cases, they were formerly returning SQLITE_INTERNAL. +
  7. JavaScript/WASM: +
      +
    1. Fix a corruption-causing bug in the JavaScript "opfs" VFS. +
    2. Work around a couple of browser-specific OPFS quirks. +
    +
  8. Other minor fixes. +

    Hashes: +

  9. SQLITE_SOURCE_ID: 2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33 +
  10. SHA3-256 for sqlite3.c: 186a1baa476b6d546de155160ca6d30ff7b7e6ee375f0bb6445e1a3d180a7dad + +

2024-05-23 (3.46.0)

  1. Enhance PRAGMA optimize in multiple ways, to make it @@ -345,7 +374,7 @@ See the chronology a succinct listing of releases. by PRAGMA integrity_check.
  2. SQLITE_USE_SEH (Structured Exception Handling) is now enabled by default whenever SQLite is built using the Microsoft C compiler. It can be disabled using - -DSQLITE_USE_SEH=0 + -DSQLITE_OMIT_SEH.
  3. Query planner optimizations:
    1. In partial index scans, if the WHERE clause implies a constant value for a table diff --git a/www/chronology.html b/www/chronology.html index e638413..2fd1d5d 100644 --- a/www/chronology.html +++ b/www/chronology.html @@ -125,6 +125,8 @@ antiRobotDefense(); DateVersion +2024-08-13 +3.46.1 2024-05-23 3.46.0 2024-04-15 @@ -947,8 +949,8 @@ var t = new SortableTable(document.getElementById("chrontab"),"nK",1);

      -349 releases -over 23.8 years. +350 releases +over 24.0 years.

      This page last modified on 2023-03-03 01:19:02 UTC

      diff --git a/www/cli.html b/www/cli.html index 773c353..e99e497 100644 --- a/www/cli.html +++ b/www/cli.html @@ -1945,16 +1945,19 @@ script to run under --safe mode.

      23.2. The --unsafe-testing command-line option

      -

      The --unsafe-testing command-line option supports use of the CLI for -internal testing of the SQLite library. It is not needed or useful for using -the CLI as a utility for creating, modifying or querying SQLite databases. -Its intended use is to permit scripted testing with direct schema changes, -defensive measures defeated, and certain special-purpose, undocumented, -test-oriented dot-commands enabled. +

      The --unsafe-testing command-line option enables features of the CLI +that are intended for internal testing only. The --unsafe-testing option +disables defenses that are built into SQLite. Examples of +that are disabled defenses include SQLITE_DBCONFIG_DEFENSIVE and +SQLITE_DBCONFIG_TRUSTED_SCHEMA. +The --unsafe-testing option also enables features that, if misused, might +cause database corruption, memory errors, or +similar problems in the CLI itself or in the SQLite library. +Example of features that --unsafe-testing enables include +the .imposter dot-command and SQLITE_TESTCTRL_ASSERT.

      -Misbehavior which requires use of the --unsafe-testing option to be induced -will generally not be considered a bug for that reason alone. CLI behavior -with --unsafe-testing is not supported or defined. +Misbehavior which requires use of the --unsafe-testing option +will generally not be considered a bug.

      23.3. The --no-utf8 and --utf8 command-line options

      @@ -2046,5 +2049,5 @@ provide a full-featured command-line shell:
    2. -DSQLITE_ENABLE_FTS4
    3. -DSQLITE_ENABLE_FTS5
    4. -

      This page last modified on 2024-04-16 17:22:18 UTC

      + diff --git a/www/compile.html b/www/compile.html index 9d93392..fb2ae67 100644 --- a/www/compile.html +++ b/www/compile.html @@ -1485,15 +1485,9 @@ the available settings:

      makes use of this to provide enhanced logs of VFS activity.

      SQLITE_USE_SEH

      - This option enabled Structured Exception Handling (SEH) on Windows builds. - SEH is a Windows-specific technique for catching exceptions raised while - accessing a memory-mapped file. SEH is used to intercept errors that might - occur while accessing the memory-mapped shm file that are part of - WAL mode processing. If the operating system raised errors while SQLite - is trying to access the shm file, this option causes those errors to be - caught and dealt with by SQLite, rather than aborting the whole process. -

      - This option only works when compiling on Windows using MSVC. + This option used to be a toggle to enable what is now controlled + by SQLITE_OMIT_SEH. Client code should not use this define, + as it is used internally by the library.

      SQLITE_HAVE_ZLIB

      This option causes some extensions to link against the @@ -1921,6 +1915,18 @@ The SQLITE_OMIT_* compile-time options are mostly unsupported.

      This compile-time option is recommended most applications as it results in improved performance and reduced library footprint. +

      +

      SQLITE_OMIT_SEH

      + If defined, Structured Exception Handling (SEH) is disabled on + Windows builds. SEH is a Windows-specific technique for catching + exceptions raised while accessing a memory-mapped file. SEH is used + to intercept errors that might occur while accessing the + memory-mapped shm file that are part of WAL mode processing. If + the operating system raised errors while SQLite is trying to access + the shm file, this option causes those errors to be caught and dealt + with by SQLite, rather than aborting the whole process. +

      + This has no effect except when compiling on Windows using MSVC.

      SQLITE_OMIT_SUBQUERY

      If defined, support for sub-selects and the IN() operator are omitted. @@ -2139,5 +2145,5 @@ macros is included for completeness.

      This macro may not be used in combination with any of SQLITE_APICALL, SQLITE_CALLBACK, SQLITE_CDECL or SQLITE_SYSAPI.

      -

      This page last modified on 2024-05-09 08:10:19 UTC

      +

      This page last modified on 2024-06-05 13:57:35 UTC

      diff --git a/www/cves.html b/www/cves.html index 75b22da..c87bf42 100644 --- a/www/cves.html +++ b/www/cves.html @@ -235,7 +235,7 @@ behind CVEs is sound. They provide a common naming scheme whereby software bugs that might compromise information security can be easily tracked. -

      While the original idea being CVEs is sound, the current processes for +

      While the original idea behind CVEs is sound, the current processes for creating and managing CVEs are inadequate. There are countless grey-hat hackers running fuzzers against a wide-variety of open-source software products (SQLite as well as many others) and writing up CVEs against @@ -779,5 +779,5 @@ be added. - +

      This page last modified on 2024-07-02 11:43:42 UTC

      diff --git a/www/doc_backlink_crossref.html b/www/doc_backlink_crossref.html index 8abf1fd..dec0611 100644 --- a/www/doc_backlink_crossref.html +++ b/www/doc_backlink_crossref.html @@ -287,6 +287,7 @@ antiRobotDefense(); releaselog/3_38_4.html releaselog/3_38_5.html
    5. .imposter dot-command → changes.html#version_3_16_0 + cli.html#testing_mode releaselog/3_16_0.html releaselog/3_16_1.html releaselog/3_16_2.html @@ -404,6 +405,7 @@ antiRobotDefense(); changes.html#version_3_25_0 changes.html#version_3_26_0 changes.html#version_3_38_0 + changes.html#version_3_46_1 changes.html#version_3_7_9 changes.html#version_3_8_7_1 compile.html#omit_altertable @@ -433,6 +435,7 @@ antiRobotDefense(); releaselog/3_38_3.html releaselog/3_38_4.html releaselog/3_38_5.html + releaselog/3_46_1.html releaselog/3_7_9.html releaselog/3_8_7_1.html schematab.html @@ -516,6 +519,7 @@ antiRobotDefense(); releaselog/3_11_1.html
    6. ambiguous dates → changes.html#version_3_46_0 releaselog/3_46_0.html + releaselog/3_46_1.html
    7. American Fuzzy Lop fuzzer → changes.html#version_3_8_10 releaselog/3_8_10.html releaselog/3_8_10_1.html @@ -523,6 +527,7 @@ antiRobotDefense();
    8. analysis_limit → lang_analyze.html#approx
    9. analysis_limit pragma → changes.html#version_3_46_0 releaselog/3_46_0.html + releaselog/3_46_1.html
    10. ANALYZE → appfileformat.html c3ref/stmt_scanstatus.html capi3ref.html#sqlite3_stmt_scanstatus @@ -1319,6 +1324,7 @@ antiRobotDefense(); releaselog/3_45_2.html releaselog/3_45_3.html releaselog/3_46_0.html + releaselog/3_46_1.html releaselog/3_4_0.html releaselog/3_4_1.html releaselog/3_4_2.html @@ -1994,6 +2000,7 @@ antiRobotDefense(); releaselog/3_45_2.html releaselog/3_45_3.html releaselog/3_46_0.html + releaselog/3_46_1.html releaselog/3_4_0.html releaselog/3_4_1.html releaselog/3_4_2.html @@ -2207,6 +2214,7 @@ antiRobotDefense(); releaselog/3_7_9.html
    11. covering index → changes.html#version_3_11_0 changes.html#version_3_41_0 + changes.html#version_3_46_1 changes.html#version_3_7_14 eqp.html fullsql.html @@ -2216,6 +2224,7 @@ antiRobotDefense(); releaselog/3_41_0.html releaselog/3_41_1.html releaselog/3_41_2.html + releaselog/3_46_1.html releaselog/3_7_14.html
    12. covering indexes → changes.html#version_3_40_0 releaselog/3_40_0.html @@ -2631,6 +2640,7 @@ antiRobotDefense(); releaselog/3_43_1.html releaselog/3_43_2.html releaselog/3_46_0.html + releaselog/3_46_1.html
    13. date/time special case → changes.html#version_3_20_0 releaselog/3_20_0.html releaselog/3_20_1.html @@ -2819,6 +2829,8 @@ antiRobotDefense(); releaselog/3_27_1.html releaselog/3_27_2.html releaselog/3_29_0.html +
    14. double-quoted string literals → changes.html#version_3_46_1 + releaselog/3_46_1.html
    15. double-quoted string misfeature → changes.html#version_3_41_0 releaselog/3_41_0.html releaselog/3_41_1.html @@ -3561,6 +3573,7 @@ antiRobotDefense(); changes.html#version_3_43_0 changes.html#version_3_44_0 changes.html#version_3_45_0 + changes.html#version_3_46_1 changes.html#version_3_8_11 changes.html#version_3_9_0 cves.html#cvetab @@ -3596,6 +3609,7 @@ antiRobotDefense(); releaselog/3_45_1.html releaselog/3_45_2.html releaselog/3_45_3.html + releaselog/3_46_1.html releaselog/3_8_11.html releaselog/3_8_11_1.html releaselog/3_9_0.html @@ -3657,8 +3671,10 @@ antiRobotDefense();
    16. FTS5 query syntax → fts5.html
    17. FTS5 rank configuration option → fts5.html#sorting_by_auxiliary_function_results
    18. FTS5 secure-delete command → changes.html#version_3_42_0 + changes.html#version_3_46_1 news.html releaselog/3_42_0.html + releaselog/3_46_1.html
    19. fts5 shadow tables → vtab.html#xshadowname
    20. FTS5 snippet → fts5.html#_auxiliary_functions_
    21. fts5 technical differences → fts5.html#appendix_a @@ -3667,8 +3683,10 @@ antiRobotDefense(); releaselog/3_45_1.html releaselog/3_45_2.html releaselog/3_45_3.html -
    22. FTS5 tokenizers → fts5.html#fts5_phrases +
    23. FTS5 tokenizers → changes.html#version_3_46_1 + fts5.html#fts5_phrases fts5.html#fts5_table_creation_and_initialization + releaselog/3_46_1.html
    24. FTS5 usermerge option → fts5.html#the_merge_command
    25. fts5vocab → changes.html#version_3_15_0 fts5.html#appendix_a @@ -3814,8 +3832,10 @@ antiRobotDefense(); releaselog/3_39_2.html releaselog/3_39_3.html releaselog/3_39_4.html -
    26. group_concat → changes.html#version_3_6_14_1 +
    27. group_concat → changes.html#version_3_46_1 + changes.html#version_3_6_14_1 lang_aggfunc.html#aggfunclist + releaselog/3_46_1.html releaselog/3_6_14_1.html
    28. GROUPS frames → changes.html#version_3_28_0 releaselog/3_28_0.html @@ -4197,6 +4217,8 @@ antiRobotDefense(); releaselog/3_35_3.html releaselog/3_35_4.html releaselog/3_35_5.html +
    29. https://sqlite.org/forum/forumpost/171bcc2bcd → changes.html#version_3_46_1 + releaselog/3_46_1.html
    30. https://sqlite.org/forum/forumpost/174afeae5734d42d → changes.html#version_3_39_1 releaselog/3_39_1.html releaselog/3_39_2.html @@ -4260,6 +4282,8 @@ antiRobotDefense(); releaselog/3_35_3.html releaselog/3_35_4.html releaselog/3_35_5.html +
    31. https://sqlite.org/forum/forumpost/e60e4c295d22f8ce → changes.html#version_3_46_1 + releaselog/3_46_1.html
    32. https://sqlite.org/forum/forumpost/f935c4708dd528d9 → cves.html#cvetab
    33. https://sqlite.org/optoverview.html#flattening → news.html
    34. https://sqlite.org/sqlar → sqlar.html#cltools @@ -5689,6 +5713,7 @@ antiRobotDefense();
    35. json_pretty → changes.html#version_3_46_0 news.html releaselog/3_46_0.html + releaselog/3_46_1.html
    36. json_quote → changes.html#version_3_14 json1.html#howtocompile releaselog/3_14.html @@ -6211,6 +6236,7 @@ antiRobotDefense(); releaselog/3_30_1.html
    37. numeric literals → changes.html#version_3_46_0 releaselog/3_46_0.html + releaselog/3_46_1.html
    38. numeric-literal → lang_expr.html#litvalue
    39. object resolution → lang_dropview.html
    40. octet_length → changes.html#version_3_43_0 @@ -6858,6 +6884,7 @@ antiRobotDefense(); releaselog/3_18_1.html releaselog/3_18_2.html releaselog/3_46_0.html + releaselog/3_46_1.html
    41. PRAGMA page_count → changes.html#version_3_6_1 pragma.html#toc releaselog/3_6_0.html @@ -7667,6 +7694,7 @@ antiRobotDefense(); imposter.html lang_corefunc.html#last_insert_rowid lang_vacuum.html#howvacuumworks + quirks.html rbu.html#database_tables vtab.html#worid
    42. rowid → c3ref/blob_open.html @@ -7752,6 +7780,7 @@ antiRobotDefense();
    43. Run-Time Loadable Extensions → cli.html#dotload
    44. running ANALYZE via PRAGMA optimize → changes.html#version_3_46_0 releaselog/3_46_0.html + releaselog/3_46_1.html
    45. safe command-line option → changes.html#version_3_40_1 news.html releaselog/3_40_1.html @@ -7977,7 +8006,7 @@ antiRobotDefense(); capi3ref.html#sqlitefcntltrace
    46. shm file → changes.html#version_3_33_0 changes.html#version_3_43_0 - compile.html#use_seh + compile.html#omit_seh releaselog/3_33_0.html releaselog/3_43_0.html releaselog/3_43_1.html @@ -10354,6 +10383,7 @@ antiRobotDefense(); capi3ref.html#sqlite3_stmt_explain changes.html#version_3_26_0 changes.html#version_3_41_0 + changes.html#version_3_46_1 cintro.html cli.html#dotrules faq.html#q15 @@ -10371,6 +10401,7 @@ antiRobotDefense(); releaselog/3_41_0.html releaselog/3_41_1.html releaselog/3_41_2.html + releaselog/3_46_1.html rescode.html#schema stmt.html unlock_notify.html @@ -12848,6 +12879,7 @@ antiRobotDefense(); changes.html#version_3_39_4 changes.html#version_3_40_0 changes.html#version_3_44_0 + cli.html#testing_mode dbpage.html pragma.html#pragma_journal_mode pragma.html#pragma_schema_version @@ -12980,6 +13012,7 @@ antiRobotDefense(); capi3ref.html capi3ref.html#sqliteinnocuous changes.html#version_3_31_0 + cli.html#testing_mode compile.html#trusted_schema pragma.html#pragma_trusted_schema releaselog/3_31_0.html @@ -13444,9 +13477,11 @@ antiRobotDefense(); capi3ref.html#sqliteconfigmutex capi3ref.html#sqliteconfigserialized capi3ref.html#sqliteconfigsinglethread + changes.html#version_3_46_1 changes.html#version_3_6_15 changes.html#version_3_6_5 changes.html#version_3_7_5 + releaselog/3_46_1.html releaselog/3_6_15.html releaselog/3_6_5.html releaselog/3_7_5.html @@ -13844,6 +13879,8 @@ antiRobotDefense(); capi3ref.html#sqlite3_value_blob
    47. SQLITE_INTERNAL → c3ref/constlist.html capi3ref.html + changes.html#version_3_46_1 + releaselog/3_46_1.html rescode.html#pve
    48. SQLITE_INTERRUPT → c3ref/constlist.html c3ref/get_autocommit.html @@ -14101,9 +14138,11 @@ antiRobotDefense(); limits.html#max_column
    49. SQLITE_LIMIT_COMPOUND_SELECT → c3ref/constlist.html capi3ref.html + changes.html#version_3_46_1 changes.html#version_3_8_8 lang_select.html#values limits.html#max_compound_select + releaselog/3_46_1.html releaselog/3_8_8.html releaselog/3_8_8_1.html releaselog/3_8_8_2.html @@ -14572,6 +14611,11 @@ antiRobotDefense();
    50. SQLITE_OMIT_PRAGMA → howtocompile.html#amal
    51. SQLITE_OMIT_PROGRESS_CALLBACK → compile.html#rcmd
    52. SQLITE_OMIT_REINDEX → howtocompile.html#amal +
    53. SQLITE_OMIT_SEH → changes.html#version_3_44_0 + compile.html#use_seh + releaselog/3_44_0.html + releaselog/3_44_1.html + releaselog/3_44_2.html
    54. SQLITE_OMIT_SHARED_CACHE → compile.html#rcmd
    55. SQLITE_OMIT_SUBQUERY → howtocompile.html#amal
    56. SQLITE_OMIT_TEMPDB → howtocompile.html#amal @@ -15162,6 +15206,7 @@ antiRobotDefense(); testing.html#defcode
    57. SQLITE_TESTCTRL_ASSERT → c3ref/constlist.html capi3ref.html + cli.html#testing_mode
    58. SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS → c3ref/constlist.html capi3ref.html
    59. SQLITE_TESTCTRL_BITVEC_TEST → c3ref/constlist.html @@ -15486,8 +15531,10 @@ antiRobotDefense(); releaselog/3_44_1.html releaselog/3_44_2.html releaselog/3_46_0.html + releaselog/3_46_1.html
    60. STRICT → datatype3.html#affname lang_createtable.html#primkeyconst + quirks.html
    61. STRICT table → pragma.html#pragma_table_list
    62. STRICT tables → changes.html#version_3_37_0 datatype3.html @@ -15607,7 +15654,7 @@ antiRobotDefense(); releaselog/3_9_2.html releaselog/3_9_3.html vtab.html#epoonlyvtab - vtab.html#obc + vtab.html#erpotvf vtab.html#xshadowname vtablist.html
    63. table-valued functions in the FROM clause → dbstat.html @@ -15698,6 +15745,7 @@ antiRobotDefense(); releaselog/3_38_4.html releaselog/3_38_5.html releaselog/3_46_0.html + releaselog/3_46_1.html
    64. the - operator → json1.html#jobj json1.html#jset json1.html#varg @@ -16038,6 +16086,7 @@ antiRobotDefense(); compile.html#enable_unlock_notify
    65. utc and localtime modifiers → changes.html#version_3_46_0 releaselog/3_46_0.html + releaselog/3_46_1.html
    66. utc modifier → changes.html#version_3_10_0 deterministic.html#dtexception releaselog/3_10_0.html @@ -16121,10 +16170,12 @@ antiRobotDefense();
    67. VALUES → lang_select.html lang_select.html#compound lang_select.html#orderby -
    68. VALUES clause → changes.html#version_3_8_3 +
    69. VALUES clause → changes.html#version_3_46_1 + changes.html#version_3_8_3 changes.html#version_3_8_8 lang_select.html#limitoffset oldnews.html + releaselog/3_46_1.html releaselog/3_8_3.html releaselog/3_8_8.html releaselog/3_8_8_1.html @@ -16407,6 +16458,7 @@ antiRobotDefense();
    70. version 3.45.2 → chronology.html
    71. version 3.45.3 → chronology.html
    72. version 3.46.0 → chronology.html +
    73. version 3.46.1 → chronology.html
    74. version 3.5.0 → 35to36.html c3ref/enable_shared_cache.html c3ref/vfs.html @@ -16790,7 +16842,6 @@ antiRobotDefense(); uri.html uri.html#coreqp uri.html#urivfs - wal.html#advantages wal.html#bigwal wal.html#fast walformat.html @@ -17083,8 +17134,8 @@ antiRobotDefense(); changes.html#version_3_8_6 compile.html#default_journal_size_limit compile.html#default_wal_synchronous + compile.html#omit_seh compile.html#rcmd - compile.html#use_seh fasterthanfs.html fileformat2.html formatchng.html @@ -17135,7 +17186,6 @@ antiRobotDefense(); walformat.html#nbackfill
    75. WAL without shared memory → howtocorrupt.html#fakeusb pragma.html#pragma_locking_mode - wal.html#advantages
    76. wal-index → vfs.html wal.html#advantages wal.html#bigwal @@ -17158,6 +17208,7 @@ antiRobotDefense(); releaselog/3_13_0.html releaselog/3_42_0.html releaselog/3_46_0.html + releaselog/3_46_1.html releaselog/3_9_0.html releaselog/3_9_1.html releaselog/3_9_2.html @@ -17167,9 +17218,11 @@ antiRobotDefense(); releaselog/3_28_0.html
    77. window function → appfunc.html changes.html#version_3_27_2 + changes.html#version_3_46_1 news.html optoverview.html#flattening releaselog/3_27_2.html + releaselog/3_46_1.html
    78. Window functions → appfunc.html
    79. window functions → appfunc.html changes.html#version_3_25_0 diff --git a/www/doc_keyword_crossref.html b/www/doc_keyword_crossref.html index 4177a3b..0da8eac 100644 --- a/www/doc_keyword_crossref.html +++ b/www/doc_keyword_crossref.html @@ -115,5 +115,5 @@ antiRobotGo(); } antiRobotDefense(); -

      This page last modified on 2023-03-31 19:57:15 UTC

      +

      This page last modified on 2023-03-31 19:57:15 UTC

      diff --git a/www/doc_pagelink_crossref.html b/www/doc_pagelink_crossref.html index 3208c37..ea9ee52 100644 --- a/www/doc_pagelink_crossref.html +++ b/www/doc_pagelink_crossref.html @@ -202,7 +202,7 @@ antiRobotDefense();
    80. c3ref/c_config_covering_index_scan.htmlc3ref/c_status_malloc_count.html c3ref/config.html c3ref/constlist.html c3ref/hard_heap_limit64.html c3ref/log.html c3ref/mem_methods.html c3ref/mutex_alloc.html c3ref/mutex_methods.html c3ref/open.html c3ref/pcache_methods2.html c3ref/threadsafe.html c3ref/value.html capi3ref.html compile.html custombuild.html debugging.html errlog.html keyword_index.html lang_vacuum.html malloc.html mmap.html pragma.html security.html testing.html threadsafe.html uri.html
    81. c3ref/c_dbconfig_defensive.html → -appfunc.html c3ref/c_config_covering_index_scan.html c3ref/c_deterministic.html c3ref/constlist.html c3ref/db_config.html c3ref/enable_load_extension.html c3ref/load_extension.html capi3ref.html compile.html dbpage.html fts3.html keyword_index.html lang_altertable.html loadext.html malloc.html pragma.html queryplanner-ng.html quirks.html security.html vtab.html
    82. +appfunc.html c3ref/c_config_covering_index_scan.html c3ref/c_deterministic.html c3ref/constlist.html c3ref/db_config.html c3ref/enable_load_extension.html c3ref/load_extension.html capi3ref.html cli.html compile.html dbpage.html fts3.html keyword_index.html lang_altertable.html loadext.html malloc.html pragma.html queryplanner-ng.html quirks.html security.html vtab.html
    83. c3ref/c_dbstatus_options.htmlc3ref/c_dbconfig_defensive.html c3ref/constlist.html c3ref/db_status.html capi3ref.html keyword_index.html malloc.html memstat.html pragma.html
    84. c3ref/c_deny.html → @@ -252,7 +252,7 @@ antiRobotDefense();
    85. c3ref/c_sync_dataonly.htmlc3ref/constlist.html c3ref/io_methods.html capi3ref.html keyword_index.html
    86. c3ref/c_testctrl_always.html → -c3ref/constlist.html capi3ref.html keyword_index.html testing.html
    87. +c3ref/constlist.html capi3ref.html cli.html keyword_index.html testing.html
    88. c3ref/c_trace.htmlc3ref/constlist.html c3ref/trace_v2.html capi3ref.html keyword_index.html
    89. c3ref/c_txn_none.html → @@ -682,7 +682,7 @@ antiRobotDefense();
    90. hp1.htmlsitemap.html
    91. imposter.html → -doclist.html keyword_index.html sitemap.html
    92. +cli.html doclist.html keyword_index.html sitemap.html
    93. index.htmlconsortium.html doclist.html sitemap.html
    94. inmemorydb.html → diff --git a/www/doc_target_crossref.html b/www/doc_target_crossref.html index dfcbedd..03d6ec8 100644 --- a/www/doc_target_crossref.html +++ b/www/doc_target_crossref.html @@ -723,6 +723,7 @@ antiRobotDefense();
    95. compile.html#omit_reindex → -DSQLITE_OMIT_REINDEX SQLITE_OMIT_REINDEX
    96. compile.html#omit_schema_pragmas → -DSQLITE_OMIT_SCHEMA_PRAGMAS SQLITE_OMIT_SCHEMA_PRAGMAS
    97. compile.html#omit_schema_version_pragmas → -DSQLITE_OMIT_SCHEMA_VERSION_PRAGMAS SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
    98. +
    99. compile.html#omit_seh → -DSQLITE_OMIT_SEH SQLITE_OMIT_SEH
    100. compile.html#omit_shared_cache → -DSQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_SHARED_CACHE
    101. compile.html#omit_subquery → -DSQLITE_OMIT_SUBQUERY SQLITE_OMIT_SUBQUERY
    102. compile.html#omit_tcl_variable → -DSQLITE_OMIT_TCL_VARIABLE SQLITE_OMIT_TCL_VARIABLE
    103. @@ -1312,7 +1313,7 @@ antiRobotDefense();
    104. optoverview.html#omitnoopjoin → {omit-left-join optimization} {omit-outer-join optimization}
    105. optoverview.html#or_opt → {OR optimization} {or optimization}
    106. optoverview.html#partsort → {sorting subsets of the result}
    107. -
    108. optoverview.html#pushdown → {WHERE-clause push-down optimization} {push-down optimization}
    109. +
    110. optoverview.html#pushdown → {WHERE-clause push-down optimization} {predicate push-down} {push-down optimization}
    111. optoverview.html#rangequery → {range query optimization}
    112. optoverview.html#skipscan → skip-scan {skip-scan optimization}
    113. optoverview.html#uplus → upluscontrol
    114. @@ -1417,7 +1418,7 @@ antiRobotDefense();
    115. queryplanner.html#sorting → sorting
    116. quickstart.html → {Quick Start Guide} quickstart
    117. quirks.html → Quirks
    118. -
    119. quirks.html#dblquote → {double-quoted string literal} {double-quoted string misfeature}
    120. +
    121. quirks.html#dblquote → {double-quoted string literal} {double-quoted string literals} {double-quoted string misfeature}
    122. rbu.html → RBU {RBU extension}
    123. rbu.html#database_contents → {RBU Database Contents}
    124. rbu.html#database_tables → {RBU Database Tables}
    125. @@ -1561,6 +1562,7 @@ antiRobotDefense();
    126. releaselog/3_45_2.html → {Version 3.45.2} {version 3.45.2}
    127. releaselog/3_45_3.html → {Version 3.45.3} {version 3.45.3}
    128. releaselog/3_46_0.html → {Version 3.46.0} {version 3.46.0}
    129. +
    130. releaselog/3_46_1.html → {Version 3.46.1} {version 3.46.1}
    131. releaselog/3_4_0.html → {Version 3.4.0} {version 3.4.0}
    132. releaselog/3_4_1.html → {Version 3.4.1} {version 3.4.1}
    133. releaselog/3_4_2.html → {Version 3.4.2} {version 3.4.2}
    134. diff --git a/www/fileformat.html b/www/fileformat.html index f6fb7cc..8a9bcb6 100644 --- a/www/fileformat.html +++ b/www/fileformat.html @@ -250,21 +250,21 @@ in production.

      At any point in time, every page in the main database has a single use which is one of the following:

        -
      • The lock-byte page -
      • A freelist page -
          -
        • A freelist trunk page -
        • A freelist leaf page -
        -
      • A b-tree page +
      • A b-tree page
        • A table b-tree interior page
        • A table b-tree leaf page
        • An index b-tree interior page
        • An index b-tree leaf page
        +
      • A freelist page +
          +
        • A freelist trunk page +
        • A freelist leaf page +
      • A payload overflow page
      • A pointer map page +
      • The lock-byte page
      @@ -274,15 +274,6 @@ are also usually an integer number of pages in size, with the one exception that when the database is first opened, the first 100 bytes of the database file (the database file header) are read as a sub-page size unit.

      -

      Before any information-bearing page of the database is modified, -the original unmodified content of that page is written into the -rollback journal. If a transaction is interrupted and needs to be -rolled back, the rollback journal can then be used to restore the -database to its original state. Freelist leaf pages bear no -information that would need to be restored on a rollback and so they -are not written to the journal prior to modification, in order to -reduce disk I/O.

      -

      1.3. The Database Header

      @@ -520,7 +511,10 @@ The format version number can be made to default to 1 instead of 4 by setting SQLITE_DEFAULT_FILE_FORMAT=1 at compile-time.

      -

      1.3.11. Suggested cache size

      +

      If the database is completely empty, if it has no schema, then the +schema format number can be zero. + +

      1.3.11. Suggested cache size

      The 4-byte big-endian signed integer at offset 48 is the suggested cache size in pages for the database file. The value is a suggestion @@ -1842,9 +1836,19 @@ file and has the same name as the database file but with the string associated with a give database and hence there can only be one write transaction open against a single database at one time.

      -

      If a transaction is aborted due to an application crash, an operating -system crash, or a hardware power failure or crash, then the database may -be left in an inconsistent state. The next time SQLite attempts to open +

      Before any information-bearing page of the database is modified, +the original unmodified content of that page is written into the +rollback journal. If a transaction is interrupted and needs to be +rolled back, the rollback journal can then be used to restore the +database to its original state. Freelist leaf pages bear no +information that would need to be restored on a rollback and so they +are not written to the journal prior to modification, in order to +reduce disk I/O.

      + +

      If a transaction is aborted due to an application crash, or a single, +or an operating system crash, or a hardware power failure or crash, then +the main database file might be left in an inconsistent state. +The next time SQLite attempts to open the database file, the presence of the rollback journal file will be detected and the journal will be automatically played back to restore the database to its state at the start of the incomplete transaction.

      @@ -2201,5 +2205,5 @@ file, and since the wal-index is a transient structure, no further information about the format of the wal-index will be provided here. Additional details on the format of the wal-index are contained in the separate WAL-index File Format document.

      -

      This page last modified on 2024-04-20 09:25:12 UTC

      +

      This page last modified on 2024-07-24 10:03:34 UTC

      diff --git a/www/fileformat2.html b/www/fileformat2.html index f6fb7cc..8a9bcb6 100644 --- a/www/fileformat2.html +++ b/www/fileformat2.html @@ -250,21 +250,21 @@ in production.

      At any point in time, every page in the main database has a single use which is one of the following:

        -
      • The lock-byte page -
      • A freelist page -
          -
        • A freelist trunk page -
        • A freelist leaf page -
        -
      • A b-tree page +
      • A b-tree page
        • A table b-tree interior page
        • A table b-tree leaf page
        • An index b-tree interior page
        • An index b-tree leaf page
        +
      • A freelist page +
          +
        • A freelist trunk page +
        • A freelist leaf page +
      • A payload overflow page
      • A pointer map page +
      • The lock-byte page
      @@ -274,15 +274,6 @@ are also usually an integer number of pages in size, with the one exception that when the database is first opened, the first 100 bytes of the database file (the database file header) are read as a sub-page size unit.

      -

      Before any information-bearing page of the database is modified, -the original unmodified content of that page is written into the -rollback journal. If a transaction is interrupted and needs to be -rolled back, the rollback journal can then be used to restore the -database to its original state. Freelist leaf pages bear no -information that would need to be restored on a rollback and so they -are not written to the journal prior to modification, in order to -reduce disk I/O.

      -

      1.3. The Database Header

      @@ -520,7 +511,10 @@ The format version number can be made to default to 1 instead of 4 by setting SQLITE_DEFAULT_FILE_FORMAT=1 at compile-time.

      -

      1.3.11. Suggested cache size

      +

      If the database is completely empty, if it has no schema, then the +schema format number can be zero. + +

      1.3.11. Suggested cache size

      The 4-byte big-endian signed integer at offset 48 is the suggested cache size in pages for the database file. The value is a suggestion @@ -1842,9 +1836,19 @@ file and has the same name as the database file but with the string associated with a give database and hence there can only be one write transaction open against a single database at one time.

      -

      If a transaction is aborted due to an application crash, an operating -system crash, or a hardware power failure or crash, then the database may -be left in an inconsistent state. The next time SQLite attempts to open +

      Before any information-bearing page of the database is modified, +the original unmodified content of that page is written into the +rollback journal. If a transaction is interrupted and needs to be +rolled back, the rollback journal can then be used to restore the +database to its original state. Freelist leaf pages bear no +information that would need to be restored on a rollback and so they +are not written to the journal prior to modification, in order to +reduce disk I/O.

      + +

      If a transaction is aborted due to an application crash, or a single, +or an operating system crash, or a hardware power failure or crash, then +the main database file might be left in an inconsistent state. +The next time SQLite attempts to open the database file, the presence of the rollback journal file will be detected and the journal will be automatically played back to restore the database to its state at the start of the incomplete transaction.

      @@ -2201,5 +2205,5 @@ file, and since the wal-index is a transient structure, no further information about the format of the wal-index will be provided here. Additional details on the format of the wal-index are contained in the separate WAL-index File Format document.

      -

      This page last modified on 2024-04-20 09:25:12 UTC

      +

      This page last modified on 2024-07-24 10:03:34 UTC

      diff --git a/www/flextypegood.html b/www/flextypegood.html index 5810ff4..8c7bea8 100644 --- a/www/flextypegood.html +++ b/www/flextypegood.html @@ -422,12 +422,6 @@ it is very easy to spot the problem and find all affected rows. But type enforcement is no help in preventing a bug where the customer family name and given name are reversed, since both are text fields. -

      (Aside: Decades ago, I worked on a team where there was a woman -named "Merritt Tracy". "Merritt" was her given name and "Tracy" was -her family name. She reported that she spent an inordinate amount of -time and energy trying to correct databases that had "Tracy" as her -given name and "Merritt" as her family name.) -

      By suppressing easy-to-detect errors and passing through only the hard-to-detect errors, rigid type enforcement can actually make it more difficult to find and fix bugs. Data errors tend to cluster. If you have @@ -491,5 +485,5 @@ datatype if not complete SQLite-style type flexibility. stores a single well-defined type. But occasionally you will run across situations where having a flexible type system makes the solution to your problem cleaner and easier. -

      This page last modified on 2024-04-06 13:49:08 UTC

      +

      This page last modified on 2024-07-14 22:39:43 UTC

      diff --git a/www/floatingpoint.html b/www/floatingpoint.html index 06909b2..f1a5a1a 100644 --- a/www/floatingpoint.html +++ b/www/floatingpoint.html @@ -476,5 +476,5 @@ sqlite> select decimal(47.49); │ '47.49000000000000198951966012828052043914794921875' │ └──────────────────────────────────────────────────────┘ - +

      This page last modified on 2024-07-25 10:34:20 UTC

      diff --git a/www/fts5.html b/www/fts5.html index 1793f2c..b6cd6ab 100644 --- a/www/fts5.html +++ b/www/fts5.html @@ -3898,5 +3898,5 @@ using FTS5. the amount of processing that may take place within any given INSERT, UPDATE or DELETE operation.

      -

      This page last modified on 2024-05-22 18:42:01 UTC

      +

      This page last modified on 2024-07-24 12:26:57 UTC

      diff --git a/www/fullsql.html b/www/fullsql.html index 87c3650..1c1b90e 100644 --- a/www/fullsql.html +++ b/www/fullsql.html @@ -183,5 +183,5 @@ SQL implementation, including: There are many more features not listed above. SQLite may be small in size and have "Lite" in its name, but it is not lacking in capability. -

      This page last modified on 2022-05-10 17:29:14 UTC

      +

      diff --git a/www/index.html b/www/index.html index 55e8d59..5a99fee 100644 --- a/www/index.html +++ b/www/index.html @@ -189,7 +189,7 @@ is in the public-domain and is free to everyone to use for any purpose.

      Latest Release

      -Version 3.46.0 (2024-05-23). +Version 3.46.1 (2024-08-13). Download Prior Releases @@ -284,5 +284,5 @@ by SQLite Consortium members, including:



      -

      This page last modified on 2024-04-15 13:35:54 UTC

      +

      This page last modified on 2024-08-10 18:17:30 UTC

      diff --git a/www/json1.html b/www/json1.html index f768fd6..8e48ac5 100644 --- a/www/json1.html +++ b/www/json1.html @@ -1635,5 +1635,5 @@ SELECT DISTINCT json_extract(big.json,'$.id') WHERE json_tree.key='uuid' AND json_tree.value='6fa5181e-5721-11e5-a04e-57f3d7b32808'; -

      This page last modified on 2024-05-05 15:23:53 UTC

      +

      This page last modified on 2024-07-25 15:06:57 UTC

      diff --git a/www/keyword_index.html b/www/keyword_index.html index b437dee..b88cfcf 100644 --- a/www/keyword_index.html +++ b/www/keyword_index.html @@ -662,6 +662,7 @@ Other Documentation Indexes:
    135. -DSQLITE_OMIT_REINDEX
    136. -DSQLITE_OMIT_SCHEMA_PRAGMAS
    137. -DSQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
    138. +
    139. -DSQLITE_OMIT_SEH
    140. -DSQLITE_OMIT_SHARED_CACHE
    141. -DSQLITE_OMIT_SUBQUERY
    142. -DSQLITE_OMIT_TCL_VARIABLE
    143. @@ -1325,6 +1326,7 @@ Other Documentation Indexes:
    144. pragma-value syntax diagram
    145. pragma_list pragma
    146. precompiled amalgamation tarballs
    147. +
    148. predicate push-down
    149. prefix queries
    150. prefix query
    151. prepared statement
    152. @@ -2443,6 +2445,7 @@ Other Documentation Indexes:
    153. SQLITE_OMIT_REINDEX
    154. SQLITE_OMIT_SCHEMA_PRAGMAS
    155. SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
    156. +
    157. SQLITE_OMIT_SEH
    158. SQLITE_OMIT_SHARED_CACHE
    159. SQLITE_OMIT_SUBQUERY
    160. SQLITE_OMIT_TCL_VARIABLE
    161. @@ -3050,6 +3053,7 @@ Other Documentation Indexes:
    162. Version 3.45.2
    163. Version 3.45.3
    164. Version 3.46.0
    165. +
    166. Version 3.46.1
    167. Version 3.5.0
    168. Version 3.5.1
    169. Version 3.5.2
    170. diff --git a/www/lang_createtrigger.html b/www/lang_createtrigger.html index 99b8205..b342ad5 100644 --- a/www/lang_createtrigger.html +++ b/www/lang_createtrigger.html @@ -4451,5 +4451,5 @@ CREATE TEMP TRIGGER ex1 AFTER INSERT ON main.tab1 BEGIN ...

      Failure to specify the schema name on the target table could result in the TEMP trigger being reattached to a table with the same name in another database whenever any schema change occurs.

      - +

      This page last modified on 2024-08-03 15:33:40 UTC

      diff --git a/www/lang_expr.html b/www/lang_expr.html index 7edca23..72c9036 100644 --- a/www/lang_expr.html +++ b/www/lang_expr.html @@ -163,8 +163,8 @@ mk.innerHTML = "►";

      1. Syntax

      expr: -

      -
      +

      +
      @@ -645,8 +645,8 @@ mk.innerHTML = "►";

      filter-clause: -

      -
    -

    7. Does Not Do Full Unicode Case Folding By Default

    +

    7. SQLite Does Not Do Full Unicode Case Folding By Default

    SQLite does not know about the upper-case/lower-case distinction @@ -398,13 +409,13 @@ for all unicode characters. SQL functions like upper() and lower() only work on ASCII characters. There are two reasons for this:

      -
    1. Though stable now, when SQLite was first designed, the rules for +
    2. Though stable now, when SQLite was first designed, the rules for unicode case folding were still in flux. That means that the behavior might have changed with each new unicode release, disrupting applications and corrupting indexes in the process. -

    3. The tables necessary to do full and proper unicode case folding are +

    4. The tables necessary to do full and proper unicode case folding are larger than the whole SQLite library. -

    +

Full unicode case folding is supported in SQLite if it is compiled with the -DSQLITE_ENABLE_ICU option and linked against the @@ -558,7 +569,7 @@ In other words, a FROM clause like this: ... FROM a, b RIGHT JOIN c, d ...

-

This FROM clause should be parsed as follows: +

Should be parsed as follows:

@@ -634,5 +645,5 @@ the problem can be easily overcome using parentheses in the FROM clause:

... FROM a, (b RIGHT JOIN c), d ...

-

This page last modified on 2024-05-22 18:42:01 UTC

+

This page last modified on 2024-08-10 18:17:30 UTC

diff --git a/www/releaselog/3_44_0.html b/www/releaselog/3_44_0.html index b0192ae..b9b9d74 100644 --- a/www/releaselog/3_44_0.html +++ b/www/releaselog/3_44_0.html @@ -143,7 +143,7 @@ antiRobotDefense(); by PRAGMA integrity_check.
  • SQLITE_USE_SEH (Structured Exception Handling) is now enabled by default whenever SQLite is built using the Microsoft C compiler. It can be disabled using - -DSQLITE_USE_SEH=0 + -DSQLITE_OMIT_SEH.
  • Query planner optimizations:
    1. In partial index scans, if the WHERE clause implies a constant value for a table diff --git a/www/releaselog/3_44_1.html b/www/releaselog/3_44_1.html index 681b840..bbed107 100644 --- a/www/releaselog/3_44_1.html +++ b/www/releaselog/3_44_1.html @@ -144,7 +144,7 @@ antiRobotDefense(); by PRAGMA integrity_check.
    2. SQLITE_USE_SEH (Structured Exception Handling) is now enabled by default whenever SQLite is built using the Microsoft C compiler. It can be disabled using - -DSQLITE_USE_SEH=0 + -DSQLITE_OMIT_SEH.
    3. Query planner optimizations:
      1. In partial index scans, if the WHERE clause implies a constant value for a table diff --git a/www/releaselog/3_44_2.html b/www/releaselog/3_44_2.html index 1e173f5..3be0d89 100644 --- a/www/releaselog/3_44_2.html +++ b/www/releaselog/3_44_2.html @@ -144,7 +144,7 @@ antiRobotDefense(); by PRAGMA integrity_check.
      2. SQLITE_USE_SEH (Structured Exception Handling) is now enabled by default whenever SQLite is built using the Microsoft C compiler. It can be disabled using - -DSQLITE_USE_SEH=0 + -DSQLITE_OMIT_SEH.
      3. Query planner optimizations:
        1. In partial index scans, if the WHERE clause implies a constant value for a table diff --git a/www/releaselog/3_46_1.html b/www/releaselog/3_46_1.html new file mode 100644 index 0000000..1cf4b65 --- /dev/null +++ b/www/releaselog/3_46_1.html @@ -0,0 +1,201 @@ + + + + + +SQLite Release 3.46.1 On 2024-08-13 + + + +
          + + + +
          +
          +Small. Fast. Reliable.
          Choose any three. +
          + + +
          +
          + + + +
          +
          +
          + +

          SQLite Release 3.46.1 On 2024-08-13

          Prior changes from version 3.46.0 (2024-05-23):

          +

            +
          1. Enhance PRAGMA optimize in multiple ways, to make it + simpler to use: +
              +
            1. PRAGMA optimize automatically implements a temporary + analysis limit to prevent excess runtime + on large databases. +
            2. Added the new 0x10000 bitmask option to check for updates on all tables. +
            3. Automatically re-analyze tables that do not have sqlite_stat1 entries. +
            +
          2. Enhancements to the date and time functions: +
              +
            1. The strftime() SQL function now supports %G, %g, %U, and %V. +
            2. New modifiers 'ceiling' and 'floor' control the algorithm used to + resolve ambiguous dates when shifting a date by an integer number + of months and/or years. +
            3. The 'utc' and 'localtime' modifiers are now no-ops if SQLite knows + that the time is already in UTC or in the localtime, respectively. +
            +
          3. Add support for underscore ("_") characters between digits in + numeric literals. +
          4. Add the json_pretty() SQL function. +
          5. Query planner improvements: +
              +
            1. The "VALUES-as-coroutine" optimization enables INSERT statements with + thousands of rows in the VALUES clause to parse and run in about half + the time and using about half as much memory. +
            2. Allow the use of an index for queries like "SELECT count(DISTINCT col) FROM ...", + even if the index records are not smaller than the table records. +
            3. Improved recognition of cases where the value of an SQL function is + constant because all its arguments are constant. +
            4. Enhance the WHERE-clause push-down optimization so that it is able to + push down WHERE clause terms containing uncorrelated subqueries. +
            +
          6. Allocate additional memory from the heap for the SQL parser stack if + that stack overflows, rather than reporting a "parser stack overflow" error. +
          7. JSON changes: +
              +
            1. Allow ASCII control characters within JSON5 string literals. +
            2. Fix the -> and ->> operators so that when the right-hand side operand is a string + that looks like an integer it is still treated as a string, because that is what + PostgreSQL does. +
            +
          8. Allow large hexadecimal literals to be used as the DEFAULT value to a table column. +
          +

          Changes in this specific patch release, version 3.46.1 (2024-08-13):

          +

            +
          1. Improved robustness while parsing the tokenize= arguments in FTS5. + Forum post 171bcc2bcd. +
          2. Enhancements to covering index prediction in the query planner. + Add early detection of over-prediction of covering indexes so that + sqlite3_prepare() will return an error rather than just generate bad bytecode. + Forum post e60e4c295d22f8ce. +
          3. Do not let the number of terms on a VALUES clause be limited by + SQLITE_LIMIT_COMPOUND_SELECT, even if the VALUES clause contains + elements that appear to be variables due to + double-quoted string literals. +
          4. Fix the window function version of group_concat() so that it returns + an empty string if it has one or more empty string inputs. +
          5. In FTS5 secure-delete mode, fix false-positive + integrity-check reports about corrupt indexes. +
          6. Syntax errors in ALTER TABLE should always return SQLITE_ERROR. In + some cases, they were formerly returning SQLITE_INTERNAL. +
          7. JavaScript/WASM: +
              +
            1. Fix a corruption-causing bug in the JavaScript "opfs" VFS. +
            2. Work around a couple of browser-specific OPFS quirks. +
            +
          8. Other minor fixes. +

            Hashes: +

          9. SQLITE_SOURCE_ID: 2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33 +
          10. SHA3-256 for sqlite3.c: 186a1baa476b6d546de155160ca6d30ff7b7e6ee375f0bb6445e1a3d180a7dad + +

          + +

          A complete list of SQLite releases + in a single page and a chronology are both also available. + A detailed history of every + check-in is available at + + SQLite version control site.

          + + diff --git a/www/releaselog/current.html b/www/releaselog/current.html index 5996306..1cf4b65 100644 --- a/www/releaselog/current.html +++ b/www/releaselog/current.html @@ -3,7 +3,7 @@ -SQLite Release 3.46.0 On 2024-05-23 +SQLite Release 3.46.1 On 2024-08-13 @@ -115,8 +115,9 @@ antiRobotGo(); } antiRobotDefense(); -

          SQLite Release 3.46.0 On 2024-05-23

            -
          1. Enhance PRAGMA optimize in multiple ways, to make it +

            SQLite Release 3.46.1 On 2024-08-13

            Prior changes from version 3.46.0 (2024-05-23):

            +

              +
            1. Enhance PRAGMA optimize in multiple ways, to make it simpler to use:
              1. PRAGMA optimize automatically implements a temporary @@ -159,9 +160,34 @@ antiRobotDefense(); PostgreSQL does.
            2. Allow large hexadecimal literals to be used as the DEFAULT value to a table column. +
            +

            Changes in this specific patch release, version 3.46.1 (2024-08-13):

            +

              +
            1. Improved robustness while parsing the tokenize= arguments in FTS5. + Forum post 171bcc2bcd. +
            2. Enhancements to covering index prediction in the query planner. + Add early detection of over-prediction of covering indexes so that + sqlite3_prepare() will return an error rather than just generate bad bytecode. + Forum post e60e4c295d22f8ce. +
            3. Do not let the number of terms on a VALUES clause be limited by + SQLITE_LIMIT_COMPOUND_SELECT, even if the VALUES clause contains + elements that appear to be variables due to + double-quoted string literals. +
            4. Fix the window function version of group_concat() so that it returns + an empty string if it has one or more empty string inputs. +
            5. In FTS5 secure-delete mode, fix false-positive + integrity-check reports about corrupt indexes. +
            6. Syntax errors in ALTER TABLE should always return SQLITE_ERROR. In + some cases, they were formerly returning SQLITE_INTERNAL. +
            7. JavaScript/WASM: +
                +
              1. Fix a corruption-causing bug in the JavaScript "opfs" VFS. +
              2. Work around a couple of browser-specific OPFS quirks. +
              +
            8. Other minor fixes.

              Hashes: -

            9. SQLITE_SOURCE_ID: 2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e -
            10. SHA3-256 for sqlite3.c: 094429ea827fcd32275e767134bc6c7b9ea394a2c5a9e653dd0a0690b2c11358 +
            11. SQLITE_SOURCE_ID: 2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33 +
            12. SHA3-256 for sqlite3.c: 186a1baa476b6d546de155160ca6d30ff7b7e6ee375f0bb6445e1a3d180a7dad

            diff --git a/www/rescode.html b/www/rescode.html index 2f3cbd2..d0141c5 100644 --- a/www/rescode.html +++ b/www/rescode.html @@ -376,10 +376,11 @@ in numeric order. result code. If application does encounter this result code, it shows that there is a bug in the database engine.

            - SQLite does not currently generate this result code. + This result code might be caused by a bug in SQLite. However, application-defined SQL functions or - virtual tables, or VFSes, or other extensions might cause this - result code to be returned. + virtual tables, or VFSes, or other extensions can also cause this + result code to be returned, so the problem might not be the fault + of the core SQLite. @@ -1557,5 +1558,5 @@ in numeric order. -

            This page last modified on 2023-09-14 14:42:56 UTC

            +

            This page last modified on 2024-08-10 18:17:30 UTC

            diff --git a/www/search.d/search.db b/www/search.d/search.db index 31a4392..f9b545c 100644 Binary files a/www/search.d/search.db and b/www/search.d/search.db differ diff --git a/www/sessionintro.html b/www/sessionintro.html index efde36f..f16fa1f 100644 --- a/www/sessionintro.html +++ b/www/sessionintro.html @@ -505,7 +505,7 @@ above for details.

            /*
             ** Conflict handler callback used by apply_changeset(). See below.
             */
            -static int xConflict(void *pCtx, int eConflict, sqlite3_changset_iter *pIter){
            +static int xConflict(void *pCtx, int eConflict, sqlite3_changeset_iter *pIter){
               int ret = (int)pCtx;
               return ret;
             }
            @@ -647,5 +647,5 @@ available for the use and manipulation of changeset and patchset blobs:
                    original. If changeset C+ is the inverse of changeset C, then
                    applying C and then C+ to a database should leave
                    the database unchanged.
            -

          2. +

            This page last modified on 2024-06-01 14:57:22 UTC

            diff --git a/www/toc.db b/www/toc.db index 1a64014..6736a50 100644 Binary files a/www/toc.db and b/www/toc.db differ diff --git a/www/vtab.html b/www/vtab.html index b007ce3..9fcbbb9 100644 --- a/www/vtab.html +++ b/www/vtab.html @@ -249,8 +249,8 @@ virtual table implementations.

            A virtual table is created using a CREATE VIRTUAL TABLE statement.

            create-virtual-table-stmt: -

            -
            +

            +
            @@ -1319,6 +1319,8 @@ SQLITE_CONSTRAINT, that means there is no way for the virtual table to be safely used, and the sqlite3_prepare() call will fail with a "no query solution" error. + +

            2.3.4. Enforcing Required Parameters On Table-Valued Functions

            The SQLITE_CONSTRAINT return from xBestIndex @@ -2043,5 +2045,5 @@ In that same release, the xIntegrity method was added to many built-in virtual tables, such as FTS3, FTS5, and RTREE so that the content of those tables will henceforth be automatically checked for consistency when PRAGMA integrity_check is run. -

            This page last modified on 2023-12-05 14:43:20 UTC

            +

            diff --git a/www/wal.html b/www/wal.html index 2e32dba..ed46f5c 100644 --- a/www/wal.html +++ b/www/wal.html @@ -187,14 +187,10 @@ a rollback journal. Advantages include:

            But there are also disadvantages:

              -
            1. WAL normally requires that the VFS - support shared-memory primitives. - (Exception: WAL without shared memory) - The built-in unix and windows VFSes - support this but third-party extension VFSes for custom operating - systems might not. -
            2. All processes using a database must be on the same host computer; - WAL does not work over a network filesystem. +
            3. All processes using a database must be on the same host computer; + WAL does not work over a network filesystem. This is because WAL requires + all processes to share a small amount of memory and processes on + separate host machines obviously cannot share memory with each other.
            4. Transactions that involve changes against multiple ATTACHed databases are atomic for each individual database, but are not atomic across all databases as a set. @@ -750,5 +746,5 @@ PRAGMA journal_mode=DELETE;

              Deliberately changing out of WAL mode changes the database file format version numbers back to 1 so that older versions of SQLite can once again access the database file.

              -

              This page last modified on 2024-02-13 18:06:21 UTC

              +

              This page last modified on 2024-07-14 23:07:20 UTC

              -- cgit v1.2.3