diff options
author | 2017-09-28 17:34:57 +0200 | |
---|---|---|
committer | 2017-09-28 13:10:59 -0400 | |
commit | 339ebb6495f1bd6f9baf0293f7a6e2ae938eea47 (patch) | |
tree | 1d0f152e3e5cd511dcec2c60f1b53c15fca44289 /dev-db | |
parent | dev-db/sqlite: Fix csv extension on ppc/ppc64 (bug #630698). (diff) | |
download | gentoo-339ebb6495f1bd6f9baf0293f7a6e2ae938eea47.tar.gz gentoo-339ebb6495f1bd6f9baf0293f7a6e2ae938eea47.tar.bz2 gentoo-339ebb6495f1bd6f9baf0293f7a6e2ae938eea47.zip |
dev-db/sqlite: Fix tests on big-endian architectures (bug #630818).
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch | 95 | ||||
-rw-r--r-- | dev-db/sqlite/sqlite-3.20.1-r1.ebuild | 1 |
2 files changed, 96 insertions, 0 deletions
diff --git a/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch new file mode 100644 index 000000000000..427021d2f7b5 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch @@ -0,0 +1,95 @@ +https://www.sqlite.org/src/info/87ccdf9cbb928455 + +--- test/fts3conf.test ++++ test/fts3conf.test +@@ -136,47 +136,49 @@ + do_execsql_test 2.2.3 { SELECT * FROM t1 } {{a b c} {a b c}} + fts3_integrity 2.2.4 db t1 + +-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'} +- +-do_execsql_test 3.2 { +- REPLACE INTO t3(docid, content) VALUES (2, 'one two three four'); +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four' +-} {X'0200000003000000'} +- +-do_execsql_test 3.3 { +- REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six'); +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' +-} {X'0200000005000000'} +- +-do_execsql_test 3.4 { +- UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1; +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' +-} {X'0100000006000000'} +- +-do_execsql_test 3.5 { +- UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2; +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' +-} {X'0100000006000000'} +- +-do_execsql_test 3.6 { +- REPLACE INTO t3(docid, content) VALUES (3, 'one two'); +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' +-} {X'0100000002000000'} +- +-do_execsql_test 3.7 { +- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four'); +- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four five six'); +- SELECT docid FROM t3; +-} {3 4 5} +- +-do_execsql_test 3.8 { +- UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4; +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' +-} {X'0200000002000000'} ++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'} ++ ++ do_execsql_test 3.2 { ++ REPLACE INTO t3(docid, content) VALUES (2, 'one two three four'); ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four' ++ } {X'0200000003000000'} ++ ++ do_execsql_test 3.3 { ++ REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six'); ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' ++ } {X'0200000005000000'} ++ ++ do_execsql_test 3.4 { ++ UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1; ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' ++ } {X'0100000006000000'} ++ ++ do_execsql_test 3.5 { ++ UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2; ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' ++ } {X'0100000006000000'} ++ ++ do_execsql_test 3.6 { ++ REPLACE INTO t3(docid, content) VALUES (3, 'one two'); ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' ++ } {X'0100000002000000'} ++ ++ do_execsql_test 3.7 { ++ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four'); ++ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four five six'); ++ SELECT docid FROM t3; ++ } {3 4 5} ++ ++ do_execsql_test 3.8 { ++ UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4; ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' ++ } {X'0200000002000000'} ++} + + #------------------------------------------------------------------------- + # Test that the xSavepoint is invoked correctly if the first write diff --git a/dev-db/sqlite/sqlite-3.20.1-r1.ebuild b/dev-db/sqlite/sqlite-3.20.1-r1.ebuild index 7b6ce7814c0f..137b7b0eeb21 100644 --- a/dev-db/sqlite/sqlite-3.20.1-r1.ebuild +++ b/dev-db/sqlite/sqlite-3.20.1-r1.ebuild @@ -51,6 +51,7 @@ src_prepare() { if full_tarball; then eapply -p0 "${FILESDIR}/${PN}-3.20.0-full_tarball-build.patch" eapply -p0 "${FILESDIR}/${PN}-3.20.1-full_tarball-csv-unsigned_char.patch" + eapply -p0 "${FILESDIR}/${PN}-3.20.1-full_tarball-tests-big-endian.patch" eapply_user |