From b6dbf4c7e008ce17332de1fc073db93eaacc1567 Mon Sep 17 00:00:00 2001 From: Renbo Date: Wed, 17 May 2023 16:40:31 +0800 Subject: [PATCH 1/4] update to mysql-8.0.32-1.module+el8.8.0+18446+fca6280e Signed-off-by: Renbo --- 1000-anolis-mysql-support-loongarch64.patch | 28 --------------------- download | 2 +- mysql.spec | 23 ++++++++--------- 3 files changed, 11 insertions(+), 42 deletions(-) delete mode 100644 1000-anolis-mysql-support-loongarch64.patch diff --git a/1000-anolis-mysql-support-loongarch64.patch b/1000-anolis-mysql-support-loongarch64.patch deleted file mode 100644 index e54e8ba..0000000 --- a/1000-anolis-mysql-support-loongarch64.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/boost/boost_1_77_0/boost/predef/other/endian.h b/boost/boost_1_73_0/boost/predef/other/endian.h -index b42da538..8cd0a508 100644 ---- a/boost/boost_1_77_0/boost/predef/other/endian.h -+++ b/boost/boost_1_77_0/boost/predef/other/endian.h -@@ -125,7 +125,8 @@ information and acquired knowledge: - defined(__MIPSEL) || \ - defined(__MIPSEL__) || \ - defined(__riscv) || \ -- defined(__e2k__) -+ defined(__e2k__) || \ -+ defined(__loongarch__) - # undef BOOST_ENDIAN_LITTLE_BYTE - # define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE - # endif -diff --git a/extra/icu/icu-release-69-1/source/i18n/double-conversion-utils.h b/extra/icu/icu-release-69-1/source/i18n/double-conversion-utils.h -index 09929846..045e6627 100644 ---- a/extra/icu/icu-release-69-1/source/i18n/double-conversion-utils.h -+++ b/extra/icu/icu-release-69-1/source/i18n/double-conversion-utils.h -@@ -128,7 +128,8 @@ int main(int argc, char** argv) { - defined(__riscv) || defined(__e2k__) || \ - defined(__or1k__) || defined(__arc__) || \ - defined(__microblaze__) || defined(__XTENSA__) || \ -- defined(__EMSCRIPTEN__) || defined(__wasm32__) -+ defined(__EMSCRIPTEN__) || defined(__wasm32__) || \ -+ defined(__loongarch__) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(__mc68000__) || \ - defined(__pnacl__) || defined(__native_client__) diff --git a/download b/download index 72c9d45..63edb0c 100644 --- a/download +++ b/download @@ -1 +1 @@ -313d625fcaa932bd87b48f0cf9b40f1c mysql-boost-8.0.30.tar.gz +ac9445f619135336c8b4553d4e81b684 mysql-boost-8.0.32.tar.gz diff --git a/mysql.spec b/mysql.spec index 86abeaf..2141d3c 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 # SCL stuff %{?scl:%scl_package mysql} %{!?scl:%global pkg_name %{name}} @@ -12,12 +11,12 @@ %{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail, but 0 on production ready build -%global ignore_testsuite_result 0 +%{!?check_testsuite:%global ignore_testsuite_result 0} # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run # run only "main" suite -%global last_tested_version 8.0.30 +%global last_tested_version 8.0.32 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 @@ -145,8 +144,8 @@ %endif Name: %{?scl_prefix}mysql -Version: 8.0.30 -Release: 1%{anolis_release}%{?with_debug:.debug}%{?dist} +Version: 8.0.32 +Release: 1%{?with_debug:.debug}%{?dist} Summary: MySQL client programs and shared libraries URL: http://www.mysql.com @@ -208,8 +207,6 @@ Patch113: boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch # Use same logfile path in logrotate and mysql configs Patch126: mysql-logrotate-log-path.patch -Patch1000: 1000-anolis-mysql-support-loongarch64.patch - BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: libaio-devel @@ -520,8 +517,6 @@ the MySQL sources. %patch54 -p1 %patch126 -p1 -%patch1000 -p1 - # Patch Boost pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) %patch111 -p0 @@ -741,6 +736,7 @@ install -p -m 644 scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql- install -D -p -m 0644 scripts/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf install -D -p -m 0644 %{SOURCE32} %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkg_name}-default-authentication-plugin.cnf +rm %{buildroot}%{_infodir}/mysql.info* rm %{buildroot}%{_libdir}/mysql/*.a rm %{buildroot}%{_mandir}/man1/comp_err.1* @@ -1210,10 +1206,11 @@ fi %endif %changelog -* Thu Oct 27 2022 zhangbinchen - 8.0.30-1.0.1 -- remove check_testsuite -- redefine ignore_testsuite_result -- Support loongarch64 platform (liwei.glw@openanolis.org) +* Thu Jan 05 2023 Lars Tangvald - 8.0.32-1 +- Update to MySQL 8.0.32 + +* Fri Sep 30 2022 Lars Tangvald - 8.0.31-1 +- Update to MySQL 8.0.31 * Wed Jul 06 2022 Lars Tangvald - 8.0.30-1 - Update to MySQL 8.0.30 -- Gitee From 0031da5e3685c38f7707251358768d445a3e7bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BD=AC=E7=90=9B?= Date: Thu, 23 Dec 2021 12:09:22 +0000 Subject: [PATCH 2/4] !1 build fix mysql * spec : fix build --- mysql.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mysql.spec b/mysql.spec index 2141d3c..a0212ce 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # SCL stuff %{?scl:%scl_package mysql} %{!?scl:%global pkg_name %{name}} @@ -11,7 +12,7 @@ %{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail, but 0 on production ready build -%{!?check_testsuite:%global ignore_testsuite_result 0} +%global ignore_testsuite_result 0 # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run @@ -145,7 +146,7 @@ Name: %{?scl_prefix}mysql Version: 8.0.32 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 1%{anolis_release}%{?with_debug:.debug}%{?dist} Summary: MySQL client programs and shared libraries URL: http://www.mysql.com @@ -1206,6 +1207,10 @@ fi %endif %changelog +* Thu May 18 2023 zhangbinchen - 8.0.32-1.0.1 +- remove check_testsuite +- redefine ignore_testsuite_result + * Thu Jan 05 2023 Lars Tangvald - 8.0.32-1 - Update to MySQL 8.0.32 -- Gitee From 8259701327fefc5d0524d95fc1016d8ba07e3a93 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Tue, 9 Nov 2021 19:52:16 +0800 Subject: [PATCH 3/4] build: support loongarch64 platform Signed-off-by: Liwei Ge --- 1000-anolis-mysql-support-loongarch64.patch | 28 +++++++++++++++++++++ mysql.spec | 5 ++++ 2 files changed, 33 insertions(+) create mode 100644 1000-anolis-mysql-support-loongarch64.patch diff --git a/1000-anolis-mysql-support-loongarch64.patch b/1000-anolis-mysql-support-loongarch64.patch new file mode 100644 index 0000000..e54e8ba --- /dev/null +++ b/1000-anolis-mysql-support-loongarch64.patch @@ -0,0 +1,28 @@ +diff --git a/boost/boost_1_77_0/boost/predef/other/endian.h b/boost/boost_1_73_0/boost/predef/other/endian.h +index b42da538..8cd0a508 100644 +--- a/boost/boost_1_77_0/boost/predef/other/endian.h ++++ b/boost/boost_1_77_0/boost/predef/other/endian.h +@@ -125,7 +125,8 @@ information and acquired knowledge: + defined(__MIPSEL) || \ + defined(__MIPSEL__) || \ + defined(__riscv) || \ +- defined(__e2k__) ++ defined(__e2k__) || \ ++ defined(__loongarch__) + # undef BOOST_ENDIAN_LITTLE_BYTE + # define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE + # endif +diff --git a/extra/icu/icu-release-69-1/source/i18n/double-conversion-utils.h b/extra/icu/icu-release-69-1/source/i18n/double-conversion-utils.h +index 09929846..045e6627 100644 +--- a/extra/icu/icu-release-69-1/source/i18n/double-conversion-utils.h ++++ b/extra/icu/icu-release-69-1/source/i18n/double-conversion-utils.h +@@ -128,7 +128,8 @@ int main(int argc, char** argv) { + defined(__riscv) || defined(__e2k__) || \ + defined(__or1k__) || defined(__arc__) || \ + defined(__microblaze__) || defined(__XTENSA__) || \ +- defined(__EMSCRIPTEN__) || defined(__wasm32__) ++ defined(__EMSCRIPTEN__) || defined(__wasm32__) || \ ++ defined(__loongarch__) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(__mc68000__) || \ + defined(__pnacl__) || defined(__native_client__) diff --git a/mysql.spec b/mysql.spec index a0212ce..b230597 100644 --- a/mysql.spec +++ b/mysql.spec @@ -208,6 +208,8 @@ Patch113: boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch # Use same logfile path in logrotate and mysql configs Patch126: mysql-logrotate-log-path.patch +Patch1000: 1000-anolis-mysql-support-loongarch64.patch + BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: libaio-devel @@ -518,6 +520,8 @@ the MySQL sources. %patch54 -p1 %patch126 -p1 +%patch1000 -p1 + # Patch Boost pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) %patch111 -p0 @@ -1210,6 +1214,7 @@ fi * Thu May 18 2023 zhangbinchen - 8.0.32-1.0.1 - remove check_testsuite - redefine ignore_testsuite_result +- Support loongarch64 platform (liwei.glw@openanolis.org) * Thu Jan 05 2023 Lars Tangvald - 8.0.32-1 - Update to MySQL 8.0.32 -- Gitee From 26a80dbfd17b944e487776ffca1355bd1b1923da Mon Sep 17 00:00:00 2001 From: Bo Ren Date: Fri, 19 May 2023 14:07:46 +0800 Subject: [PATCH 4/4] fix test failure Signed-off-by: Bo Ren --- ...-fix-derived-condition-pushdown-test.patch | 22 +++++++++++++++++ ...have_32bits_time-test-on-loongarch64.patch | 11 +++++++++ ...-loaddata-special-test-for-loongarch.patch | 24 +++++++++++++++++++ mysql.spec | 12 ++++++++++ 4 files changed, 69 insertions(+) create mode 100644 1001-fix-derived-condition-pushdown-test.patch create mode 100644 1002-skip-have_32bits_time-test-on-loongarch64.patch create mode 100644 1003-fix-loaddata-special-test-for-loongarch.patch diff --git a/1001-fix-derived-condition-pushdown-test.patch b/1001-fix-derived-condition-pushdown-test.patch new file mode 100644 index 0000000..69ecef1 --- /dev/null +++ b/1001-fix-derived-condition-pushdown-test.patch @@ -0,0 +1,22 @@ +--- mysql-test/t/derived_condition_pushdown.test.orig 2023-05-19 15:10:36.491463748 +0800 ++++ mysql-test/t/derived_condition_pushdown.test 2023-05-19 15:13:37.235839144 +0800 +@@ -1312,7 +1312,7 @@ + --skip_if_hypergraph # Depends on the query plan. + eval EXECUTE stmt USING @a, @b; + SET @a = 2; +-SET @b = '2023-05-06 16:49:45'; ++SET @b = '2033-05-06 16:49:45'; + --replace_regex $elide_costs + --skip_if_hypergraph # Depends on the query plan. + eval EXECUTE stmt USING @a, @b; +--- mysql-test/r/derived_condition_pushdown.result.orig 2023-05-19 13:53:02.848129213 +0800 ++++ mysql-test/r/derived_condition_pushdown.result 2023-05-19 15:13:15.712675361 +0800 +@@ -2110,7 +2110,7 @@ + -> Zero rows (no matching row in const table) (rows=0) + + SET @a = 2; +-SET @b = '2023-05-06 16:49:45'; ++SET @b = '2033-05-06 16:49:45'; + EXECUTE stmt USING @a, @b; + EXPLAIN + -> Table scan on dt (rows=2) diff --git a/1002-skip-have_32bits_time-test-on-loongarch64.patch b/1002-skip-have_32bits_time-test-on-loongarch64.patch new file mode 100644 index 0000000..eecf4f4 --- /dev/null +++ b/1002-skip-have_32bits_time-test-on-loongarch64.patch @@ -0,0 +1,11 @@ +--- mysql-8.0.32/mysql-test/include/have_32bits_time.inc 2022-12-16 23:34:44.000000000 +0800 ++++ mysql-8.0.32/mysql-test/include/have_32bits_time.inc.new 2023-05-19 22:46:34.731475815 +0800 +@@ -2,7 +2,7 @@ + + let $have_64bit = `SELECT @@version_compile_machine IN + ('x86_64', 'amd64', 'sparc', 'sparc64', 'arm64', 'aarch64', +- 'ppc64', 'ppc64le', 's390x')`; ++ 'loongarch64', 'ppc64', 'ppc64le', 's390x')`; + if ($have_64bit) { + --skip Doesn't support 32 bits UNIX time, only 64 bits + } diff --git a/1003-fix-loaddata-special-test-for-loongarch.patch b/1003-fix-loaddata-special-test-for-loongarch.patch new file mode 100644 index 0000000..308aa99 --- /dev/null +++ b/1003-fix-loaddata-special-test-for-loongarch.patch @@ -0,0 +1,24 @@ +--- mysql-test/t/loaddata_special.test.orig 2023-05-20 11:42:30.956908281 +0800 ++++ mysql-test/t/loaddata_special.test 2023-05-22 10:38:18.345995071 +0800 +@@ -13,7 +13,7 @@ + SET GLOBAL net_buffer_length = 1024; + SET GLOBAL max_allowed_packet = 1024; + connect (con2,localhost,root,,); # Makes max_allowed_packet take effect, globally. +-select load_file("/proc/modules"); ++select load_file("/proc/crypto"); + connection default; + SET GLOBAL max_allowed_packet = @old_max_allowed_packet; + SET GLOBAL net_buffer_length = @old_net_buffer_length; +--- mysql-test/r/loaddata_special.result.orig 2023-05-20 10:05:30.205788721 +0800 ++++ mysql-test/r/loaddata_special.result 2023-05-22 10:39:16.085415447 +0800 +@@ -6,8 +6,8 @@ + SET @old_max_allowed_packet= @@global.max_allowed_packet; + SET GLOBAL net_buffer_length = 1024; + SET GLOBAL max_allowed_packet = 1024; +-select load_file("/proc/modules"); +-load_file("/proc/modules") ++select load_file("/proc/crypto"); ++load_file("/proc/crypto") + NULL + Warnings: + Warning 1301 Result of load_file() was larger than max_allowed_packet (1024) - truncated diff --git a/mysql.spec b/mysql.spec index b230597..736ea3e 100644 --- a/mysql.spec +++ b/mysql.spec @@ -209,6 +209,9 @@ Patch113: boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch Patch126: mysql-logrotate-log-path.patch Patch1000: 1000-anolis-mysql-support-loongarch64.patch +Patch1001: 1001-fix-derived-condition-pushdown-test.patch +Patch1002: 1002-skip-have_32bits_time-test-on-loongarch64.patch +Patch1003: 1003-fix-loaddata-special-test-for-loongarch.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -521,6 +524,12 @@ the MySQL sources. %patch126 -p1 %patch1000 -p1 +%patch1001 -p0 +%patch1002 -p1 + +%ifarch loongarch64 +%patch1003 -p0 +%endif # Patch Boost pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) @@ -1215,6 +1224,9 @@ fi - remove check_testsuite - redefine ignore_testsuite_result - Support loongarch64 platform (liwei.glw@openanolis.org) +- skip have_32bits_time test on loongarch64 (liwei.glw@openanolis.org) +- fix main.derived_condition_pushdown test (rb01097748@alibaba-inc.com) +- fix loaddata_special test for loongarch64 (rb01097748@alibaba-inc.com) * Thu Jan 05 2023 Lars Tangvald - 8.0.32-1 - Update to MySQL 8.0.32 -- Gitee