Fixed issue with a fts3rank test failing on big-endian systems

This commit is contained in:
Petr Kubat 2018-01-25 08:10:51 +01:00
parent 2ed6522be2
commit 15324d9449
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,40 @@
Index: test/fts3rank.test
==================================================================
--- test/fts3rank.test
+++ test/fts3rank.test
@@ -12,11 +12,11 @@
# focus of this script is testing the FTS3 module.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
-set testprefix fts3expr5
+set testprefix fts3rank
# If SQLITE_ENABLE_FTS3 is defined, omit this file.
ifcapable !fts3 {
finish_test
return
@@ -54,11 +54,16 @@
do_catchsql_test 1.4 {
SELECT * FROM t1 ORDER BY rank(x'0000000000000000') DESC, rowid
} {0 {{one two} one {one two} three {one two} two}}
-do_catchsql_test 1.5 {
- SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
-} {1 {invalid matchinfo blob passed to function rank()}}
+if {$tcl_platform(byteOrder)=="littleEndian"} {
+ do_catchsql_test 1.5le {
+ SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
+ } {1 {invalid matchinfo blob passed to function rank()}}
+} else {
+ do_catchsql_test 1.5be {
+ SELECT * FROM t1 ORDER BY rank(x'0000000100000001') DESC, rowid
+ } {1 {invalid matchinfo blob passed to function rank()}}
+}
finish_test
-

View File

@ -36,6 +36,8 @@ Patch7: sqlite-3.16-datetest-2.2c.patch
Patch8: sqlite-3.18.0-sync2-dirsync.patch Patch8: sqlite-3.18.0-sync2-dirsync.patch
# Upstream: https://www.sqlite.org/src/info/1b02731962c21bb0 # Upstream: https://www.sqlite.org/src/info/1b02731962c21bb0
Patch9: sqlite-3.22.0-int-float-compare.patch Patch9: sqlite-3.22.0-int-float-compare.patch
# Upstream: https://www.sqlite.org/src/info/e4766cabdf64d8e9
Patch10: sqlite-3.22.0-fts3rank-big-endian.patch
BuildRequires: ncurses-devel readline-devel glibc-devel BuildRequires: ncurses-devel readline-devel glibc-devel
BuildRequires: autoconf BuildRequires: autoconf
@ -140,6 +142,7 @@ This package contains the analysis program for %{name}.
%endif %endif
%patch8 -p1 %patch8 -p1
%patch9 -p0 %patch9 -p0
%patch10 -p0
autoconf # Rerun with new autoconf to add support for aarm64 autoconf # Rerun with new autoconf to add support for aarm64
@ -243,8 +246,9 @@ make test
%endif %endif
%changelog %changelog
* Wed Jan 24 2018 Petr Kubat <pkubat@redhat.com> - 3.22.0-2 * Thu Jan 25 2018 Petr Kubat <pkubat@redhat.com> - 3.22.0-1
- Fixed issue with some e_expr tests failing i686 - Fixed issue with some e_expr tests failing i686
- Fixed issue with a fts3rank test failing on big-endian systems
* Tue Jan 23 2018 Petr Kubat <pkubat@redhat.com> - 3.22.0-1 * Tue Jan 23 2018 Petr Kubat <pkubat@redhat.com> - 3.22.0-1
- Updated to version 3.22.0 (https://sqlite.org/releaselog/3_22_0.html) - Updated to version 3.22.0 (https://sqlite.org/releaselog/3_22_0.html)