Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mysql-extras:master commit in: /
Date: Sat, 13 Oct 2018 23:31:11
Message-Id: 1539465304.439462f3d9f725e2aa96d60e55c6286797c61607.whissi@gentoo
1 commit: 439462f3d9f725e2aa96d60e55c6286797c61607
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 13 21:15:04 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 13 21:15:04 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/mysql-extras.git/commit/?id=439462f3
7
8 Add 20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
9
10 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
11
12 ...lues-for-same-output-on-all-architectures.patch | 332 +++++++++++++++++++++
13 1 file changed, 332 insertions(+)
14
15 diff --git a/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch b/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
16 new file mode 100644
17 index 0000000..337e5a1
18 --- /dev/null
19 +++ b/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
20 @@ -0,0 +1,332 @@
21 +Description: Fix failing arithmetic tests on ppc64el
22 + The architecture provides a math library with 128bit precision, giving
23 + slightly different results on certain calculations used in tests.
24 + Round off the values so the output is the same on all architectures.
25 +Author: Lars Tangvald <lars.tangvald@××××××.com>
26 +Bug: https://bugs.mysql.com/bug.php?id=92375
27 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1791010
28 +Forwarded: not-needed
29 +Last-Update: 2018-09-11
30 +
31 +--- a/mysql-test/include/select.inc
32 ++++ b/mysql-test/include/select.inc
33 +@@ -2344,12 +2344,16 @@ where key1 <= 0.6158 and key2 >= 1.3762;
34 + explain select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
35 + explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
36 +
37 ++--replace_numeric_round 4
38 + select max(key1) from t1 where key1 <= 0.6158;
39 ++--replace_numeric_round 4
40 + select max(key2) from t2 where key2 <= 1.6158;
41 + select min(key1) from t1 where key1 >= 0.3762;
42 + select min(key2) from t2 where key2 >= 1.3762;
43 ++--replace_numeric_round 4
44 + select max(key1), min(key2) from t1, t2
45 + where key1 <= 0.6158 and key2 >= 1.3762;
46 ++--replace_numeric_round 4
47 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
48 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
49 +
50 +--- a/mysql-test/r/ps.result
51 ++++ b/mysql-test/r/ps.result
52 +@@ -3418,9 +3418,9 @@ Table Create Table
53 + tmp1 CREATE TEMPORARY TABLE `tmp1` (
54 + `c1` double DEFAULT NULL
55 + ) ENGINE=InnoDB DEFAULT CHARSET=latin1
56 +-SELECT @a, @a - 123.4567 < 0.00001;
57 +-@a @a - 123.4567 < 0.00001
58 +-123.45670318603516 1
59 ++SELECT @a, @a - 123.4567 < 0.0001;
60 ++@a @a - 123.4567 < 0.0001
61 ++123.4567 1
62 + DROP TEMPORARY TABLE tmp1;
63 + DROP PROCEDURE p1;
64 +
65 +--- a/mysql-test/r/select_all.result
66 ++++ b/mysql-test/r/select_all.result
67 +@@ -2899,10 +2899,10 @@ Warnings:
68 + Note 1003 /* select#1 */ select min(`test`.`t1`.`key1`) AS `min(key1)` from `test`.`t1` where ((`test`.`t1`.`key1` >= 0.3762) and ((rand() + 0.5) >= 0.5))
69 + select max(key1) from t1 where key1 <= 0.6158;
70 + max(key1)
71 +-0.6158000230789185
72 ++0.6158
73 + select max(key2) from t2 where key2 <= 1.6158;
74 + max(key2)
75 +-1.6158000230789185
76 ++1.6158
77 + select min(key1) from t1 where key1 >= 0.3762;
78 + min(key1)
79 + 0.37619999051094055
80 +@@ -2912,10 +2912,10 @@ min(key2)
81 + select max(key1), min(key2) from t1, t2
82 + where key1 <= 0.6158 and key2 >= 1.3762;
83 + max(key1) min(key2)
84 +-0.6158000230789185 1.3761999607086182
85 ++0.6158 1.3762
86 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
87 + max(key1)
88 +-0.6158000230789185
89 ++0.6158
90 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
91 + min(key1)
92 + 0.37619999051094055
93 +--- a/mysql-test/r/select_all_bka.result
94 ++++ b/mysql-test/r/select_all_bka.result
95 +@@ -2900,10 +2900,10 @@ Warnings:
96 + Note 1003 /* select#1 */ select min(`test`.`t1`.`key1`) AS `min(key1)` from `test`.`t1` where ((`test`.`t1`.`key1` >= 0.3762) and ((rand() + 0.5) >= 0.5))
97 + select max(key1) from t1 where key1 <= 0.6158;
98 + max(key1)
99 +-0.6158000230789185
100 ++0.6158
101 + select max(key2) from t2 where key2 <= 1.6158;
102 + max(key2)
103 +-1.6158000230789185
104 ++1.6158
105 + select min(key1) from t1 where key1 >= 0.3762;
106 + min(key1)
107 + 0.37619999051094055
108 +@@ -2913,10 +2913,10 @@ min(key2)
109 + select max(key1), min(key2) from t1, t2
110 + where key1 <= 0.6158 and key2 >= 1.3762;
111 + max(key1) min(key2)
112 +-0.6158000230789185 1.3761999607086182
113 ++0.6158 1.3762
114 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
115 + max(key1)
116 +-0.6158000230789185
117 ++0.6158
118 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
119 + min(key1)
120 + 0.37619999051094055
121 +--- a/mysql-test/r/select_all_bka_nixbnl.result
122 ++++ b/mysql-test/r/select_all_bka_nixbnl.result
123 +@@ -2900,10 +2900,10 @@ Warnings:
124 + Note 1003 /* select#1 */ select min(`test`.`t1`.`key1`) AS `min(key1)` from `test`.`t1` where ((`test`.`t1`.`key1` >= 0.3762) and ((rand() + 0.5) >= 0.5))
125 + select max(key1) from t1 where key1 <= 0.6158;
126 + max(key1)
127 +-0.6158000230789185
128 ++0.6158
129 + select max(key2) from t2 where key2 <= 1.6158;
130 + max(key2)
131 +-1.6158000230789185
132 ++1.6158
133 + select min(key1) from t1 where key1 >= 0.3762;
134 + min(key1)
135 + 0.37619999051094055
136 +@@ -2913,10 +2913,10 @@ min(key2)
137 + select max(key1), min(key2) from t1, t2
138 + where key1 <= 0.6158 and key2 >= 1.3762;
139 + max(key1) min(key2)
140 +-0.6158000230789185 1.3761999607086182
141 ++0.6158 1.3762
142 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
143 + max(key1)
144 +-0.6158000230789185
145 ++0.6158
146 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
147 + min(key1)
148 + 0.37619999051094055
149 +--- a/mysql-test/r/select_icp_mrr.result
150 ++++ b/mysql-test/r/select_icp_mrr.result
151 +@@ -2899,10 +2899,10 @@ Warnings:
152 + Note 1003 /* select#1 */ select min(`test`.`t1`.`key1`) AS `min(key1)` from `test`.`t1` where ((`test`.`t1`.`key1` >= 0.3762) and ((rand() + 0.5) >= 0.5))
153 + select max(key1) from t1 where key1 <= 0.6158;
154 + max(key1)
155 +-0.6158000230789185
156 ++0.6158
157 + select max(key2) from t2 where key2 <= 1.6158;
158 + max(key2)
159 +-1.6158000230789185
160 ++1.6158
161 + select min(key1) from t1 where key1 >= 0.3762;
162 + min(key1)
163 + 0.37619999051094055
164 +@@ -2912,10 +2912,10 @@ min(key2)
165 + select max(key1), min(key2) from t1, t2
166 + where key1 <= 0.6158 and key2 >= 1.3762;
167 + max(key1) min(key2)
168 +-0.6158000230789185 1.3761999607086182
169 ++0.6158 1.3762
170 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
171 + max(key1)
172 +-0.6158000230789185
173 ++0.6158
174 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
175 + min(key1)
176 + 0.37619999051094055
177 +--- a/mysql-test/r/select_icp_mrr_bka.result
178 ++++ b/mysql-test/r/select_icp_mrr_bka.result
179 +@@ -2900,10 +2900,10 @@ Warnings:
180 + Note 1003 /* select#1 */ select min(`test`.`t1`.`key1`) AS `min(key1)` from `test`.`t1` where ((`test`.`t1`.`key1` >= 0.3762) and ((rand() + 0.5) >= 0.5))
181 + select max(key1) from t1 where key1 <= 0.6158;
182 + max(key1)
183 +-0.6158000230789185
184 ++0.6158
185 + select max(key2) from t2 where key2 <= 1.6158;
186 + max(key2)
187 +-1.6158000230789185
188 ++1.6158
189 + select min(key1) from t1 where key1 >= 0.3762;
190 + min(key1)
191 + 0.37619999051094055
192 +@@ -2913,10 +2913,10 @@ min(key2)
193 + select max(key1), min(key2) from t1, t2
194 + where key1 <= 0.6158 and key2 >= 1.3762;
195 + max(key1) min(key2)
196 +-0.6158000230789185 1.3761999607086182
197 ++0.6158 1.3762
198 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
199 + max(key1)
200 +-0.6158000230789185
201 ++0.6158
202 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
203 + min(key1)
204 + 0.37619999051094055
205 +--- a/mysql-test/r/select_icp_mrr_bka_nixbnl.result
206 ++++ b/mysql-test/r/select_icp_mrr_bka_nixbnl.result
207 +@@ -2900,10 +2900,10 @@ Warnings:
208 + Note 1003 /* select#1 */ select min(`test`.`t1`.`key1`) AS `min(key1)` from `test`.`t1` where ((`test`.`t1`.`key1` >= 0.3762) and ((rand() + 0.5) >= 0.5))
209 + select max(key1) from t1 where key1 <= 0.6158;
210 + max(key1)
211 +-0.6158000230789185
212 ++0.6158
213 + select max(key2) from t2 where key2 <= 1.6158;
214 + max(key2)
215 +-1.6158000230789185
216 ++1.6158
217 + select min(key1) from t1 where key1 >= 0.3762;
218 + min(key1)
219 + 0.37619999051094055
220 +@@ -2913,10 +2913,10 @@ min(key2)
221 + select max(key1), min(key2) from t1, t2
222 + where key1 <= 0.6158 and key2 >= 1.3762;
223 + max(key1) min(key2)
224 +-0.6158000230789185 1.3761999607086182
225 ++0.6158 1.3762
226 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
227 + max(key1)
228 +-0.6158000230789185
229 ++0.6158
230 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
231 + min(key1)
232 + 0.37619999051094055
233 +--- a/mysql-test/r/select_none.result
234 ++++ b/mysql-test/r/select_none.result
235 +@@ -2898,10 +2898,10 @@ Warnings:
236 + Note 1003 /* select#1 */ select min(`test`.`t1`.`key1`) AS `min(key1)` from `test`.`t1` where ((`test`.`t1`.`key1` >= 0.3762) and ((rand() + 0.5) >= 0.5))
237 + select max(key1) from t1 where key1 <= 0.6158;
238 + max(key1)
239 +-0.6158000230789185
240 ++0.6158
241 + select max(key2) from t2 where key2 <= 1.6158;
242 + max(key2)
243 +-1.6158000230789185
244 ++1.6158
245 + select min(key1) from t1 where key1 >= 0.3762;
246 + min(key1)
247 + 0.37619999051094055
248 +@@ -2911,10 +2911,10 @@ min(key2)
249 + select max(key1), min(key2) from t1, t2
250 + where key1 <= 0.6158 and key2 >= 1.3762;
251 + max(key1) min(key2)
252 +-0.6158000230789185 1.3761999607086182
253 ++0.6158 1.3762
254 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
255 + max(key1)
256 +-0.6158000230789185
257 ++0.6158
258 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
259 + min(key1)
260 + 0.37619999051094055
261 +--- a/mysql-test/r/select_none_bka.result
262 ++++ b/mysql-test/r/select_none_bka.result
263 +@@ -2899,10 +2899,10 @@ Warnings:
264 + Note 1003 /* select#1 */ select min(`test`.`t1`.`key1`) AS `min(key1)` from `test`.`t1` where ((`test`.`t1`.`key1` >= 0.3762) and ((rand() + 0.5) >= 0.5))
265 + select max(key1) from t1 where key1 <= 0.6158;
266 + max(key1)
267 +-0.6158000230789185
268 ++0.6158
269 + select max(key2) from t2 where key2 <= 1.6158;
270 + max(key2)
271 +-1.6158000230789185
272 ++1.6158
273 + select min(key1) from t1 where key1 >= 0.3762;
274 + min(key1)
275 + 0.37619999051094055
276 +@@ -2912,10 +2912,10 @@ min(key2)
277 + select max(key1), min(key2) from t1, t2
278 + where key1 <= 0.6158 and key2 >= 1.3762;
279 + max(key1) min(key2)
280 +-0.6158000230789185 1.3761999607086182
281 ++0.6158 1.3762
282 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
283 + max(key1)
284 +-0.6158000230789185
285 ++0.6158
286 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
287 + min(key1)
288 + 0.37619999051094055
289 +--- a/mysql-test/r/select_none_bka_nixbnl.result
290 ++++ b/mysql-test/r/select_none_bka_nixbnl.result
291 +@@ -2899,10 +2899,10 @@ Warnings:
292 + Note 1003 /* select#1 */ select min(`test`.`t1`.`key1`) AS `min(key1)` from `test`.`t1` where ((`test`.`t1`.`key1` >= 0.3762) and ((rand() + 0.5) >= 0.5))
293 + select max(key1) from t1 where key1 <= 0.6158;
294 + max(key1)
295 +-0.6158000230789185
296 ++0.6158
297 + select max(key2) from t2 where key2 <= 1.6158;
298 + max(key2)
299 +-1.6158000230789185
300 ++1.6158
301 + select min(key1) from t1 where key1 >= 0.3762;
302 + min(key1)
303 + 0.37619999051094055
304 +@@ -2912,10 +2912,10 @@ min(key2)
305 + select max(key1), min(key2) from t1, t2
306 + where key1 <= 0.6158 and key2 >= 1.3762;
307 + max(key1) min(key2)
308 +-0.6158000230789185 1.3761999607086182
309 ++0.6158 1.3762
310 + select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
311 + max(key1)
312 +-0.6158000230789185
313 ++0.6158
314 + select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
315 + min(key1)
316 + 0.37619999051094055
317 +--- a/mysql-test/r/sp.result
318 ++++ b/mysql-test/r/sp.result
319 +@@ -5982,9 +5982,9 @@ CREATE TABLE t3 (f1 INT, f2 FLOAT)|
320 + INSERT INTO t3 VALUES (1, 3.4), (1, 2), (1, 0.9), (2, 8), (2, 7)|
321 + SELECT SUM(f2), bug25373(f1) FROM t3 GROUP BY bug25373(f1) WITH ROLLUP|
322 + SUM(f2) bug25373(f1)
323 +-6.300000071525574 1
324 ++6.3 1
325 + 15 2
326 +-21.300000071525574 NULL
327 ++21.3 NULL
328 + DROP FUNCTION bug25373|
329 + DROP TABLE t3|
330 + DROP DATABASE IF EXISTS mysqltest1|
331 +--- a/mysql-test/t/sp.test
332 ++++ b/mysql-test/t/sp.test
333 +@@ -6817,6 +6817,7 @@ LANGUAGE SQL DETERMINISTIC
334 + RETURN p1;|
335 + CREATE TABLE t3 (f1 INT, f2 FLOAT)|
336 + INSERT INTO t3 VALUES (1, 3.4), (1, 2), (1, 0.9), (2, 8), (2, 7)|
337 ++--replace_numeric_round 4
338 + SELECT SUM(f2), bug25373(f1) FROM t3 GROUP BY bug25373(f1) WITH ROLLUP|
339 + DROP FUNCTION bug25373|
340 + DROP TABLE t3|
341 +--- a/mysql-test/t/wl4435_generated.inc
342 ++++ b/mysql-test/t/wl4435_generated.inc
343 +@@ -246,7 +246,8 @@ CREATE TEMPORARY TABLE tmp1 AS SELECT @a
344 +
345 + SHOW CREATE TABLE tmp1;
346 +
347 +-SELECT @a, @a - 123.4567 < 0.00001;
348 ++--replace_numeric_round 4
349 ++SELECT @a, @a - 123.4567 < 0.0001;
350 +
351 + DROP TEMPORARY TABLE tmp1;
352 + DROP PROCEDURE p1;