Updated to version 3.18.0

Modify sync2.test to pass with DIRSYNC turned off
This commit is contained in:
Petr Kubat 2017-04-03 13:25:44 +02:00
parent 083e37cd70
commit 2beb9f1c3f
3 changed files with 104 additions and 7 deletions

View File

@ -1,3 +1,3 @@
SHA512 (sqlite-autoconf-3170000.tar.gz) = bebf2693ade1c99b6a178bbe663f64911bf7751932a2524506994cbbb19ab254e7febe3693a76084e55853c1ea85db9e4ece87192422583555fbe569915a2ca8 SHA512 (sqlite-autoconf-3180000.tar.gz) = 4c2efda1d63d1849f7a351cc57c02cc1820efe3c19f88460a131a1d6ae4f7411e4b7672a5581055e581093df29f65cebd9ff5b24125c18802523b17477dce1ef
SHA512 (sqlite-doc-3170000.zip) = 6a7813be301416dc59401b7732733f44efad60b458ded0f4ed8d845aab0843a1123dd20d1e6f209dd32184a87bcd7e68e213e3676c43d1d05d2df5acc2c64b74 SHA512 (sqlite-doc-3180000.zip) = 7b65130cb2174d823842cddc912432d206044a8b276fdc2eef437854de7d0b05b8eb5d7aec0ead5c3f88bb7788ae5f1c42ffb1e43ab00774a68f6f7fea72d517
SHA512 (sqlite-src-3170000.zip) = e60381de33fbf566507454e4f1dfb7d3ada554e5c919f05f0dd2f96a6f266adaa62681437f21fdea1c24de57fb6141b798f97854918faa189b507f12f11e0d36 SHA512 (sqlite-src-3180000.zip) = b82c5388066f2e905c067d75e890bf2ff03a522733b8c8e0ebdfffe1804d7ecb39b72f6d808fce59133ac8c645f8b6e163e3dff7bbb0d66bbe8748e069ca7a84

View File

@ -0,0 +1,90 @@
--- sqlite-src-3180000/test/sync2.test.sync2-dirsync 2017-03-30 21:26:42.000000000 +0200
+++ sqlite-src-3180000/test/sync2.test 2017-04-03 13:16:14.422329691 +0200
@@ -44,6 +44,15 @@
uplevel [list do_test $tn [list execsql_sync $sql] [list {*}$res]]
}
+# Wrapper over the expected sync count, takes DIRSYNC into consideration
+proc expected_sync_count {sync_count} {
+ ifcapable dirsync {
+ return $sync_count
+ } else {
+ return [ incr sync_count -1 ]
+ }
+}
+
#-----------------------------------------------------------------------
# Tests for journal mode.
#
@@ -53,13 +62,13 @@
INSERT INTO t1 VALUES(1, 2);
}
-do_execsql_sync_test 1.1 { INSERT INTO t1 VALUES(3, 4) } 4
+do_execsql_sync_test 1.1 { INSERT INTO t1 VALUES(3, 4) } [ expected_sync_count 4 ]
# synchronous=normal. So, 1 sync on the directory, 1 on the journal, 1
# on the db file. 3 in total.
do_execsql_test 1.2.1 { PRAGMA main.synchronous = NORMAL }
do_execsql_test 1.2.2 { PRAGMA main.synchronous } 1
-do_execsql_sync_test 1.2.3 { INSERT INTO t1 VALUES(5, 6) } 3
+do_execsql_sync_test 1.2.3 { INSERT INTO t1 VALUES(5, 6) } [ expected_sync_count 3 ]
# synchronous=off. No syncs.
do_execsql_test 1.3.1 { PRAGMA main.synchronous = OFF }
@@ -70,7 +79,7 @@
# 2 on the journal, 1 on the db file. 4 in total.
do_execsql_test 1.4.1 { PRAGMA main.synchronous = FULL }
do_execsql_test 1.4.2 { PRAGMA main.synchronous } 2
-do_execsql_sync_test 1.4.3 { INSERT INTO t1 VALUES(9, 10) } 4
+do_execsql_sync_test 1.4.3 { INSERT INTO t1 VALUES(9, 10) } [ expected_sync_count 4 ]
#-----------------------------------------------------------------------
# Tests for wal mode.
@@ -79,7 +88,7 @@
# sync=full, journal_mode=wal. One sync on the directory, two on the
# wal file.
-do_execsql_sync_test 1.6 { INSERT INTO t1 VALUES(11, 12) } 3
+do_execsql_sync_test 1.6 { INSERT INTO t1 VALUES(11, 12) } [ expected_sync_count 3 ]
# One sync on the wal file.
do_execsql_sync_test 1.7 { INSERT INTO t1 VALUES(13, 14) } 1
@@ -112,7 +121,7 @@
# Wal mode, sync=normal. The first transaction does one sync on directory,
# one on the wal file. The second does no syncs.
- do_execsql_sync_test 1.11.1 { INSERT INTO t1 VALUES(19, 20) } 2
+ do_execsql_sync_test 1.11.1 { INSERT INTO t1 VALUES(19, 20) } [ expected_sync_count 2 ]
do_execsql_sync_test 1.11.2 { INSERT INTO t1 VALUES(21, 22) } 0
do_execsql_test 1.11.3 { PRAGMA main.synchronous } 1
@@ -129,14 +138,14 @@
# Delete mode, sync=full. The first transaction does one sync on
# directory, two on the journal file, one on the db. The second does
# the same.
- do_execsql_sync_test 1.15.1 { INSERT INTO t1 VALUES(26, 27) } 4
- do_execsql_sync_test 1.15.2 { INSERT INTO t1 VALUES(28, 29) } 4
+ do_execsql_sync_test 1.15.1 { INSERT INTO t1 VALUES(26, 27) } [ expected_sync_count 4 ]
+ do_execsql_sync_test 1.15.2 { INSERT INTO t1 VALUES(28, 29) } [ expected_sync_count 4 ]
do_execsql_test 1.15.3 { PRAGMA main.synchronous } 2
# Switch back to wal mode.
do_execsql_test 1.16 { PRAGMA journal_mode = wal } {wal}
- do_execsql_sync_test 1.17.1 { INSERT INTO t1 VALUES(30, 31) } 2
+ do_execsql_sync_test 1.17.1 { INSERT INTO t1 VALUES(30, 31) } [ expected_sync_count 2 ]
do_execsql_sync_test 1.17.2 { INSERT INTO t1 VALUES(32, 33) } 0
do_execsql_test 1.17.3 { PRAGMA main.synchronous } 1
@@ -152,8 +161,8 @@
# Close and reopen the db. Back to synchronous=normal.
db close
sqlite3 db test.db
- do_execsql_sync_test 1.20.1 { INSERT INTO t1 VALUES(38, 39) } 4
- do_execsql_sync_test 1.20.2 { INSERT INTO t1 VALUES(40, 41) } 4
+ do_execsql_sync_test 1.20.1 { INSERT INTO t1 VALUES(38, 39) } [ expected_sync_count 4 ]
+ do_execsql_sync_test 1.20.2 { INSERT INTO t1 VALUES(40, 41) } [ expected_sync_count 4 ]
do_execsql_test 1.20.3 { PRAGMA main.synchronous } 2
}

