summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-10-13 23:15:04 +0200
committerThomas Deutschmann <whissi@gentoo.org>2018-10-13 23:15:04 +0200
commit439462f3d9f725e2aa96d60e55c6286797c61607 (patch)
treea301437fcf2686274271ecaff7532de7375d1f38
parentAdd 20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch (diff)
downloadmysql-extras-439462f3d9f725e2aa96d60e55c6286797c61607.tar.gz
mysql-extras-439462f3d9f725e2aa96d60e55c6286797c61607.tar.bz2
mysql-extras-439462f3d9f725e2aa96d60e55c6286797c61607.zip
Add 20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r--20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch332
1 files changed, 332 insertions, 0 deletions
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
new file mode 100644
index 0000000..337e5a1
--- /dev/null
+++ b/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
@@ -0,0 +1,332 @@
+Description: Fix failing arithmetic tests on ppc64el
+ The architecture provides a math library with 128bit precision, giving
+ slightly different results on certain calculations used in tests.
+ Round off the values so the output is the same on all architectures.
+Author: Lars Tangvald <lars.tangvald@oracle.com>
+Bug: https://bugs.mysql.com/bug.php?id=92375
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1791010
+Forwarded: not-needed
+Last-Update: 2018-09-11
+
+--- a/mysql-test/include/select.inc
++++ b/mysql-test/include/select.inc
+@@ -2344,12 +2344,16 @@ where key1 <= 0.6158 and key2 >= 1.3762;
+ explain select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+
++--replace_numeric_round 4
+ select max(key1) from t1 where key1 <= 0.6158;
++--replace_numeric_round 4
+ select max(key2) from t2 where key2 <= 1.6158;
+ select min(key1) from t1 where key1 >= 0.3762;
+ select min(key2) from t2 where key2 >= 1.3762;
++--replace_numeric_round 4
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
++--replace_numeric_round 4
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+
+--- a/mysql-test/r/ps.result
++++ b/mysql-test/r/ps.result
+@@ -3418,9 +3418,9 @@ Table Create Table
+ tmp1 CREATE TEMPORARY TABLE `tmp1` (
+ `c1` double DEFAULT NULL
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1
+-SELECT @a, @a - 123.4567 < 0.00001;
+-@a @a - 123.4567 < 0.00001
+-123.45670318603516 1
++SELECT @a, @a - 123.4567 < 0.0001;
++@a @a - 123.4567 < 0.0001
++123.4567 1
+ DROP TEMPORARY TABLE tmp1;
+ DROP PROCEDURE p1;
+
+--- a/mysql-test/r/select_all.result
++++ b/mysql-test/r/select_all.result
+@@ -2899,10 +2899,10 @@ Warnings:
+ 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))
+ select max(key1) from t1 where key1 <= 0.6158;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select max(key2) from t2 where key2 <= 1.6158;
+ max(key2)
+-1.6158000230789185
++1.6158
+ select min(key1) from t1 where key1 >= 0.3762;
+ min(key1)
+ 0.37619999051094055
+@@ -2912,10 +2912,10 @@ min(key2)
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
+ max(key1) min(key2)
+-0.6158000230789185 1.3761999607086182
++0.6158 1.3762
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+ min(key1)
+ 0.37619999051094055
+--- a/mysql-test/r/select_all_bka.result
++++ b/mysql-test/r/select_all_bka.result
+@@ -2900,10 +2900,10 @@ Warnings:
+ 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))
+ select max(key1) from t1 where key1 <= 0.6158;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select max(key2) from t2 where key2 <= 1.6158;
+ max(key2)
+-1.6158000230789185
++1.6158
+ select min(key1) from t1 where key1 >= 0.3762;
+ min(key1)
+ 0.37619999051094055
+@@ -2913,10 +2913,10 @@ min(key2)
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
+ max(key1) min(key2)
+-0.6158000230789185 1.3761999607086182
++0.6158 1.3762
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+ min(key1)
+ 0.37619999051094055
+--- a/mysql-test/r/select_all_bka_nixbnl.result
++++ b/mysql-test/r/select_all_bka_nixbnl.result
+@@ -2900,10 +2900,10 @@ Warnings:
+ 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))
+ select max(key1) from t1 where key1 <= 0.6158;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select max(key2) from t2 where key2 <= 1.6158;
+ max(key2)
+-1.6158000230789185
++1.6158
+ select min(key1) from t1 where key1 >= 0.3762;
+ min(key1)
+ 0.37619999051094055
+@@ -2913,10 +2913,10 @@ min(key2)
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
+ max(key1) min(key2)
+-0.6158000230789185 1.3761999607086182
++0.6158 1.3762
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+ min(key1)
+ 0.37619999051094055
+--- a/mysql-test/r/select_icp_mrr.result
++++ b/mysql-test/r/select_icp_mrr.result
+@@ -2899,10 +2899,10 @@ Warnings:
+ 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))
+ select max(key1) from t1 where key1 <= 0.6158;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select max(key2) from t2 where key2 <= 1.6158;
+ max(key2)
+-1.6158000230789185
++1.6158
+ select min(key1) from t1 where key1 >= 0.3762;
+ min(key1)
+ 0.37619999051094055
+@@ -2912,10 +2912,10 @@ min(key2)
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
+ max(key1) min(key2)
+-0.6158000230789185 1.3761999607086182
++0.6158 1.3762
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+ min(key1)
+ 0.37619999051094055
+--- a/mysql-test/r/select_icp_mrr_bka.result
++++ b/mysql-test/r/select_icp_mrr_bka.result
+@@ -2900,10 +2900,10 @@ Warnings:
+ 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))
+ select max(key1) from t1 where key1 <= 0.6158;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select max(key2) from t2 where key2 <= 1.6158;
+ max(key2)
+-1.6158000230789185
++1.6158
+ select min(key1) from t1 where key1 >= 0.3762;
+ min(key1)
+ 0.37619999051094055
+@@ -2913,10 +2913,10 @@ min(key2)
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
+ max(key1) min(key2)
+-0.6158000230789185 1.3761999607086182
++0.6158 1.3762
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+ min(key1)
+ 0.37619999051094055
+--- a/mysql-test/r/select_icp_mrr_bka_nixbnl.result
++++ b/mysql-test/r/select_icp_mrr_bka_nixbnl.result
+@@ -2900,10 +2900,10 @@ Warnings:
+ 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))
+ select max(key1) from t1 where key1 <= 0.6158;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select max(key2) from t2 where key2 <= 1.6158;
+ max(key2)
+-1.6158000230789185
++1.6158
+ select min(key1) from t1 where key1 >= 0.3762;
+ min(key1)
+ 0.37619999051094055
+@@ -2913,10 +2913,10 @@ min(key2)
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
+ max(key1) min(key2)
+-0.6158000230789185 1.3761999607086182
++0.6158 1.3762
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+ min(key1)
+ 0.37619999051094055
+--- a/mysql-test/r/select_none.result
++++ b/mysql-test/r/select_none.result
+@@ -2898,10 +2898,10 @@ Warnings:
+ 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))
+ select max(key1) from t1 where key1 <= 0.6158;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select max(key2) from t2 where key2 <= 1.6158;
+ max(key2)
+-1.6158000230789185
++1.6158
+ select min(key1) from t1 where key1 >= 0.3762;
+ min(key1)
+ 0.37619999051094055
+@@ -2911,10 +2911,10 @@ min(key2)
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
+ max(key1) min(key2)
+-0.6158000230789185 1.3761999607086182
++0.6158 1.3762
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+ min(key1)
+ 0.37619999051094055
+--- a/mysql-test/r/select_none_bka.result
++++ b/mysql-test/r/select_none_bka.result
+@@ -2899,10 +2899,10 @@ Warnings:
+ 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))
+ select max(key1) from t1 where key1 <= 0.6158;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select max(key2) from t2 where key2 <= 1.6158;
+ max(key2)
+-1.6158000230789185
++1.6158
+ select min(key1) from t1 where key1 >= 0.3762;
+ min(key1)
+ 0.37619999051094055
+@@ -2912,10 +2912,10 @@ min(key2)
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
+ max(key1) min(key2)
+-0.6158000230789185 1.3761999607086182
++0.6158 1.3762
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+ min(key1)
+ 0.37619999051094055
+--- a/mysql-test/r/select_none_bka_nixbnl.result
++++ b/mysql-test/r/select_none_bka_nixbnl.result
+@@ -2899,10 +2899,10 @@ Warnings:
+ 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))
+ select max(key1) from t1 where key1 <= 0.6158;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select max(key2) from t2 where key2 <= 1.6158;
+ max(key2)
+-1.6158000230789185
++1.6158
+ select min(key1) from t1 where key1 >= 0.3762;
+ min(key1)
+ 0.37619999051094055
+@@ -2912,10 +2912,10 @@ min(key2)
+ select max(key1), min(key2) from t1, t2
+ where key1 <= 0.6158 and key2 >= 1.3762;
+ max(key1) min(key2)
+-0.6158000230789185 1.3761999607086182
++0.6158 1.3762
+ select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+ max(key1)
+-0.6158000230789185
++0.6158
+ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+ min(key1)
+ 0.37619999051094055
+--- a/mysql-test/r/sp.result
++++ b/mysql-test/r/sp.result
+@@ -5982,9 +5982,9 @@ CREATE TABLE t3 (f1 INT, f2 FLOAT)|
+ INSERT INTO t3 VALUES (1, 3.4), (1, 2), (1, 0.9), (2, 8), (2, 7)|
+ SELECT SUM(f2), bug25373(f1) FROM t3 GROUP BY bug25373(f1) WITH ROLLUP|
+ SUM(f2) bug25373(f1)
+-6.300000071525574 1
++6.3 1
+ 15 2
+-21.300000071525574 NULL
++21.3 NULL
+ DROP FUNCTION bug25373|
+ DROP TABLE t3|
+ DROP DATABASE IF EXISTS mysqltest1|
+--- a/mysql-test/t/sp.test
++++ b/mysql-test/t/sp.test
+@@ -6817,6 +6817,7 @@ LANGUAGE SQL DETERMINISTIC
+ RETURN p1;|
+ CREATE TABLE t3 (f1 INT, f2 FLOAT)|
+ INSERT INTO t3 VALUES (1, 3.4), (1, 2), (1, 0.9), (2, 8), (2, 7)|
++--replace_numeric_round 4
+ SELECT SUM(f2), bug25373(f1) FROM t3 GROUP BY bug25373(f1) WITH ROLLUP|
+ DROP FUNCTION bug25373|
+ DROP TABLE t3|
+--- a/mysql-test/t/wl4435_generated.inc
++++ b/mysql-test/t/wl4435_generated.inc
+@@ -246,7 +246,8 @@ CREATE TEMPORARY TABLE tmp1 AS SELECT @a
+
+ SHOW CREATE TABLE tmp1;
+
+-SELECT @a, @a - 123.4567 < 0.00001;
++--replace_numeric_round 4
++SELECT @a, @a - 123.4567 < 0.0001;
+
+ DROP TEMPORARY TABLE tmp1;
+ DROP PROCEDURE p1;