From bf5dc30371a86052c1059b14089d5c7553b2ad95 Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Thu, 20 Feb 2025 10:15:51 +0800 Subject: [PATCH 1/4] [CVE]update to mysql-8.0.41-1.src.rpm to #IBNI8W update to mysql-8.0.41-1.src.rpm for CVE-2024-5535 CVE-2024-7264 CVE-2024-11053 CVE-2024-21193 CVE-2024-21194 CVE-2024-21196 CVE-2024-21197 CVE-2024-21198 CVE-2024-21199 CVE-2024-21201 CVE-2024-21203 CVE-2024-21212 CVE-2024-21213 CVE-2024-21218 CVE-2024-21219 CVE-2024-21230 CVE-2024-21231 CVE-2024-21236 CVE-2024-21237 CVE-2024-21238 CVE-2024-21239 CVE-2024-21241 CVE-2024-21247 CVE-2024-37371 CVE-2025-21490 CVE-2025-21491 CVE-2025-21494 CVE-2025-21497 CVE-2025-21500 CVE-2025-21501 CVE-2025-21503 CVE-2025-21504 CVE-2025-21505 CVE-2025-21518 CVE-2025-21519 CVE-2025-21520 CVE-2025-21521 CVE-2025-21522 CVE-2025-21523 CVE-2025-21525 CVE-2025-21529 CVE-2025-21531 CVE-2025-21534 CVE-2025-21536 CVE-2025-21540 CVE-2025-21543 CVE-2025-21546 CVE-2025-21555 CVE-2025-21559 Project: TC2024080204 Signed-off-by: Zhao Hang --- 1000-anolis-mysql-support-loongarch64.patch | 14 ------- ...-fix-derived-condition-pushdown-test.patch | 22 ---------- ...have_32bits_time-test-on-loongarch64.patch | 11 ----- ...-loaddata-special-test-for-loongarch.patch | 24 ----------- boost-1.58.0-pool.patch | 8 ++-- ...fix_multiprecision_issue_419-ppc64le.patch | 4 +- download | 2 +- mysql-mtr.patch | 28 ++++++------- mysql.spec | 40 +++++-------------- rh-skipped-tests-list-ppc.list | 3 ++ rh-skipped-tests-list-s390.list | 4 ++ 11 files changed, 38 insertions(+), 122 deletions(-) delete mode 100644 1000-anolis-mysql-support-loongarch64.patch delete mode 100644 1001-fix-derived-condition-pushdown-test.patch delete mode 100644 1002-skip-have_32bits_time-test-on-loongarch64.patch delete mode 100644 1003-fix-loaddata-special-test-for-loongarch.patch diff --git a/1000-anolis-mysql-support-loongarch64.patch b/1000-anolis-mysql-support-loongarch64.patch deleted file mode 100644 index 0d80cb8..0000000 --- a/1000-anolis-mysql-support-loongarch64.patch +++ /dev/null @@ -1,14 +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/1001-fix-derived-condition-pushdown-test.patch b/1001-fix-derived-condition-pushdown-test.patch deleted file mode 100644 index c9e0414..0000000 --- a/1001-fix-derived-condition-pushdown-test.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- 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'; - SET timestamp=UNIX_TIMESTAMP('2023-05-06 16:49:45'); - --replace_regex $elide_costs - --skip_if_hypergraph # Depends on the query plan. ---- 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'; - SET timestamp=UNIX_TIMESTAMP('2023-05-06 16:49:45'); - EXECUTE stmt USING @a, @b; - EXPLAIN diff --git a/1002-skip-have_32bits_time-test-on-loongarch64.patch b/1002-skip-have_32bits_time-test-on-loongarch64.patch deleted file mode 100644 index eecf4f4..0000000 --- a/1002-skip-have_32bits_time-test-on-loongarch64.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 deleted file mode 100644 index 308aa99..0000000 --- a/1003-fix-loaddata-special-test-for-loongarch.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- 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/boost-1.58.0-pool.patch b/boost-1.58.0-pool.patch index ed8449e..21be0cc 100644 --- a/boost-1.58.0-pool.patch +++ b/boost-1.58.0-pool.patch @@ -1,7 +1,7 @@ Index: boost/pool/pool.hpp =================================================================== ---- boost/pool/pool.hpp (revision 78317) -+++ boost/pool/pool.hpp (revision 78326) +--- a/boost/pool/pool.hpp (revision 78317) ++++ b/boost/pool/pool.hpp (revision 78326) @@ -27,4 +27,6 @@ #include @@ -88,8 +88,8 @@ Index: boost/pool/pool.hpp // insert it into the list, Index: libs/pool/test/test_bug_6701.cpp =================================================================== ---- libs/pool/test/test_bug_6701.cpp (revision 78326) -+++ libs/pool/test/test_bug_6701.cpp (revision 78326) +--- a/libs/pool/test/test_bug_6701.cpp (revision 78326) ++++ b/libs/pool/test/test_bug_6701.cpp (revision 78326) @@ -0,0 +1,27 @@ +/* Copyright (C) 2012 Étienne Dupuis +* diff --git a/boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch b/boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch index 5cd6d40..71552bf 100644 --- a/boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch +++ b/boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch @@ -10,8 +10,8 @@ Subject: [PATCH] Update gcc Intel intrinsic usage config. Fixes diff --git a/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp b/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp index eb4624bb4..37717cd51 100644 ---- a/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp -+++ b/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp +--- a/boost/multiprecision/cpp_int/intel_intrinsics.hpp ++++ b/boost/multiprecision/cpp_int/intel_intrinsics.hpp @@ -19,7 +19,11 @@ // If this is GCC/clang, then check that the actual intrinsic exists: // diff --git a/download b/download index 02fc58b..2f66c06 100644 --- a/download +++ b/download @@ -1 +1 @@ -6708e66d69bafc0dd7b481468e192203 mysql-boost-8.0.36.tar.gz +6836fe6426f9d5b6c3ff576b9d1e147f mysql-boost-8.0.41.tar.gz diff --git a/mysql-mtr.patch b/mysql-mtr.patch index 3bb6559..cb847bd 100644 --- a/mysql-mtr.patch +++ b/mysql-mtr.patch @@ -1,7 +1,7 @@ Avoid errors like: | Path length (109) is longer than maximum supported length (108) and will be truncated at /usr/lib64/perl5/vendor_perl/Socket.pm line 880, line 1. -| worker[2] mysql-test-run: *** ERROR: Socket path '/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.s390x/usr/share/mysql-test/var/tmp/2' too long, +| worker[2] mysql-test-run: *** ERROR: Socket path '/builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.s390x/usr/share/mysql-test/var/tmp/2' too long, | it would be truncated and thus not possible to use for connection to MySQL Server. Set a shorter with --tmpdir= option === @@ -26,7 +26,7 @@ The question is why haven't I encountered this issue until recently ? After the recent tweaks to the testsuite (between 8.0.24 and 8.0.25 release), the generated --tmpdir path changed from | --tmpdir=/builddir/build/BUILD/mysql-8.0.24/x86_64-redhat-linux-gnu/mysql-test/var/tmp/ to -| --tmpdir=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp/ +| --tmpdir=/builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp/ === @@ -39,7 +39,7 @@ BEFORE: AFTER: | Installing system database -| ### safe_path: /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/bin//mysqltest_safe_process --verbose -- /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/libexec/mysqld --no-defaults --initialize-insecure --loose-skip-ndbcluster --tmpdir=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp/ --core-file --datadir=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/data/ --secure-file-priv=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var --innodb_buffer_pool_size=24M --innodb-log-file-size=5M --innodb_autoextend_increment=8 --character-sets-dir=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/community-mysql/charsets --loose-auto_generate_certs=OFF --loose-sha256_password_auto_generate_rsa_keys=OFF --loose-caching_sha2_password_auto_generate_rsa_keys=OFF --init-file=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp/bootstrap.sql +| ### safe_path: /builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/bin//mysqltest_safe_process --verbose -- /builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/libexec/mysqld --no-defaults --initialize-insecure --loose-skip-ndbcluster --tmpdir=/builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp/ --core-file --datadir=/builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/data/ --secure-file-priv=/builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var --innodb_buffer_pool_size=24M --innodb-log-file-size=5M --innodb_autoextend_increment=8 --character-sets-dir=/builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql/charsets --loose-auto_generate_certs=OFF --loose-sha256_password_auto_generate_rsa_keys=OFF --loose-caching_sha2_password_auto_generate_rsa_keys=OFF --init-file=/builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp/bootstrap.sql === @@ -59,21 +59,21 @@ Even though the script warns about the path length, tries to workaround it; it d I'm not sure whether the output is synchronous, but even if it wasn'tit still looks weird. -| + cd /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test +| + cd /builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test | Logging: ./mysql-test-run.pl --verbose --parallel=auto --force --retry=2 --suite-timeout=900 --testcase-timeout=30 --mysqld=--binlog-format=mixed --max-test-fail=5 --report-unstable-tests --clean-vardir --suite=main --mem --skip-test-list=platform-specific-tests.list | Path length (109) is longer than maximum supported length (108) and will be truncated at /usr/lib64/perl5/vendor_perl/Socket.pm line 880. -| Too long tmpdir path '/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp' creating a shorter one +| Too long tmpdir path '/builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp' creating a shorter one | - Using tmpdir: '/tmp/XfTFAis2Jl' | > Collecting: main -| > testdir: /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/t -| > resdir: /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/r +| > testdir: /builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/t +| > resdir: /builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/r | > Collecting: i_main | Removing old var directory -| > opt_vardir: /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var -| > Removing /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/ +| > opt_vardir: /builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var +| > Removing /builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/ | > Removing /dev/shm/var_933_jfTb | > Removing /tmp/XfTFAis2Jl/ -| Creating var directory '/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var' +| Creating var directory '/builddir/build/BUILDROOT/mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var' | > Creating /dev/shm/var_933_jfTb | - symlinking 'var' to '/dev/shm/var_933_jfTb' @@ -82,9 +82,9 @@ I'm not sure whether the output is synchronous, but even if it wasn'tit still lo diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 26e6c92c..9d85c6d6 100755 ---- a/mysql-test/mysql-test-run.pl -+++ b/mysql-test/mysql-test-run.pl -@@ -3533,17 +3533,6 @@ sub setup_vardir() { +--- mysql-8.0.39/mysql-test/mysql-test-run.pl 2024-08-11 01:20:12.207260860 +0200 ++++ mysql-8.0.39/mysql-test/mysql-test-run.pl_patched 2024-08-11 20:44:42.230145160 +0200 +@@ -3560,17 +3560,6 @@ sub setup_vardir() { mkpath("$opt_vardir/tmp"); mkpath($opt_tmpdir) if ($opt_tmpdir ne "$opt_vardir/tmp"); @@ -92,7 +92,7 @@ index 26e6c92c..9d85c6d6 100755 - # UNIX domain socket's path far below PATH_MAX. Don't allow that - # to happen. - my $res = -- check_socket_path_length("$opt_tmpdir/mysqld.NN.sock", $opt_parallel); +- check_socket_path_length("$opt_tmpdir/mysqld.NN.sock", $opt_parallel, $tmpdir_path_updated); - if ($res) { - mtr_error("Socket path '$opt_tmpdir' too long, it would be ", - "truncated and thus not possible to use for connection to ", diff --git a/mysql.spec b/mysql.spec index 38ade2f..1640d5c 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}} @@ -15,12 +14,12 @@ ExcludeArch: %{ix86} %{!?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.36 +%global last_tested_version 8.0.41 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 @@ -68,7 +67,7 @@ ExcludeArch: %{ix86} %else %bcond_without bundled_protobuf %endif -%global protobuf_bundled_version 3.19.4 +%global protobuf_bundled_version 24.4 # Mysql 8.0.21 needs libevent version >2.1 and rhel-7 provides 2.0 # Also since Mysql 8.0.18, libzstd is required, but it's not in rhel until version 8 @@ -89,7 +88,7 @@ ExcludeArch: %{ix86} %endif %global zstd_bundled_version 1.5.5 %global libevent_bundled_version 2.1.11 -%global fido2_bundled_version 1.13.0 +%global fido2_bundled_version 1.15.0 # Include files for SysV init or systemd %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 @@ -148,8 +147,8 @@ ExcludeArch: %{ix86} %endif Name: %{?scl_prefix}mysql -Version: 8.0.36 -Release: 1%{anolis_release}%{?with_debug:.debug}%{?dist} +Version: 8.0.41 +Release: 1%{?with_debug:.debug}%{?dist} Summary: MySQL client programs and shared libraries URL: http://www.mysql.com @@ -212,11 +211,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 -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++ BuildRequires: libaio-devel @@ -528,19 +522,11 @@ the MySQL sources. %patch55 -p1 %patch126 -p1 -%patch1000 -p1 -%patch1001 -p0 -%patch1002 -p1 - -%ifarch loongarch64 -%patch1003 -p0 -%endif - # Patch Boost pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) -%patch111 -p0 +%patch111 -p1 %patch112 -p1 -%patch113 -p2 +%patch113 -p1 popd # check that we have correct versions in bundled(*) Provides above (boost checked with pushd above) @@ -576,7 +562,6 @@ cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \ cp %{SOURCE41} mysql-sysnice.te - %build %{set_build_flags} @@ -1224,13 +1209,8 @@ fi %endif %changelog -* Fri Feb 23 2024 zhangbinchen - 8.0.36-1.0.1 -- 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) +* Fri Feb 07 2025 Lukas Javorsky - 8.0.41-1 +- Update to MySQL 8.0.41 * Wed Jan 03 2024 Lars Tangvald - 8.0.36-1 - Update to MySQL 8.0.36 diff --git a/rh-skipped-tests-list-ppc.list b/rh-skipped-tests-list-ppc.list index 579f9e7..5976753 100644 --- a/rh-skipped-tests-list-ppc.list +++ b/rh-skipped-tests-list-ppc.list @@ -3,3 +3,6 @@ sys_vars.innodb_buffer_pool_size_basic : BUG#0 fails only on ppc64le on f32+ # Unstable on 8.0.35 rpl.rpl_replica_terminology : BUG#0 + +# Unstable on 8.0.36 +main.bind_address_3 : BUG#0 diff --git a/rh-skipped-tests-list-s390.list b/rh-skipped-tests-list-s390.list index 3a6668d..064d587 100644 --- a/rh-skipped-tests-list-s390.list +++ b/rh-skipped-tests-list-s390.list @@ -3,3 +3,7 @@ main.subquery_bugs : BUG#0 # Failing on C9S & RHEL 9 for MySQL release 8.0.33 main.subquery_sj_all_bka_nobnl : BUG#0 + +# Fails since 8.0.41 +main.archive : BUG#0 +main.func_compress : BUG#0 -- Gitee From 5245942e264d1d88806efe445428823d4f736112 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 1640d5c..a30ecdf 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}} @@ -14,7 +15,7 @@ ExcludeArch: %{ix86} %{!?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 @@ -148,7 +149,7 @@ ExcludeArch: %{ix86} Name: %{?scl_prefix}mysql Version: 8.0.41 -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 @@ -1209,6 +1210,10 @@ fi %endif %changelog +* Thu Feb 20 2025 zhangbinchen - 8.0.41-1.0.1 +- remove check_testsuite +- redefine ignore_testsuite_result + * Fri Feb 07 2025 Lukas Javorsky - 8.0.41-1 - Update to MySQL 8.0.41 -- Gitee From 7832373b7e82a8eb9b6ccdb902714ee4a831c85c 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 | 14 ++++++++++++++ mysql.spec | 5 +++++ 2 files changed, 19 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..0d80cb8 --- /dev/null +++ b/1000-anolis-mysql-support-loongarch64.patch @@ -0,0 +1,14 @@ +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/mysql.spec b/mysql.spec index a30ecdf..f5989bc 100644 --- a/mysql.spec +++ b/mysql.spec @@ -212,6 +212,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 @@ -523,6 +525,8 @@ the MySQL sources. %patch55 -p1 %patch126 -p1 +%patch1000 -p1 + # Patch Boost pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) %patch111 -p1 @@ -1213,6 +1217,7 @@ fi * Thu Feb 20 2025 zhangbinchen - 8.0.41-1.0.1 - remove check_testsuite - redefine ignore_testsuite_result +- Support loongarch64 platform (liwei.glw@openanolis.org) * Fri Feb 07 2025 Lukas Javorsky - 8.0.41-1 - Update to MySQL 8.0.41 -- Gitee From 0e990172ddbcd22343b36c61c1389ca329a60fad 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..c9e0414 --- /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'; + SET timestamp=UNIX_TIMESTAMP('2023-05-06 16:49:45'); + --replace_regex $elide_costs + --skip_if_hypergraph # Depends on the query plan. +--- 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'; + SET timestamp=UNIX_TIMESTAMP('2023-05-06 16:49:45'); + EXECUTE stmt USING @a, @b; + EXPLAIN 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 f5989bc..ac0a609 100644 --- a/mysql.spec +++ b/mysql.spec @@ -213,6 +213,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++ @@ -526,6 +529,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 . _) @@ -1218,6 +1227,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) * Fri Feb 07 2025 Lukas Javorsky - 8.0.41-1 - Update to MySQL 8.0.41 -- Gitee