View File

@ -3,14 +3,14 @@
%bcond_with static %bcond_with static
%bcond_without check %bcond_without check
%define realver 3170000 %define realver 3180000
%define docver 3170000 %define docver 3180000
%define rpmver 3.17.0 %define rpmver 3.18.0
Summary: Library that implements an embeddable SQL database engine Summary: Library that implements an embeddable SQL database engine
Name: sqlite Name: sqlite
Version: %{rpmver} Version: %{rpmver}
Release: 2%{?dist} Release: 1%{?dist}
License: Public Domain License: Public Domain
Group: Applications/Databases Group: Applications/Databases
URL: http://www.sqlite.org/ URL: http://www.sqlite.org/
@ -32,6 +32,8 @@ Patch4: sqlite-3.8.0-percentile-test.patch
Patch6: sqlite-3.8.10.1-tcl-regress-tests.patch Patch6: sqlite-3.8.10.1-tcl-regress-tests.patch
# Disable test date-2.2c on i686 # Disable test date-2.2c on i686
Patch7: sqlite-3.16-datetest-2.2c.patch Patch7: sqlite-3.16-datetest-2.2c.patch
# Modify sync2.test to pass with DIRSYNC turned off
Patch8: sqlite-3.18.0-sync2-dirsync.patch
BuildRequires: ncurses-devel readline-devel glibc-devel BuildRequires: ncurses-devel readline-devel glibc-devel
BuildRequires: autoconf BuildRequires: autoconf
@ -134,6 +136,7 @@ This package contains the analysis program for %{name}.
%ifarch %{ix86} %ifarch %{ix86}
%patch7 -p1 -b .datetest-2.2c %patch7 -p1 -b .datetest-2.2c
%endif %endif
%patch8 -p1 -b .sync2-dirsync
autoconf # Rerun with new autoconf to add support for aarm64 autoconf # Rerun with new autoconf to add support for aarm64
@ -236,6 +239,10 @@ make test
%endif %endif
%changelog %changelog
* Mon Apr 03 2017 Petr Kubat <pkubat@redhat.com> - 3.18.0-1
- Updated to version 3.18.0 (https://sqlite.org/releaselog/3_18_0.html)
- Modify sync2.test to pass with DIRSYNC turned off
* Thu Mar 02 2017 Petr Kubat <pkubat@redhat.com> - 3.17.0-2 * Thu Mar 02 2017 Petr Kubat <pkubat@redhat.com> - 3.17.0-2
- Rebuild using newest gcc (#1428286) - Rebuild using newest gcc (#1428286)