Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
Date: Thu, 28 Sep 2017 17:18:54
Message-Id: 1506618659.339ebb6495f1bd6f9baf0293f7a6e2ae938eea47.floppym@gentoo
1 commit: 339ebb6495f1bd6f9baf0293f7a6e2ae938eea47
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Thu Sep 28 15:34:57 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 28 17:10:59 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=339ebb64
7
8 dev-db/sqlite: Fix tests on big-endian architectures (bug #630818).
9
10 ...lite-3.20.1-full_tarball-tests-big-endian.patch | 95 ++++++++++++++++++++++
11 dev-db/sqlite/sqlite-3.20.1-r1.ebuild | 1 +
12 2 files changed, 96 insertions(+)
13
14 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
15 new file mode 100644
16 index 00000000000..427021d2f7b
17 --- /dev/null
18 +++ b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch
19 @@ -0,0 +1,95 @@
20 +https://www.sqlite.org/src/info/87ccdf9cbb928455
21 +
22 +--- test/fts3conf.test
23 ++++ test/fts3conf.test
24 +@@ -136,47 +136,49 @@
25 + do_execsql_test 2.2.3 { SELECT * FROM t1 } {{a b c} {a b c}}
26 + fts3_integrity 2.2.4 db t1
27 +
28 +-do_execsql_test 3.1 {
29 +- CREATE VIRTUAL TABLE t3 USING fts4;
30 +- REPLACE INTO t3(docid, content) VALUES (1, 'one two');
31 +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
32 +-} {X'0100000002000000'}
33 +-
34 +-do_execsql_test 3.2 {
35 +- REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
36 +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
37 +-} {X'0200000003000000'}
38 +-
39 +-do_execsql_test 3.3 {
40 +- REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
41 +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
42 +-} {X'0200000005000000'}
43 +-
44 +-do_execsql_test 3.4 {
45 +- UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
46 +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
47 +-} {X'0100000006000000'}
48 +-
49 +-do_execsql_test 3.5 {
50 +- UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
51 +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
52 +-} {X'0100000006000000'}
53 +-
54 +-do_execsql_test 3.6 {
55 +- REPLACE INTO t3(docid, content) VALUES (3, 'one two');
56 +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
57 +-} {X'0100000002000000'}
58 +-
59 +-do_execsql_test 3.7 {
60 +- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four');
61 +- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four five six');
62 +- SELECT docid FROM t3;
63 +-} {3 4 5}
64 +-
65 +-do_execsql_test 3.8 {
66 +- UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
67 +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
68 +-} {X'0200000002000000'}
69 ++if {$tcl_platform(byteOrder)=="littleEndian"} {
70 ++ do_execsql_test 3.1 {
71 ++ CREATE VIRTUAL TABLE t3 USING fts4;
72 ++ REPLACE INTO t3(docid, content) VALUES (1, 'one two');
73 ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
74 ++ } {X'0100000002000000'}
75 ++
76 ++ do_execsql_test 3.2 {
77 ++ REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
78 ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
79 ++ } {X'0200000003000000'}
80 ++
81 ++ do_execsql_test 3.3 {
82 ++ REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
83 ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
84 ++ } {X'0200000005000000'}
85 ++
86 ++ do_execsql_test 3.4 {
87 ++ UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
88 ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
89 ++ } {X'0100000006000000'}
90 ++
91 ++ do_execsql_test 3.5 {
92 ++ UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
93 ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
94 ++ } {X'0100000006000000'}
95 ++
96 ++ do_execsql_test 3.6 {
97 ++ REPLACE INTO t3(docid, content) VALUES (3, 'one two');
98 ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
99 ++ } {X'0100000002000000'}
100 ++
101 ++ do_execsql_test 3.7 {
102 ++ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four');
103 ++ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four five six');
104 ++ SELECT docid FROM t3;
105 ++ } {3 4 5}
106 ++
107 ++ do_execsql_test 3.8 {
108 ++ UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
109 ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
110 ++ } {X'0200000002000000'}
111 ++}
112 +
113 + #-------------------------------------------------------------------------
114 + # Test that the xSavepoint is invoked correctly if the first write
115
116 diff --git a/dev-db/sqlite/sqlite-3.20.1-r1.ebuild b/dev-db/sqlite/sqlite-3.20.1-r1.ebuild
117 index 7b6ce7814c0..137b7b0eeb2 100644
118 --- a/dev-db/sqlite/sqlite-3.20.1-r1.ebuild
119 +++ b/dev-db/sqlite/sqlite-3.20.1-r1.ebuild
120 @@ -51,6 +51,7 @@ src_prepare() {
121 if full_tarball; then
122 eapply -p0 "${FILESDIR}/${PN}-3.20.0-full_tarball-build.patch"
123 eapply -p0 "${FILESDIR}/${PN}-3.20.1-full_tarball-csv-unsigned_char.patch"
124 + eapply -p0 "${FILESDIR}/${PN}-3.20.1-full_tarball-tests-big-endian.patch"
125
126 eapply_user