- Add sqlite3-float-i586.patch to fix build on i586.
- sqlite3-rtree-i686.patch is not needed anymore. OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=330
This commit is contained in:
parent
0c4f7bcc97
commit
9fe3cba2c3
108
sqlite3-float-i586.patch
Normal file
108
sqlite3-float-i586.patch
Normal file
@ -0,0 +1,108 @@
|
||||
Index: test/func4.test
|
||||
==================================================================
|
||||
--- test/func4.test
|
||||
+++ test/func4.test
|
||||
@@ -1,6 +1,6 @@
|
||||
-# 2013 March 10
|
||||
+# 2023-03-10
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
@@ -7,11 +7,14 @@
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
# This file implements regression tests for SQLite library. The focus of
|
||||
-# this file is testing the tointeger() and toreal() functions.
|
||||
+# this file is testing the tointeger() and toreal() functions that are
|
||||
+# part of the "totype.c" extension. This file does not test the core
|
||||
+# SQLite library. Failures of tests in this file are related to the
|
||||
+# ext/misc/totype.c extension.
|
||||
#
|
||||
# Several of the toreal() tests are disabled on platforms where floating
|
||||
# point precision is not high enough to represent their constant integer
|
||||
# expression arguments as double precision floating point values.
|
||||
#
|
||||
@@ -21,10 +24,24 @@
|
||||
set tcl_precision 0
|
||||
load_static_extension db totype
|
||||
|
||||
set highPrecision(1) [expr \
|
||||
{[db eval {SELECT tointeger(9223372036854775807 + 1);}] eq {{}}}]
|
||||
+set highPrecision(2) [expr \
|
||||
+ {[db eval {SELECT toreal(-9223372036854775808 + 1);}] eq {{}}}]
|
||||
+
|
||||
+# highPrecision(3) is only known to be false on i586 with gcc-13 and -O2.
|
||||
+# It is true on the exact same platform with -O0. Both results seem
|
||||
+# reasonable, so we'll just very the expectation accordingly.
|
||||
+#
|
||||
+set highPrecision(3) [expr \
|
||||
+ {[db eval {SELECT toreal(9007199254740992 + 1);}] eq {{}}}]
|
||||
+
|
||||
+if {!$highPrecision(1) || !$highPrecision(2) || !$highPrecision(3)} {
|
||||
+ puts "NOTICE: use_long_double: [use_long_double] \
|
||||
+ highPrecision: $highPrecision(1) $highPrecision(2) $highPrecision(3)"
|
||||
+}
|
||||
|
||||
do_execsql_test func4-1.1 {
|
||||
SELECT tointeger(NULL);
|
||||
} {{}}
|
||||
do_execsql_test func4-1.2 {
|
||||
@@ -193,12 +210,10 @@
|
||||
do_execsql_test func4-1.55 {
|
||||
SELECT tointeger(18446744073709551616 + 1);
|
||||
} {{}}
|
||||
|
||||
ifcapable floatingpoint {
|
||||
- set highPrecision(2) [expr \
|
||||
- {[db eval {SELECT toreal(-9223372036854775808 + 1);}] eq {{}}}]
|
||||
|
||||
do_execsql_test func4-2.1 {
|
||||
SELECT toreal(NULL);
|
||||
} {{}}
|
||||
do_execsql_test func4-2.2 {
|
||||
@@ -339,14 +354,18 @@
|
||||
SELECT toreal(9007199254740992 - 1);
|
||||
} {9007199254740991.0}
|
||||
do_execsql_test func4-2.45 {
|
||||
SELECT toreal(9007199254740992);
|
||||
} {9007199254740992.0}
|
||||
- if {$highPrecision(2)} {
|
||||
+ if {$highPrecision(3)} {
|
||||
+ do_execsql_test func4-2.46 {
|
||||
+ SELECT toreal(9007199254740992 + 1);
|
||||
+ } {{}}
|
||||
+ } else {
|
||||
do_execsql_test func4-2.46 {
|
||||
SELECT toreal(9007199254740992 + 1);
|
||||
- } {{}}
|
||||
+ } {9007199254740992.0}
|
||||
}
|
||||
do_execsql_test func4-2.47 {
|
||||
SELECT toreal(9007199254740992 + 2);
|
||||
} {9007199254740994.0}
|
||||
do_execsql_test func4-2.48 {
|
||||
@@ -624,14 +643,18 @@
|
||||
SELECT tointeger(toreal(9007199254740992 - 1));
|
||||
} {9007199254740991}
|
||||
do_execsql_test func4-5.22 {
|
||||
SELECT tointeger(toreal(9007199254740992));
|
||||
} {9007199254740992}
|
||||
- if {$highPrecision(2)} {
|
||||
+ if {$highPrecision(3)} {
|
||||
do_execsql_test func4-5.23 {
|
||||
SELECT tointeger(toreal(9007199254740992 + 1));
|
||||
} {{}}
|
||||
+ } else {
|
||||
+ do_execsql_test func4-5.23 {
|
||||
+ SELECT tointeger(toreal(9007199254740992 + 1));
|
||||
+ } {9007199254740992}
|
||||
}
|
||||
do_execsql_test func4-5.24 {
|
||||
SELECT tointeger(toreal(9007199254740992 + 2));
|
||||
} {9007199254740994}
|
||||
if {$highPrecision(1)} {
|
||||
|
@ -1,26 +0,0 @@
|
||||
---
|
||||
ext/rtree/rtree1.test | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
Index: sqlite-src-3440000/ext/rtree/rtree1.test
|
||||
===================================================================
|
||||
--- sqlite-src-3440000.orig/ext/rtree/rtree1.test
|
||||
+++ sqlite-src-3440000/ext/rtree/rtree1.test
|
||||
@@ -760,6 +760,9 @@ do_execsql_test 20.4 {
|
||||
# Do not omit constraints that involve equality comparisons of
|
||||
# floating-point values.
|
||||
#
|
||||
+if {![string match i*86 $tcl_platform(machine)]} {
|
||||
+# It seems the fix wasn't sufficient for i[56]86, so the tests still
|
||||
+# fail there and we disable them to fix build for now.
|
||||
reset_db
|
||||
do_execsql_test 21.0 {
|
||||
CREATE VIRTUAL TABLE t1 USING rtree(id, x0, x1);
|
||||
@@ -785,6 +788,7 @@ if {$tcl_platform(machine)!="i686" || $t
|
||||
SELECT id, x0 > 9223372036854775807 AS 'a0' FROM t1;
|
||||
} {123 1}
|
||||
}
|
||||
+}
|
||||
|
||||
# 2023-10-14 dbsqlfuzz --sql-fuzz find. rtreecheck() should not call
|
||||
# BEGIN/COMMIT because that causes problems with statement transactions,
|
@ -29,6 +29,10 @@ Tue Mar 12 14:50:27 UTC 2024 - Reinhard Max <max@suse.com>
|
||||
* Reduce the scope of the NOT NULL strength reduction
|
||||
optimization that was added in version 3.35.0.
|
||||
|
||||
- Add sqlite3-float-i586.patch to fix build on i586.
|
||||
|
||||
- sqlite3-rtree-i686.patch is not needed anymore.
|
||||
|
||||
- Abort build when %version and %tarversion don't match.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
@ -31,7 +31,7 @@ URL: https://www.sqlite.org/
|
||||
Source0: https://www.sqlite.org/2023/sqlite-src-%{tarversion}.zip
|
||||
Source1: baselibs.conf
|
||||
Source2: https://www.sqlite.org/2023/sqlite-doc-%{docversion}.zip
|
||||
Patch0: sqlite3-rtree-i686.patch
|
||||
Patch0: sqlite3-float-i586.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
@ -137,7 +137,7 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%autosetup -p1 -n sqlite-src-%{tarversion} -a2
|
||||
%autosetup -p0 -n sqlite-src-%{tarversion} -a2
|
||||
|
||||
rm -v sqlite-doc-%{docversion}/releaselog/current.html
|
||||
ln -sv `echo %{docversion} | sed "s/\./_/g"`.html sqlite-doc-%{docversion}/releaselog/current.html
|
||||
|
Loading…
Reference in New Issue
Block a user