From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: Re: [PATCH] sqlite: Update to version 3410200 Date: Mon, 27 Mar 2023 15:19:42 +0200 Message-ID: <7298c41fe0a25cac73cfcb439aa33fa4a2b92a1e.camel@ipfire.org> In-Reply-To: <20230327130147.3424542-2-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8214891715122464132==" List-Id: --===============8214891715122464132== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reviewed-by: Stefan Schantl > - Update from version 3400100 to 3410200 > - Update of rootfile not required > - Changelog > 3.41.2 (2023-03-22): > =C2=A0=C2=A0=C2=A0 Multiple fixes for reads past the end of memory buffers = (NB: > reads not writes) in the > =C2=A0=C2=A0=C2=A0=C2=A0 following circumstances: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 When processing a corrupt databa= se file using the non- > standard SQLITE_ENABLE_STAT4 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 compile-time option. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 In the CLI when the sqlite3_erro= r_offset() routine returns an > out-of-range value > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (see also the fix to sqlit= e3_error_offset() below). > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 In the recovery extension. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 In FTS3 when processing a corrup= t database file. > =C2=A0=C2=A0=C2=A0 Fix the sqlite3_error_offset() so that it does not retur= n out-of- > range values when > =C2=A0=C2=A0=C2=A0=C2=A0 reporting errors associated with generated columns. > =C2=A0=C2=A0=C2=A0 Multiple fixes in the query optimizer for problems that = cause > incorrect results for > =C2=A0=C2=A0=C2=A0=C2=A0 bizarre, fuzzer-generated queries. > =C2=A0=C2=A0=C2=A0 Increase the size of the reference counter in the page c= ache > object to 64 bits to > =C2=A0=C2=A0=C2=A0=C2=A0 ensure that the counter never overflows. > =C2=A0=C2=A0=C2=A0 Fix a performance regression caused by a bug fix in patc= h release > 3.41.1. > =C2=A0=C2=A0=C2=A0 Fix a few incorrect assert() statements. > 3.41.1 (2023-03-10): > =C2=A0=C2=A0=C2=A0 Provide compile-time options -DHAVE_LOG2=3D0 and -DHAVE_= LOG10=3D0 to > enable SQLite to be > =C2=A0=C2=A0=C2=A0=C2=A0 compiled on systems that omit the standard library= functions > log2() and log10(), > =C2=A0=C2=A0=C2=A0=C2=A0 repectively. > =C2=A0=C2=A0=C2=A0 Ensure that the datatype for column t1.x in > =C2=A0=C2=A0=C2=A0=C2=A0 "CREATE TABLE t1 AS SELECT CAST(7 AS INT) AS x;" c= ontinues to be > INT and is not > =C2=A0=C2=A0=C2=A0=C2=A0 NUM, for historical compatibility. > =C2=A0=C2=A0=C2=A0 Enhance PRAGMA integrity_check to detect when extra byte= s appear > at the end of an > =C2=A0=C2=A0=C2=A0=C2=A0 index record. > =C2=A0=C2=A0=C2=A0 Fix various obscure bugs reported by the user community.= See the > timeline of changes > =C2=A0=C2=A0=C2=A0=C2=A0 for details. > 3.41.0 On 2023-02-21 > =C2=A0=C2=A0=C2=A0 Query planner improvements: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Make use of indexed expressions = within an aggregate query > that includes a > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GROUP BY clause. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The query planner has improved a= wareness of when an index is > a covering index > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 and adjusts predicted runt= imes accordingly. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The query planner is more aggres= sive about using co-routines > rather than > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 materializing subqueries a= nd views. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Queries against the built-in tab= le-valued functions > json_tree() and json_each() > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 will now usually treat "OR= DER BY rowid" as a no-op. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Enhance the ability of the query= planner to use indexed > expressions even if the > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 expression has been modifi= ed by the constant-propagation > optimization. (See > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 forum thread 0a539c7.) > =C2=A0=C2=A0=C2=A0 Add the built-in unhex() SQL function. > =C2=A0=C2=A0=C2=A0 Add the base64 and base85 application-defined functions = as an > extension and include > =C2=A0=C2=A0=C2=A0=C2=A0 that extension in the CLI. > =C2=A0=C2=A0=C2=A0 Add the sqlite3_stmt_scanstatus_v2() interface. (This in= terface > is only available if > =C2=A0=C2=A0=C2=A0=C2=A0 SQLite is compiled using SQLITE_ENABLE_STMT_SCANST= ATUS.) > =C2=A0=C2=A0=C2=A0 In-memory databases created using sqlite3_deserialize() = now > report their filename as > =C2=A0=C2=A0=C2=A0=C2=A0 an empty string, not as 'x'. > =C2=A0=C2=A0=C2=A0 Changes to the CLI: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Add the new base64() and base85(= ) SQL functions > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Enhanced EXPLAIN QUERY PLAN outp= ut using the new > sqlite3_stmt_scanstatus_v2() > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 interface when compiled us= ing SQLITE_ENABLE_STMT_SCANSTATUS. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The ".scanstats est" command pro= vides query planner estimates > in profiles. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The continuation prompt indicate= s if the input is currently > inside of a string > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 literal, identifier litera= l, comment, trigger definition, > etc. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Enhance the --safe command-line = option to disallow dangerous > SQL functions. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The double-quoted string misfeat= ure is now disabled by > default for CLI builds. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Legacy use cases can reena= ble the misfeature at run-time > using the > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ".dbconfig dqs_dml on" and= ".dbconfig dqs_ddl on" commands. > =C2=A0=C2=A0=C2=A0 Enhance the PRAGMA integrity_check command so that it de= tects > when text strings in a > =C2=A0=C2=A0=C2=A0=C2=A0 table are equivalent to but not byte-for-byte iden= tical to the > same strings in the > =C2=A0=C2=A0=C2=A0=C2=A0 index. > =C2=A0=C2=A0=C2=A0 Enhance the carray table-valued function so that it is a= ble to > bind an array of BLOB > =C2=A0=C2=A0=C2=A0=C2=A0 objects. > =C2=A0=C2=A0=C2=A0 Added the sqlite3_is_interrupted() interface. > =C2=A0=C2=A0=C2=A0 Long-running calls to sqlite3_prepare() and similar now = invoke > the progress handler > =C2=A0=C2=A0=C2=A0=C2=A0 callback and react to sqlite3_interrupt(). > =C2=A0=C2=A0=C2=A0 The sqlite3_vtab_in_first() and sqlite3_vtab_in_next() f= unctions > are enhanced so > =C2=A0=C2=A0=C2=A0=C2=A0 that they reliably detect if they are invoked on a= parameter > that was not selected > =C2=A0=C2=A0=C2=A0=C2=A0 for multi-value IN processing using sqlite3_vtab_i= n(). They > return SQLITE_ERROR > =C2=A0=C2=A0=C2=A0=C2=A0 instead of SQLITE_MISUSE in this case. > =C2=A0=C2=A0=C2=A0 The parser now ignores excess parentheses around a subqu= ery on > the right-hand side > =C2=A0=C2=A0=C2=A0=C2=A0 of an IN operator, so that SQLite now works the sa= me as > PostgreSQL in this regard. > =C2=A0=C2=A0=C2=A0=C2=A0 Formerly, SQLite treated the subquery as an expres= sion with an > implied "LIMIT 1". > =C2=A0=C2=A0=C2=A0 Added the SQLITE_FCNTL_RESET_CACHE option to the > sqlite3_file_control() API. > =C2=A0=C2=A0=C2=A0 Makefile improvements: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The new makefile target "sqlite3= r.c" builds an amalgamation > that includes the > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 recovery extension. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 New makefile targets "devtest" a= nd "releasetest" for running > a quick > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 developmental test prior t= o doing a check-in and for doing a > full release test, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 respectively. > =C2=A0=C2=A0=C2=A0 Miscellaneous performance enhancements. >=20 > Signed-off-by: Adolf Belka > --- > =C2=A0lfs/sqlite | 6 +++--- > =C2=A01 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/lfs/sqlite b/lfs/sqlite > index 49771ff33..40e7672cb 100644 > --- a/lfs/sqlite > +++ b/lfs/sqlite > @@ -1,7 +1,7 @@ > =C2=A0#################################################################### > ########### > =C2=A0#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0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0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > =C2=A0# This program is free software: you can redistribute it and/or > modify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > =C2=A0# it under the terms of the GNU General Public License as published > by=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # > @@ -24,7 +24,7 @@ > =C2=A0 > =C2=A0include Config > =C2=A0 > -VER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 3400100 > +VER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 3410200 > =C2=A0 > =C2=A0THISAPP=C2=A0=C2=A0=C2=A0 =3D sqlite-autoconf-$(VER) > =C2=A0DL_FILE=C2=A0=C2=A0=C2=A0 =3D $(THISAPP).tar.gz > @@ -40,7 +40,7 @@ objects =3D $(DL_FILE) > =C2=A0 > =C2=A0$(DL_FILE) =3D $(DL_FROM)/$(DL_FILE) > =C2=A0 > -$(DL_FILE)_BLAKE2 =3D > 495ffa185598b11e8258d2bfed88516753c0a13b3a67850f3464a112f225a13db3b75 > e4f977ed549305e05a995074a8c5ef12d65c2b353306e58c098c89b36b6 > +$(DL_FILE)_BLAKE2 =3D > 928134ec28c349bf984705b6296fc01f31028aee17035d38b2c0dbb020ab1a8c431fe > 29092f3742ac68bdd0d3146a42b72404da9a7744209f4ea1f20312cf8c3 > =C2=A0 > =C2=A0install : $(TARGET) > =C2=A0 --===============8214891715122464132==--