Hello community, here is the log from the commit of package sqlite3 for openSUSE:Factory checked in at 2020-01-23 16:10:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sqlite3 (Old) and /work/SRC/openSUSE:Factory/.sqlite3.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sqlite3" Thu Jan 23 16:10:23 2020 rev:116 rq:765985 version:3.30.1 Changes: -------- --- /work/SRC/openSUSE:Factory/sqlite3/sqlite3.changes 2019-09-25 01:13:59.581818632 +0200 +++ /work/SRC/openSUSE:Factory/.sqlite3.new.26092/sqlite3.changes 2020-01-23 16:11:18.139649645 +0100 @@ -1,0 +2,49 @@ +Fri Jan 17 14:29:39 UTC 2020 - Stefan BrĂ¼ns <[email protected]> + +- Fix regression found when running python-Django/Djano1 testsuite: + + 7833feecfe-Prevent-SQLite-from-bad-NULL-assumption.patch + + 548082dfab-Improvements-to-the-LEFT-JOIN.patch + + 8a39167bd2-Further-improvements-to-LEFT-JOIN.patch +- Fix check for existing dirs, triggers when running the testsuite + on BTRFS or XFS: + + fix_dir_exists_on_btrfs.patch +- Fix truncation/bad rounding of timestamps in SQLite strftime + function, exposed when running testsuite on i586: + + sqlite3-avoid-truncation-error.patch + +------------------------------------------------------------------- +Fri Oct 11 15:05:00 UTC 2019 - Andreas Stieger <[email protected]> + +- sqlite 3.30.1: + * fix a segfault for nested queries that use the FILTER clause + ib aggregate functions (introduced in 3.30.0) + +------------------------------------------------------------------- +Sun Oct 6 15:43:57 UTC 2019 - Andreas Stieger <[email protected]> + +- update to 3.30.0: + * Add support for the FILTER clause on aggregate functions + * Add support for the NULLS FIRST and NULLS LAST syntax in ORDER BY clauses + * The index_info and index_xinfo pragmas are enhanced to provide + information about the on-disk representation of WITHOUT ROWID tables + * Add the sqlite3_drop_modules() interface, allowing applications + to disable automatically loaded virtual tables that they do not need + * Improvements to the .recover dot-command in the CLI so that it + recovers more content from corrupt database files + * Enhance the RBU extension to support indexes on expressions + * Change the schema parser so that it will error out if any of + the type, name, and tbl_name columns of the sqlite_master table + have been corrupted and the database connection is not in + writable_schema mode. + * The PRAGMA function_list, PRAGMA module_list, and PRAGMA + pragma_list commands are now enabled in all builds by default + * Add the SQLITE_DBCONFIG_ENABLE_VIEW option for sqlite3_db_config(). + * Added the TCL Interface config method in order to be able to + disable SQLITE_DBCONFIG_ENABLE_VIEW as well as control other + sqlite3_db_config() options from TCL. + * Added the SQLITE_DIRECTONLY flag for application-defined SQL + functions to prevent those functions from being used inside + triggers and views +- drop sqlite3-CVE-2019-16168.patch, upstream + +------------------------------------------------------------------- Old: ---- sqlite-doc-3290000.zip sqlite-src-3290000.zip sqlite3-CVE-2019-16168.patch New: ---- 548082dfab-Improvements-to-the-LEFT-JOIN.patch 7833feecfe-Prevent-SQLite-from-bad-NULL-assumption.patch 8a39167bd2-Further-improvements-to-LEFT-JOIN.patch fix_dir_exists_on_btrfs.patch sqlite-doc-3300100.zip sqlite-src-3300100.zip sqlite3-avoid-truncation-error.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sqlite3.spec ++++++ --- /var/tmp/diff_new_pack.tamTlY/_old 2020-01-23 16:11:20.639651127 +0100 +++ /var/tmp/diff_new_pack.tamTlY/_new 2020-01-23 16:11:20.643651129 +0100 @@ -1,7 +1,7 @@ # # spec file for package sqlite3 # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,10 +16,11 @@ # +%bcond_with icu %define oname sqlite -%define tarversion 3290000 +%define tarversion 3300100 Name: sqlite3 -Version: 3.29.0 +Version: 3.30.1 Release: 0 Summary: Embeddable SQL Database Engine License: SUSE-Public-Domain @@ -28,8 +29,20 @@ Source0: http://www.sqlite.org/2019/sqlite-src-%{tarversion}.zip Source1: baselibs.conf Source2: http://www.sqlite.org/2019/sqlite-doc-%{tarversion}.zip -Patch0: sqlite3-CVE-2019-16168.patch +# PATCH-FIX-UPSTREAM -- Fix errors with NULL +Patch0: 7833feecfe-Prevent-SQLite-from-bad-NULL-assumption.patch +# PATCH-FIX-UPSTREAM -- Fix errors in LEFT JOIN +Patch1: 548082dfab-Improvements-to-the-LEFT-JOIN.patch +# PATCH-FIX-UPSTREAM -- Fix errors in LEFT JOIN +Patch2: 8a39167bd2-Further-improvements-to-LEFT-JOIN.patch +# PATCH-FIX-UPSTREAM -- Fix incorrect check of stat.size for directories +Patch3: fix_dir_exists_on_btrfs.patch +# PATCH-FIX-OPENSUSE -- Fix error introduced by rounding and truncation, mostly visible on x86 / 80 bit floats +Patch4: sqlite3-avoid-truncation-error.patch BuildRequires: automake +%if %{with icu} +BuildRequires: libicu-devel +%endif BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: readline-devel @@ -104,13 +117,19 @@ %prep %setup -q -n sqlite-src-%{tarversion} -a2 -%patch0 +%patch0 -p0 +%patch1 -p0 +%patch2 -p0 +%patch3 -p0 +%patch4 -p0 + rm -v sqlite-doc-%{tarversion}/releaselog/current.html ln -sv `echo %{version} | sed "s/\./_/g"`.html sqlite-doc-%{tarversion}/releaselog/current.html find -type f -name sqlite.css~ -delete +cmp sqlite-doc-%{tarversion}/fileformat{,2}.html && ln -sf fileformat.html sqlite-doc-%{tarversion}/fileformat2.html %build -export LIBS="$LIBS -lm " +export LIBS="$LIBS -lm %{?with_icu:-licuuc -licui18n}" export CFLAGS="%{optflags} \ -DSQLITE_ENABLE_API_ARMOR \ -DSQLITE_ENABLE_COLUMN_METADATA \ @@ -119,6 +138,9 @@ -DSQLITE_ENABLE_FTS3 \ -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_FTS5 \ +%if %{with icu} + -DSQLITE_ENABLE_ICU \ +%endif -DSQLITE_ENABLE_JSON1 \ -DSQLITE_ENABLE_RBU \ -DSQLITE_ENABLE_RTREE \ @@ -140,12 +162,8 @@ make %{?_smp_mflags} sqlite3.c make %{?_smp_mflags} -%ifnarch %{ix86} -# Tests fail due to slight precision variation caused by FPU being 80-bit internally. -# see https://bugs.gentoo.org/628242 %check make %{?_smp_mflags} test -%endif %install %make_install ++++++ 548082dfab-Improvements-to-the-LEFT-JOIN.patch ++++++ Index: src/expr.c ================================================================== --- src/expr.c +++ src/expr.c @@ -5229,12 +5229,16 @@ ** ordinary join. */ int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab){ Walker w; p = sqlite3ExprSkipCollateAndLikely(p); - if( p && p->op==TK_NOTNULL ){ + if( p==0 ) return 0; + if( p->op==TK_NOTNULL ){ p = p->pLeft; + }else if( p->op==TK_AND ){ + if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1; + p = p->pRight; } w.xExprCallback = impliesNotNullRow; w.xSelectCallback = 0; w.xSelectCallback2 = 0; w.eCode = 0; ++++++ 7833feecfe-Prevent-SQLite-from-bad-NULL-assumption.patch ++++++ Index: src/expr.c ================================================================== --- src/expr.c +++ src/expr.c @@ -5166,14 +5166,15 @@ return WRC_Abort; } return WRC_Prune; case TK_AND: - if( sqlite3ExprImpliesNonNullRow(pExpr->pLeft, pWalker->u.iCur) - && sqlite3ExprImpliesNonNullRow(pExpr->pRight, pWalker->u.iCur) - ){ - pWalker->eCode = 1; + assert( pWalker->eCode==0 ); + sqlite3WalkExpr(pWalker, pExpr->pLeft); + if( pWalker->eCode ){ + pWalker->eCode = 0; + sqlite3WalkExpr(pWalker, pExpr->pRight); } return WRC_Prune; case TK_BETWEEN: sqlite3WalkExpr(pWalker, pExpr->pLeft); @@ -5228,19 +5229,12 @@ ** ordinary join. */ int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab){ Walker w; p = sqlite3ExprSkipCollateAndLikely(p); - while( p ){ - if( p->op==TK_NOTNULL ){ - p = p->pLeft; - }else if( p->op==TK_AND ){ - if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1; - p = p->pRight; - }else{ - break; - } + if( p && p->op==TK_NOTNULL ){ + p = p->pLeft; } w.xExprCallback = impliesNotNullRow; w.xSelectCallback = 0; w.xSelectCallback2 = 0; w.eCode = 0; Index: test/join.test ================================================================== --- test/join.test +++ test/join.test @@ -902,8 +902,38 @@ } {1 {}} do_execsql_test join-18.4 { SELECT NOT(v0.a IS FALSE) FROM v0 } {1} + +#------------------------------------------------------------------------- +reset_db +do_execsql_test join-19.0 { + CREATE TABLE t1(a); + CREATE TABLE t2(b); + INSERT INTO t1(a) VALUES(0); + CREATE VIEW v0(c) AS SELECT t2.b FROM t1 LEFT JOIN t2; +} + +do_execsql_test join-19.1 { + SELECT * FROM v0 WHERE v0.c NOTNULL NOTNULL; +} {{}} + +do_execsql_test join-19.2 { + SELECT * FROM t1 LEFT JOIN t2 +} {0 {}} + +do_execsql_test join-19.3 { + SELECT * FROM t1 LEFT JOIN t2 WHERE (b IS NOT NULL) IS NOT NULL; +} {0 {}} + +do_execsql_test join-19.4 { + SELECT (b IS NOT NULL) IS NOT NULL FROM t1 LEFT JOIN t2 +} {1} + +do_execsql_test join-19.5 { + SELECT * FROM t1 LEFT JOIN t2 WHERE + (b IS NOT NULL AND b IS NOT NULL) IS NOT NULL; +} {0 {}} finish_test ++++++ 8a39167bd2-Further-improvements-to-LEFT-JOIN.patch ++++++ Index: src/expr.c ================================================================== --- src/expr.c +++ src/expr.c @@ -5232,13 +5232,15 @@ Walker w; p = sqlite3ExprSkipCollateAndLikely(p); if( p==0 ) return 0; if( p->op==TK_NOTNULL ){ p = p->pLeft; - }else if( p->op==TK_AND ){ - if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1; - p = p->pRight; + }else{ + while( p->op==TK_AND ){ + if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1; + p = p->pRight; + } } w.xExprCallback = impliesNotNullRow; w.xSelectCallback = 0; w.xSelectCallback2 = 0; w.eCode = 0; ++++++ fix_dir_exists_on_btrfs.patch ++++++ --- src/os_unix.c_orig 2019-12-26 00:56:55.810897741 +0100 +++ src/os_unix.c 2019-12-26 00:59:29.904449135 +0100 @@ -6259,7 +6259,8 @@ if( flags==SQLITE_ACCESS_EXISTS ){ struct stat buf; - *pResOut = (0==osStat(zPath, &buf) && buf.st_size>0); + *pResOut = (0==osStat(zPath, &buf) && + ((buf.st_size>0) || S_ISDIR(buf.st_mode))); }else{ *pResOut = osAccess(zPath, W_OK|R_OK)==0; } ++++++ sqlite3-avoid-truncation-error.patch ++++++ Index: src/date.c ================================================================== --- src/date.c +++ src/date.c @@ -686,11 +686,11 @@ */ if( sqlite3_stricmp(z, "unixepoch")==0 && p->rawS ){ r = p->s*1000.0 + 210866760000000.0; if( r>=0.0 && r<464269060800000.0 ){ clearYMD_HMS_TZ(p); - p->iJD = (sqlite3_int64)r; + p->iJD = (sqlite3_int64)(r + 0.5); p->validJD = 1; p->rawS = 0; rc = 0; } }
