From 358762e70c4aaf48b347ca1257f323b7022325dca7df330d449a79ece2d79232 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Sun, 26 Jan 2020 17:11:11 +0000 Subject: [PATCH] Accepting request 766693 from home:AndreasStieger:branches:server:database SQLite 3.31.0 OBS-URL: https://build.opensuse.org/request/show/766693 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=238 --- ...82dfab-Improvements-to-the-LEFT-JOIN.patch | 23 ----- ...vent-SQLite-from-bad-NULL-assumption.patch | 91 ------------------- ...d2-Further-improvements-to-LEFT-JOIN.patch | 24 ----- fix_dir_exists_on_btrfs.patch | 12 --- sqlite-doc-3300100.zip | 3 - sqlite-doc-3310000.zip | 3 + sqlite-src-3300100.zip | 3 - sqlite-src-3310000.zip | 3 + sqlite3-avoid-truncation-error.patch | 18 ---- sqlite3.changes | 13 +++ sqlite3.spec | 25 +---- 11 files changed, 24 insertions(+), 194 deletions(-) delete mode 100644 548082dfab-Improvements-to-the-LEFT-JOIN.patch delete mode 100644 7833feecfe-Prevent-SQLite-from-bad-NULL-assumption.patch delete mode 100644 8a39167bd2-Further-improvements-to-LEFT-JOIN.patch delete mode 100644 fix_dir_exists_on_btrfs.patch delete mode 100644 sqlite-doc-3300100.zip create mode 100644 sqlite-doc-3310000.zip delete mode 100644 sqlite-src-3300100.zip create mode 100644 sqlite-src-3310000.zip delete mode 100644 sqlite3-avoid-truncation-error.patch diff --git a/548082dfab-Improvements-to-the-LEFT-JOIN.patch b/548082dfab-Improvements-to-the-LEFT-JOIN.patch deleted file mode 100644 index 0399157..0000000 --- a/548082dfab-Improvements-to-the-LEFT-JOIN.patch +++ /dev/null @@ -1,23 +0,0 @@ -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; - diff --git a/7833feecfe-Prevent-SQLite-from-bad-NULL-assumption.patch b/7833feecfe-Prevent-SQLite-from-bad-NULL-assumption.patch deleted file mode 100644 index d7bc71f..0000000 --- a/7833feecfe-Prevent-SQLite-from-bad-NULL-assumption.patch +++ /dev/null @@ -1,91 +0,0 @@ -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 - - diff --git a/8a39167bd2-Further-improvements-to-LEFT-JOIN.patch b/8a39167bd2-Further-improvements-to-LEFT-JOIN.patch deleted file mode 100644 index 571993f..0000000 --- a/8a39167bd2-Further-improvements-to-LEFT-JOIN.patch +++ /dev/null @@ -1,24 +0,0 @@ -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; - diff --git a/fix_dir_exists_on_btrfs.patch b/fix_dir_exists_on_btrfs.patch deleted file mode 100644 index 062ec1c..0000000 --- a/fix_dir_exists_on_btrfs.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- 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; - } diff --git a/sqlite-doc-3300100.zip b/sqlite-doc-3300100.zip deleted file mode 100644 index ef0cb7c..0000000 --- a/sqlite-doc-3300100.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:10f585ad8c631c47187510a895944ac47e8f6f23b1171aebc8f8ce6c0c650415 -size 9485342 diff --git a/sqlite-doc-3310000.zip b/sqlite-doc-3310000.zip new file mode 100644 index 0000000..beaaa68 --- /dev/null +++ b/sqlite-doc-3310000.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff85a209f7ab92c2c1c5ec100ca5aded8094c7f34768111df7294a3ca3f50607 +size 9586441 diff --git a/sqlite-src-3300100.zip b/sqlite-src-3300100.zip deleted file mode 100644 index 974081e..0000000 --- a/sqlite-src-3300100.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4690370737189149c9e8344414aa371f89a70e3744ba317cef1a49fb0ee81ce1 -size 12648162 diff --git a/sqlite-src-3310000.zip b/sqlite-src-3310000.zip new file mode 100644 index 0000000..f469e5d --- /dev/null +++ b/sqlite-src-3310000.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4dc0af8327a010aae00167b41ea6630347e7fb39892cb9374bdeb97f0d0e3b7 +size 12510000 diff --git a/sqlite3-avoid-truncation-error.patch b/sqlite3-avoid-truncation-error.patch deleted file mode 100644 index 5c0062f..0000000 --- a/sqlite3-avoid-truncation-error.patch +++ /dev/null @@ -1,18 +0,0 @@ -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; - } - } - diff --git a/sqlite3.changes b/sqlite3.changes index 365284c..dbf27e2 100644 --- a/sqlite3.changes +++ b/sqlite3.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Jan 23 18:58:04 UTC 2020 - Andreas Stieger + +- SQLite 3.31.0: + * add support for generated columns + * various fixes and improvements +- drop upstreamed patches: + * 8a39167bd2-Further-improvements-to-LEFT-JOIN.patch + * fix_dir_exists_on_btrfs.patch + * 7833feecfe-Prevent-SQLite-from-bad-NULL-assumption.patch + * 548082dfab-Improvements-to-the-LEFT-JOIN.patch + * sqlite3-avoid-truncation-error.patch + ------------------------------------------------------------------- Fri Jan 17 14:29:39 UTC 2020 - Stefan BrĂ¼ns diff --git a/sqlite3.spec b/sqlite3.spec index cd9f69d..27d4676 100644 --- a/sqlite3.spec +++ b/sqlite3.spec @@ -1,7 +1,7 @@ # # spec file for package sqlite3 # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,27 +18,17 @@ %bcond_with icu %define oname sqlite -%define tarversion 3300100 +%define tarversion 3310000 Name: sqlite3 -Version: 3.30.1 +Version: 3.31.0 Release: 0 Summary: Embeddable SQL Database Engine License: SUSE-Public-Domain Group: Productivity/Databases/Servers URL: http://www.sqlite.org/ -Source0: http://www.sqlite.org/2019/sqlite-src-%{tarversion}.zip +Source0: http://www.sqlite.org/2020/sqlite-src-%{tarversion}.zip Source1: baselibs.conf -Source2: http://www.sqlite.org/2019/sqlite-doc-%{tarversion}.zip -# 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 +Source2: http://www.sqlite.org/2020/sqlite-doc-%{tarversion}.zip BuildRequires: automake %if %{with icu} BuildRequires: libicu-devel @@ -117,11 +107,6 @@ other documentation found on sqlite.org. The files can be found in %prep %setup -q -n sqlite-src-%{tarversion} -a2 -%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