From 003f7bc5b076cc41584b45e3639a4850fe968f52 Mon Sep 17 00:00:00 2001 From: wenyuzifang Date: Thu, 4 Dec 2025 17:04:39 +0800 Subject: [PATCH] Update code from upstream --- mysql-c99.patch | 12 ++++++++ mysql-upstream-e38d49bb.patch | 54 +++++++++++++++++++++++++++++++++++ mysql.spec | 7 ++++- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 mysql-c99.patch create mode 100644 mysql-upstream-e38d49bb.patch diff --git a/mysql-c99.patch b/mysql-c99.patch new file mode 100644 index 0000000..935e64f --- /dev/null +++ b/mysql-c99.patch @@ -0,0 +1,12 @@ +diff -ur mysql-8.0.35.orig/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c mysql-8.0.35/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c +--- mysql-8.0.35.orig/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c 2023-10-12 13:45:01.000000000 +0200 ++++ mysql-8.0.35/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c 2023-12-19 10:48:46.718006624 +0100 +@@ -4070,7 +4070,7 @@ + do { + while(key_token->length != 0) { + /* whether there are more keys to fetch */ +- bool next_get = (key_token + 1)->value; ++ bool next_get = (key_token + 1)->value != NULL; + + key = key_token->value; + nkey = key_token->length; diff --git a/mysql-upstream-e38d49bb.patch b/mysql-upstream-e38d49bb.patch new file mode 100644 index 0000000..b1fca6c --- /dev/null +++ b/mysql-upstream-e38d49bb.patch @@ -0,0 +1,54 @@ +--- a/mysql-c99.patch ++++ b/mysql-c99.patch +@@ -0,0 +1,12 @@ ++diff -ur mysql-8.0.35.orig/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c mysql-8.0.35/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c ++--- mysql-8.0.35.orig/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c 2023-10-12 13:45:01.000000000 +0200 +++++ mysql-8.0.35/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c 2023-12-19 10:48:46.718006624 +0100 ++@@ -4070,7 +4070,7 @@ ++ do { ++ while(key_token->length != 0) { ++ /* whether there are more keys to fetch */ ++- bool next_get = (key_token + 1)->value; +++ bool next_get = (key_token + 1)->value != NULL; ++ ++ key = key_token->value; ++ nkey = key_token->length; + +--- a/mysql.spec ++++ b/mysql.spec +@@ -75,7 +75,7 @@ + + Name: mysql + Version: 8.0.35 +-Release: 1%{?with_debug:.debug}%{?dist} ++Release: 2%{?with_debug:.debug}%{?dist} + Summary: MySQL client programs and shared libraries + URL: http://www.mysql.com + +@@ -117,6 +117,7 @@ Patch51: %{pkgnamepatch}-sharedir.patch + Patch52: %{pkgnamepatch}-rpath.patch + Patch53: %{pkgnamepatch}-mtr.patch + Patch54: %{pkgnamepatch}-arm32-timer.patch ++Patch55: %{pkgnamepatch}-c99.patch + + # Patches taken from boost 1.59 + Patch111: boost-1.58.0-pool.patch +@@ -389,6 +390,7 @@ the MySQL sources. + %patch -P52 -p1 + %patch -P53 -p1 + %patch -P54 -p1 ++%patch -P55 -p1 + + # Patch Boost + pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) +@@ -981,6 +983,9 @@ fi + %endif + + %changelog ++* Tue Dec 19 2023 Florian Weimer - 8.0.35-2 ++- Fix int-conversion type error in memcached ++ + * Thu Sep 21 2023 Lars Tangvald - 8.0.35-1 + - Update to MySQL 8.0.35 + - Remove patches now upstream + diff --git a/mysql.spec b/mysql.spec index 20fdbe0..0ca4464 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 # Name of the package without any prefixes %global pkg_name %{name} %global pkgnamepatch mysql @@ -122,6 +122,7 @@ Patch113: add-loongarch64-support-for-mysql.patch #add support for riscv64 Patch114: riscv-lock-free.patch +Patch115: %{pkgnamepatch}-c99.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -937,6 +938,10 @@ fi %endif %changelog +* Thu Dec 04 2025 Upstream Sync - 8.0.43-%{anolis_release} +- Sync upstream changes from commit unknown +- Applied upstream updates + * Tue Jul 29 2025 wenxin - 8.0.43-1 - update 8.0.43 - fix cve CVE-2025-50081 -- Gitee