From 222abde85f433d905f010bf40d16497bdc0d7ac82c63c34d9485aa49dfe19feb Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 17 Jan 2019 17:17:18 +0000 Subject: [PATCH 1/2] Fix build with Tcl 8.6.9 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=221 --- sqlite3-btree02-100.patch | 55 +++++++++++++++++++++++++++++++++++++++ sqlite3.changes | 6 +++++ sqlite3.spec | 6 +++-- 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 sqlite3-btree02-100.patch diff --git a/sqlite3-btree02-100.patch b/sqlite3-btree02-100.patch new file mode 100644 index 0000000..afd9c3c --- /dev/null +++ b/sqlite3-btree02-100.patch @@ -0,0 +1,55 @@ +Index: test/btree02.test +================================================================== +--- test/btree02.test ++++ test/btree02.test +@@ -19,36 +19,44 @@ + + load_static_extension db eval + do_execsql_test btree02-100 { + CREATE TABLE t1(a TEXT, ax INTEGER, b INT, PRIMARY KEY(a,ax)) WITHOUT ROWID; + WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<10) +- INSERT INTO t1(a,ax,b) SELECT printf('%02x',i), random(), i FROM c; ++ INSERT INTO t1(a,ax,b) SELECT printf('%02x',i+160), random(), i FROM c; + CREATE INDEX t1a ON t1(a); + CREATE TABLE t2(x,y); + CREATE TABLE t3(cnt); + WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<4) + INSERT INTO t3(cnt) SELECT i FROM c; + SELECT count(*) FROM t1; + } {10} ++ ++proc showt1 {} { ++ puts -nonewline "t1: " ++ puts [db eval {SELECT printf('(%s,%s)',quote(a),quote(b)) FROM t1}] ++} ++ + do_test btree02-110 { + db eval BEGIN + set i 0 ++ # showt1 + db eval {SELECT a, ax, b, cnt FROM t1 CROSS JOIN t3 WHERE b IS NOT NULL} { +- if {$a==""} {set a 0} +- if {$b==""} {set b 0} ++ if {$a==""} continue + db eval {INSERT INTO t2(x,y) VALUES($b,$cnt)} + # puts "a,b,cnt = ($a,$b,$cnt)" + incr i + if {$i%2==1} { + set bx [expr {$b+1000}] +- # puts "INSERT ($a),$bx" ++ # puts "INSERT ($a),$bx" + db eval {INSERT INTO t1(a,ax,b) VALUES(printf('(%s)',$a),random(),$bx)} ++ # showt1 + } else { + # puts "DELETE a=$a" + db eval {DELETE FROM t1 WHERE a=$a} ++ # showt1 + } + db eval {COMMIT; BEGIN} + } + db one {COMMIT; SELECT count(*) FROM t1;} +-} {27} ++} {10} + + finish_test + diff --git a/sqlite3.changes b/sqlite3.changes index 0cd20c3..4eabc22 100644 --- a/sqlite3.changes +++ b/sqlite3.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 17 16:58:54 UTC 2019 - Reinhard Max + +- btree02.test depended on Tcl internals that changed in 8.6.9. + (fix-btree02-100.patch) + ------------------------------------------------------------------- Wed Dec 5 12:56:29 UTC 2018 - malte.kraus@suse.com diff --git a/sqlite3.spec b/sqlite3.spec index 60734f1..f089dfd 100644 --- a/sqlite3.spec +++ b/sqlite3.spec @@ -1,7 +1,7 @@ # # spec file for package sqlite3 # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -28,6 +28,7 @@ URL: http://www.sqlite.org/ Source0: http://www.sqlite.org/2018/sqlite-src-%{tarversion}.zip Source1: baselibs.conf Source2: http://www.sqlite.org/2018/sqlite-doc-%{tarversion}.zip +Patch0: sqlite3-btree02-100.patch BuildRequires: automake BuildRequires: libtool BuildRequires: pkgconfig @@ -103,6 +104,7 @@ other documentation found on sqlite.org. The files can be found in %prep %setup -q -n sqlite-src-%{tarversion} -a2 +%patch0 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 From 6fe134e32553b6308873fc384c1cadd59761386691ca04c6cc29812102e6980d Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 17 Jan 2019 17:31:01 +0000 Subject: [PATCH 2/2] (sqlite3-btree02-100.patch) OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=222 --- sqlite3.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite3.changes b/sqlite3.changes index 4eabc22..8e31911 100644 --- a/sqlite3.changes +++ b/sqlite3.changes @@ -2,7 +2,7 @@ Thu Jan 17 16:58:54 UTC 2019 - Reinhard Max - btree02.test depended on Tcl internals that changed in 8.6.9. - (fix-btree02-100.patch) + (sqlite3-btree02-100.patch) ------------------------------------------------------------------- Wed Dec 5 12:56:29 UTC 2018 - malte.kraus@suse.com