Tests failing are ftsconf3.[1-68], both on sparc and hppa Test output suggests a endianess issue: ! fts3conf-3.1 expected: [X'0100000002000000'] ! fts3conf-3.1 got: [X'0000000100000002'] Reproducible: Always
What are results in 3.17.0 and 3.18.0?
Same on 3.18.0
Same on 3.17.0 (both tested only on sparc).
Reported to upstream mailing list.
This is a problem in the test scripts, not in the underlying SQLite code. The matchinfo() function of FTS3 returns a BLOB that is a an array of 32-bit integers in machine byte-order. (See the 2nd sentence at https://www.sqlite.org/fts3.html#matchinfo) Some test cases were rendering these BLOBs as hex and then checking the resulting strings, under the assumption that the tests are running on a little-endian machine. Those test cases would fail on a big-endian machine. The fix is to disable the offending test cases when running on a big-endian machine. Upstream check-in here: https://www.sqlite.org/src/info/87ccdf9cbb928455
(In reply to Richard Hipp from comment #5) > The fix is to disable the offending test cases when running on a big-endian > machine. > > Upstream check-in here: https://www.sqlite.org/src/info/87ccdf9cbb928455 You could probably do something like: if {$tcl_platform(byteOrder)=="littleEndian"} { do_execsql_test 3.1 { CREATE VIRTUAL TABLE t3 USING fts4; REPLACE INTO t3(docid, content) VALUES (1, 'one two'); SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' } {X'0100000002000000'} } else { do_execsql_test 3.1 { CREATE VIRTUAL TABLE t3 USING fts4; REPLACE INTO t3(docid, content) VALUES (1, 'one two'); SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' } {X'0000000100000002'} }
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #6) > > You could probably do something like: > > if {$tcl_platform(byteOrder)=="littleEndian"} { > do_execsql_test 3.1 { > CREATE VIRTUAL TABLE t3 USING fts4; > REPLACE INTO t3(docid, content) VALUES (1, 'one two'); > SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' > } {X'0100000002000000'} > } else { > do_execsql_test 3.1 { > CREATE VIRTUAL TABLE t3 USING fts4; > REPLACE INTO t3(docid, content) VALUES (1, 'one two'); > SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' > } {X'0000000100000002'} > } Yes, except we no longer have access to a machine on which to verify that change. There are lots of other byte-order independent tests cases for the matchinfo() function in the adjacent fts3matchinfo.test script. The handful of tests for matchinfo() in fts3conf.test are not necessary.
Fixed: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=339ebb6495f1bd6f9baf0293f7a6e2ae938eea47