1 diff -ur mysql-8.0.35.orig/plugin/group_replication/libmysqlgcs/CMakeLists.txt mysql-8.0.35/plugin/group_replication/libmysqlgcs/CMakeLists.txt
2 --- mysql-8.0.35.orig/plugin/group_replication/libmysqlgcs/CMakeLists.txt 2023-12-17 22:05:20.830721323 +0100
3 +++ mysql-8.0.35/plugin/group_replication/libmysqlgcs/CMakeLists.txt 2023-12-17 22:07:25.296271792 +0100
5 src/bindings/xcom/gcs_xcom_statistics_interface.cc
6 src/bindings/xcom/gcs_xcom_proxy.cc
7 src/bindings/xcom/gcs_xcom_communication_protocol_changer.cc
8 - ${BUNDLED_LZ4_PATH}/xxhash.c # required by gcs_message_stage_split
9 src/bindings/xcom/gcs_message_stage_split.cc
10 src/bindings/xcom/gcs_xcom_synode.cc
11 src/bindings/xcom/gcs_xcom_expels_in_progress.cc)
13 # Dependency on mysys from gcs_logging_system.cc
14 # but pick up symbols from the server:
15 # TARGET_LINK_LIBRARIES(mysqlgcs mysys)
16 +TARGET_LINK_LIBRARIES(mysqlgcs xxhash)
18 IF(LINUX AND WITH_TIRPC STREQUAL "bundled")
19 ADD_DEPENDENCIES(mysqlgcs tirpc_ext)
20 diff -ur mysql-8.0.35.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc mysql-8.0.35/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc
21 --- mysql-8.0.35.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc 2023-12-17 22:05:20.832721348 +0100
22 +++ mysql-8.0.35/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc 2023-12-17 22:07:25.295271780 +0100
24 std::string info(node.get_member_id().get_member_id());
25 info.append(node.get_member_uuid().actual_value);
27 - return GCS_XXH64(info.c_str(), info.size(), 0);
28 + return XXH64(info.c_str(), info.size(), 0);
31 bool Gcs_message_stage_split_v2::update_members_information(
32 diff -ur mysql-8.0.35.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h mysql-8.0.35/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h
33 --- mysql-8.0.35.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h 2023-12-17 22:05:20.834721373 +0100
34 +++ mysql-8.0.35/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h 2023-12-17 22:07:25.296271792 +0100
36 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
39 -// Define a namespace prefix to all xxhash functions. This is done to
40 -// avoid conflict with xxhash symbols in liblz4.
41 -#define XXH_NAMESPACE GCS_
46 #endif // GCS_XXHASH_H_INCLUDED
47 diff -ur mysql-8.0.35.orig/sql/CMakeLists.txt mysql-8.0.35/sql/CMakeLists.txt
48 --- mysql-8.0.35.orig/sql/CMakeLists.txt 2023-12-17 22:05:21.077724399 +0100
49 +++ mysql-8.0.35/sql/CMakeLists.txt 2023-12-17 22:08:35.180142336 +0100
54 - ${BUNDLED_LZ4_PATH}/xxhash.c
56 ../sql-common/client.cc
57 ../sql-common/client_plugin.cc
62 -MY_ADD_COMPILE_DEFINITIONS(
63 - ${BUNDLED_LZ4_PATH}/xxhash.c
64 - COMPILE_DEFINITIONS XXH_NAMESPACE=MY_
67 # Workaround for Apple Clang bug on ARM.
68 # When linking mysqld (and executables using server_unittest_library)
69 # we get linker warnings about
75 - ${BUNDLED_LZ4_PATH}/xxhash.c
76 - iterators/hash_join_iterator.cc
77 - rpl_write_set_handler.cc
78 - COMPILE_FLAGS -I${CMAKE_SOURCE_DIR}/extra/lz4 -I${BUNDLED_LZ4_PATH}
81 # Fixes "C1128: number of sections exceeded object file format limit" in MSVC
85 ADD_DEPENDENCIES(sql_main GenSysSchema)
86 TARGET_LINK_LIBRARIES(sql_main ${MYSQLD_STATIC_PLUGIN_LIBS}
87 mysql_server_component_services mysys strings vio
88 - binlogevents_static ${LIBWRAP} ${LIBDL} ${SSL_LIBRARIES}
89 + binlogevents_static xxhash ${LIBWRAP} ${LIBDL} ${SSL_LIBRARIES}
92 # sql/immutable_string.h uses
93 diff -ur mysql-8.0.35.orig/sql/iterators/hash_join_iterator.cc mysql-8.0.35/sql/iterators/hash_join_iterator.cc
94 --- mysql-8.0.35.orig/sql/iterators/hash_join_iterator.cc 2023-12-17 22:05:21.366728000 +0100
95 +++ mysql-8.0.35/sql/iterators/hash_join_iterator.cc 2023-12-17 22:07:25.297271805 +0100
97 #include "field_types.h"
100 -#include "my_xxhash.h"
103 #include "my_inttypes.h"
106 const uint64_t join_key_hash =
107 join_key_and_row_buffer->length() == 0
109 - : MY_XXH64(join_key_and_row_buffer->ptr(),
110 + : XXH64(join_key_and_row_buffer->ptr(),
111 join_key_and_row_buffer->length(), xxhash_seed);
113 assert((chunks->size() & (chunks->size() - 1)) == 0);
114 diff -ur mysql-8.0.35.orig/sql/rpl_write_set_handler.cc mysql-8.0.35/sql/rpl_write_set_handler.cc
115 --- mysql-8.0.35.orig/sql/rpl_write_set_handler.cc 2023-12-17 22:05:21.611731051 +0100
116 +++ mysql-8.0.35/sql/rpl_write_set_handler.cc 2023-12-17 22:07:25.297271805 +0100
119 #include "my_inttypes.h"
120 #include "my_murmur3.h" // murmur3_32
121 -#include "my_xxhash.h" // IWYU pragma: keep
123 #include "mysql_com.h"
124 #include "sql-common/json_binary.h"
125 #include "sql-common/json_dom.h"
127 if (algorithm == HASH_ALGORITHM_MURMUR32)
128 return (murmur3_32((const uchar *)T, len, 0));
130 - return (MY_XXH64((const uchar *)T, len, 0));
131 + return (XXH64((const uchar *)T, len, 0));
135 diff -ur mysql-8.0.35.orig/unittest/gunit/hash_join-t.cc mysql-8.0.35/unittest/gunit/hash_join-t.cc
136 --- mysql-8.0.35.orig/unittest/gunit/hash_join-t.cc 2023-12-17 22:05:25.668781591 +0100
137 +++ mysql-8.0.35/unittest/gunit/hash_join-t.cc 2023-12-17 22:08:05.509772732 +0100
139 #include "my_config.h"
140 #include "my_inttypes.h"
141 #include "my_murmur3.h"
142 -#include "my_xxhash.h"
144 #include "mysql/components/services/bits/psi_bits.h"
145 #include "prealloced_array.h"
146 #include "sql/field.h"
150 for (size_t i = 0; i < num_iterations; ++i) {
151 - sum += MY_XXH64(&data[0], data.size(), 0);
152 + sum += XXH64(&data[0], data.size(), 0);
154 StopBenchmarkTiming();
159 for (size_t i = 0; i < num_iterations; ++i) {
160 - sum += MY_XXH64(&data[0], data.size(), 0);
161 + sum += XXH64(&data[0], data.size(), 0);
163 StopBenchmarkTiming();
165 diff -ur mysql-8.0.35.orig/unittest/gunit/innodb/ut0rnd-t.cc mysql-8.0.35/unittest/gunit/innodb/ut0rnd-t.cc
166 --- mysql-8.0.35.orig/unittest/gunit/innodb/ut0rnd-t.cc 2023-12-17 22:05:25.830783608 +0100
167 +++ mysql-8.0.35/unittest/gunit/innodb/ut0rnd-t.cc 2023-12-17 22:07:25.298271817 +0100
169 #include "storage/innobase/include/ut0crc32.h"
170 #include "storage/innobase/include/ut0rnd.h"
172 -#include "my_xxhash.h"
175 namespace innodb_ut0rnd_unittest {