X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=mysql-system-xxhash.patch;fp=mysql-system-xxhash.patch;h=62c1cc64f436fcc4f1069a04f877c244e466ef15;hb=597679dfcda245060ec36488b09cda848cab0a13;hp=5d1fc10788ab4d234df0b3139c732bc0b31a88aa;hpb=45b681a59f6e61e0324f532f88f1a9addcd14c45;p=packages%2Fmysql.git diff --git a/mysql-system-xxhash.patch b/mysql-system-xxhash.patch index 5d1fc10..62c1cc6 100644 --- a/mysql-system-xxhash.patch +++ b/mysql-system-xxhash.patch @@ -1,7 +1,7 @@ -diff -ur mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/CMakeLists.txt mysql-8.2.0/plugin/group_replication/libmysqlgcs/CMakeLists.txt ---- mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/CMakeLists.txt 2023-12-18 01:19:34.054277743 +0100 -+++ mysql-8.2.0/plugin/group_replication/libmysqlgcs/CMakeLists.txt 2023-12-18 01:20:07.130718562 +0100 -@@ -137,7 +137,6 @@ +diff -urNpa mysql-8.4.0.orig/plugin/group_replication/libmysqlgcs/CMakeLists.txt mysql-8.4.0/plugin/group_replication/libmysqlgcs/CMakeLists.txt +--- mysql-8.4.0.orig/plugin/group_replication/libmysqlgcs/CMakeLists.txt 2024-05-09 18:15:12.545961950 +0200 ++++ mysql-8.4.0/plugin/group_replication/libmysqlgcs/CMakeLists.txt 2024-05-09 18:15:56.994571858 +0200 +@@ -138,7 +138,6 @@ SET(GCS_SOURCES src/bindings/xcom/gcs_xcom_statistics_interface.cc src/bindings/xcom/gcs_xcom_proxy.cc src/bindings/xcom/gcs_xcom_communication_protocol_changer.cc @@ -9,7 +9,7 @@ diff -ur mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/CMakeLists.txt my src/bindings/xcom/gcs_message_stage_split.cc src/bindings/xcom/gcs_xcom_synode.cc src/bindings/xcom/gcs_xcom_expels_in_progress.cc -@@ -235,6 +234,7 @@ +@@ -236,6 +235,7 @@ ADD_LIBRARY(mysqlgcs STATIC ${XCOM_SOURC # Dependency on mysys from gcs_logging_system.cc # but pick up symbols from the server: # TARGET_LINK_LIBRARIES(mysqlgcs mysys) @@ -17,10 +17,10 @@ diff -ur mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/CMakeLists.txt my IF(LINUX AND WITH_TIRPC STREQUAL "bundled") ADD_DEPENDENCIES(mysqlgcs tirpc_ext) -diff -ur mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc mysql-8.2.0/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc ---- mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc 2023-12-18 01:19:34.056277770 +0100 -+++ mysql-8.2.0/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc 2023-12-18 01:20:07.117718388 +0100 -@@ -126,7 +126,7 @@ +diff -urNpa mysql-8.4.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc mysql-8.4.0/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc +--- mysql-8.4.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc 2024-05-09 18:15:12.549962005 +0200 ++++ mysql-8.4.0/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc 2024-05-09 18:15:57.910584352 +0200 +@@ -127,7 +127,7 @@ Gcs_sender_id calculate_sender_id(const std::string info(node.get_member_id().get_member_id()); info.append(node.get_member_uuid().actual_value); @@ -29,10 +29,10 @@ diff -ur mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom } bool Gcs_message_stage_split_v2::update_members_information( -diff -ur mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h mysql-8.2.0/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h ---- mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h 2023-12-18 01:19:34.068277930 +0100 -+++ mysql-8.2.0/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h 2023-12-18 01:20:07.130718562 +0100 -@@ -25,10 +25,6 @@ +diff -urNpa mysql-8.4.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h mysql-8.4.0/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h +--- mysql-8.4.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h 2024-05-09 18:15:12.549962005 +0200 ++++ mysql-8.4.0/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h 2024-05-09 18:15:57.910584352 +0200 +@@ -26,10 +26,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -44,10 +44,10 @@ diff -ur mysql-8.2.0.orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom +#include #endif // GCS_XXHASH_H_INCLUDED -diff -ur mysql-8.2.0.orig/sql/CMakeLists.txt mysql-8.2.0/sql/CMakeLists.txt ---- mysql-8.2.0.orig/sql/CMakeLists.txt 2023-12-18 01:19:34.892288911 +0100 -+++ mysql-8.2.0/sql/CMakeLists.txt 2023-12-18 01:22:41.637779746 +0100 -@@ -766,7 +766,6 @@ +diff -urNpa mysql-8.4.0.orig/sql/CMakeLists.txt mysql-8.4.0/sql/CMakeLists.txt +--- mysql-8.4.0.orig/sql/CMakeLists.txt 2024-05-09 18:15:03.917843242 +0200 ++++ mysql-8.4.0/sql/CMakeLists.txt 2024-05-09 18:16:12.978789893 +0200 +@@ -762,7 +762,6 @@ SET(SQL_SOURCE ${CONF_SOURCES} ${SQL_SHARED_SOURCES} ${SQL_HEADERS} @@ -55,7 +55,7 @@ diff -ur mysql-8.2.0.orig/sql/CMakeLists.txt mysql-8.2.0/sql/CMakeLists.txt ../libmysql/errmsg.cc ../sql-common/client.cc ../sql-common/client_plugin.cc -@@ -831,11 +830,6 @@ +@@ -828,11 +827,6 @@ IF(WIN32) ) ENDIF() @@ -67,11 +67,10 @@ diff -ur mysql-8.2.0.orig/sql/CMakeLists.txt mysql-8.2.0/sql/CMakeLists.txt # Workaround for Apple Clang bug on ARM. # When linking mysqld (and executables using server_unittest_library) # we get linker warnings about -@@ -860,14 +854,6 @@ - ) +@@ -858,14 +852,6 @@ IF(APPLE_ARM) ENDIF() --ADD_COMPILE_FLAGS( + ADD_COMPILE_FLAGS( - ${BUNDLED_LZ4_PATH}/xxhash.c - iterators/hash_join_iterator.cc - iterators/composite_iterators.cc @@ -79,31 +78,32 @@ diff -ur mysql-8.2.0.orig/sql/CMakeLists.txt mysql-8.2.0/sql/CMakeLists.txt - COMPILE_FLAGS -I${CMAKE_SOURCE_DIR}/extra/lz4 -I${BUNDLED_LZ4_PATH} - ) - - # Fixes "C1128: number of sections exceeded object file format limit" in MSVC - IF(WIN32) - ADD_COMPILE_FLAGS( -@@ -961,7 +947,7 @@ +-ADD_COMPILE_FLAGS( + iterators/composite_iterators.cc + iterators/hash_join_buffer.cc + COMPILE_FLAGS +@@ -966,7 +952,7 @@ MYSQL_ADD_PLUGIN(mysql_native_password TARGET_LINK_LIBRARIES(sql_main ${MYSQLD_STATIC_PLUGIN_LIBS} mysql_server_component_services mysys strings vio - mysql_binlog_event ${LIBWRAP} ${LIBDL} OpenSSL::SSL OpenSSL::Crypto + mysql_binlog_event xxhash ${LIBWRAP} ${LIBDL} OpenSSL::SSL OpenSSL::Crypto - extra::rapidjson) + extra::rapidjson extra::boost) # sql/immutable_string.h uses -diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/iterators/composite_iterators.cc ---- mysql-8.2.0.orig/sql/iterators/composite_iterators.cc 2023-12-18 01:19:35.299294336 +0100 -+++ mysql-8.2.0/sql/iterators/composite_iterators.cc 2023-12-18 02:13:09.216002357 +0100 -@@ -35,7 +35,7 @@ +diff -urNpa mysql-8.4.0.orig/sql/iterators/composite_iterators.cc mysql-8.4.0/sql/iterators/composite_iterators.cc +--- mysql-8.4.0.orig/sql/iterators/composite_iterators.cc 2024-05-09 18:15:03.989844233 +0200 ++++ mysql-8.4.0/sql/iterators/composite_iterators.cc 2024-05-09 18:15:57.910584352 +0200 +@@ -44,7 +44,7 @@ #include "my_dbug.h" #include "my_inttypes.h" #include "my_sys.h" -#include "my_xxhash.h" +#include + #include "mysql_com.h" #include "mysqld_error.h" #include "prealloced_array.h" - #include "scope_guard.h" -@@ -2255,7 +2255,7 @@ +@@ -2928,7 +2928,7 @@ bool SpillState::compute_chunk_file_sets const ulonglong primary_hash = static_cast(m_materialized_table->hash_field->val_int()); const uint64_t chunk_hash = @@ -112,7 +112,7 @@ diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/i const size_t chunk_index = hash_to_chunk_index(chunk_hash); m_offending_row.m_chunk_offset = chunk_offset(chunk_index); -@@ -2331,7 +2331,7 @@ +@@ -3005,7 +3005,7 @@ bool SpillState::spread_hash_map_to_HF_c const ulonglong primary_hash = static_cast(m_materialized_table->hash_field->val_int()); const uint64_t chunk_hash = @@ -121,7 +121,7 @@ diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/i const size_t chunk_index = hash_to_chunk_index(chunk_hash); const size_t set_index = chunk_index_to_set(chunk_index); const size_t offset = chunk_offset(chunk_index); -@@ -2396,7 +2396,7 @@ +@@ -3070,7 +3070,7 @@ bool SpillState::append_hash_map_to_HF() const ulonglong primary_hash = static_cast(m_materialized_table->hash_field->val_int()); const uint64_t chunk_hash = @@ -130,7 +130,7 @@ diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/i const size_t chunk_index = hash_to_chunk_index(chunk_hash); const size_t set_index = chunk_index_to_set(chunk_index); const size_t offset = chunk_offset(chunk_index); -@@ -2491,7 +2491,7 @@ +@@ -3164,7 +3164,7 @@ bool SpillState::save_operand_to_IF_chun m_materialized_table->hash_field->store( static_cast(primary_hash), true); const uint64_t chunk_hash = @@ -139,7 +139,7 @@ diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/i const size_t chunk_index = hash_to_chunk_index(chunk_hash); const size_t set_index = chunk_index_to_set(chunk_index); const size_t offset = chunk_offset(chunk_index); -@@ -2548,7 +2548,7 @@ +@@ -3219,7 +3219,7 @@ bool SpillState::write_HF(THD *thd, size const ulonglong primary_hash = static_cast(m_materialized_table->hash_field->val_int()); const uint64_t chunk_hash = @@ -148,7 +148,7 @@ diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/i const size_t chunk_index = hash_to_chunk_index(chunk_hash); const size_t set_index = chunk_index_to_set(chunk_index); assert(chunk_offset(chunk_index) == chunk_idx); -@@ -2787,7 +2787,7 @@ +@@ -3452,7 +3452,7 @@ int SpillState::read_next_row(const Oper const ulonglong primary_hash = static_cast( m_materialized_table->hash_field->val_int()); const uint64_t chunk_hash = @@ -157,7 +157,7 @@ diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/i const size_t chunk_index = hash_to_chunk_index(chunk_hash); const size_t set_index = chunk_index_to_set(chunk_index); assert(chunk_offset(chunk_index) == m_current_chunk_idx); -@@ -2820,7 +2820,7 @@ +@@ -3485,7 +3485,7 @@ int SpillState::read_next_row(const Oper const ulonglong primary_hash = static_cast( m_materialized_table->hash_field->val_int()); const uint64_t chunk_hash = @@ -166,7 +166,7 @@ diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/i const size_t chunk_index = hash_to_chunk_index(chunk_hash); assert(chunk_index_to_set(chunk_index) == set_idx); assert(chunk_offset(chunk_index) == m_current_chunk_idx); -@@ -2909,7 +2909,7 @@ +@@ -3574,7 +3574,7 @@ int SpillState::read_next_row_secondary_ const ulonglong primary_hash = static_cast( m_materialized_table->hash_field->val_int()); const uint64_t chunk_hash = @@ -175,19 +175,19 @@ diff -ur mysql-8.2.0.orig/sql/iterators/composite_iterators.cc mysql-8.2.0/sql/i const size_t chunk_index = hash_to_chunk_index(chunk_hash); assert(chunk_index_to_set(chunk_index) == set_idx); assert(chunk_offset(chunk_index) == m_current_chunk_idx); -diff -ur mysql-8.2.0.orig/sql/iterators/hash_join_iterator.cc mysql-8.2.0/sql/iterators/hash_join_iterator.cc ---- mysql-8.2.0.orig/sql/iterators/hash_join_iterator.cc 2023-12-18 01:19:35.299294336 +0100 -+++ mysql-8.2.0/sql/iterators/hash_join_iterator.cc 2023-12-18 01:20:07.132718589 +0100 -@@ -32,7 +32,7 @@ - #include "field_types.h" - #include "my_alloc.h" - #include "my_bit.h" --#include "my_xxhash.h" -+#include - +diff -urNpa mysql-8.4.0.orig/sql/iterators/hash_join_iterator.cc mysql-8.4.0/sql/iterators/hash_join_iterator.cc +--- mysql-8.4.0.orig/sql/iterators/hash_join_iterator.cc 2024-05-09 18:15:03.989844233 +0200 ++++ mysql-8.4.0/sql/iterators/hash_join_iterator.cc 2024-05-09 18:15:57.910584352 +0200 +@@ -38,7 +38,7 @@ + #include "my_dbug.h" #include "my_inttypes.h" #include "my_sys.h" -@@ -356,7 +356,7 @@ +-#include "my_xxhash.h" ++#include + #include "mysql/components/services/bits/psi_bits.h" + #include "mysqld_error.h" + #include "sql/item.h" +@@ -378,7 +378,7 @@ static bool WriteRowToChunk( const uint64_t join_key_hash = join_key_and_row_buffer->length() == 0 ? kZeroKeyLengthHash @@ -196,10 +196,10 @@ diff -ur mysql-8.2.0.orig/sql/iterators/hash_join_iterator.cc mysql-8.2.0/sql/it join_key_and_row_buffer->length(), xxhash_seed); assert((chunks->size() & (chunks->size() - 1)) == 0); -diff -ur mysql-8.2.0.orig/sql/rpl_write_set_handler.cc mysql-8.2.0/sql/rpl_write_set_handler.cc ---- mysql-8.2.0.orig/sql/rpl_write_set_handler.cc 2023-12-18 01:19:35.612298508 +0100 -+++ mysql-8.2.0/sql/rpl_write_set_handler.cc 2023-12-18 01:23:09.729155640 +0100 -@@ -36,7 +36,7 @@ +diff -urNpa mysql-8.4.0.orig/sql/rpl_write_set_handler.cc mysql-8.4.0/sql/rpl_write_set_handler.cc +--- mysql-8.4.0.orig/sql/rpl_write_set_handler.cc 2024-05-09 18:15:03.945843627 +0200 ++++ mysql-8.4.0/sql/rpl_write_set_handler.cc 2024-05-09 18:15:57.910584352 +0200 +@@ -37,7 +37,7 @@ #include "my_dbug.h" #include "my_inttypes.h" #include "my_murmur3.h" // murmur3_32 @@ -208,19 +208,19 @@ diff -ur mysql-8.2.0.orig/sql/rpl_write_set_handler.cc mysql-8.2.0/sql/rpl_write #include "mysql/strings/m_ctype.h" #include "mysql_com.h" #include "sql-common/json_binary.h" -@@ -75,7 +75,7 @@ - if (algorithm == HASH_ALGORITHM_MURMUR32) - return (murmur3_32((const uchar *)T, len, 0)); - else -- return (MY_XXH64((const uchar *)T, len, 0)); -+ return (XXH64((const uchar *)T, len, 0)); - } +@@ -682,7 +682,7 @@ static bool generate_hash_pke(const std: + ) { + DBUG_TRACE; - #ifndef NDEBUG -diff -ur mysql-8.2.0.orig/unittest/gunit/hash_join-t.cc mysql-8.2.0/unittest/gunit/hash_join-t.cc ---- mysql-8.2.0.orig/unittest/gunit/hash_join-t.cc 2023-12-18 01:19:41.381375395 +0100 -+++ mysql-8.2.0/unittest/gunit/hash_join-t.cc 2023-12-18 01:20:51.800313888 +0100 -@@ -37,7 +37,7 @@ +- uint64 hash = MY_XXH64(pke.c_str(), pke.size(), 0); ++ uint64 hash = XXH64(pke.c_str(), pke.size(), 0); + if (thd->get_transaction()->get_transaction_write_set_ctx()->add_write_set( + hash)) + return true; +diff -urNpa mysql-8.4.0.orig/unittest/gunit/hash_join-t.cc mysql-8.4.0/unittest/gunit/hash_join-t.cc +--- mysql-8.4.0.orig/unittest/gunit/hash_join-t.cc 2024-05-09 18:15:15.950008783 +0200 ++++ mysql-8.4.0/unittest/gunit/hash_join-t.cc 2024-05-09 18:15:57.910584352 +0200 +@@ -38,7 +38,7 @@ #include "my_config.h" #include "my_inttypes.h" #include "my_murmur3.h" @@ -229,7 +229,7 @@ diff -ur mysql-8.2.0.orig/unittest/gunit/hash_join-t.cc mysql-8.2.0/unittest/gun #include "mysql/components/services/bits/psi_bits.h" #include "prealloced_array.h" #include "sql/field.h" -@@ -226,7 +226,7 @@ +@@ -227,7 +227,7 @@ static void BM_XXHash64ShortData(size_t size_t sum = 0; for (size_t i = 0; i < num_iterations; ++i) { @@ -238,7 +238,7 @@ diff -ur mysql-8.2.0.orig/unittest/gunit/hash_join-t.cc mysql-8.2.0/unittest/gun } StopBenchmarkTiming(); -@@ -245,7 +245,7 @@ +@@ -246,7 +246,7 @@ static void BM_XXHash64LongData(size_t n size_t sum = 0; for (size_t i = 0; i < num_iterations; ++i) { @@ -247,10 +247,10 @@ diff -ur mysql-8.2.0.orig/unittest/gunit/hash_join-t.cc mysql-8.2.0/unittest/gun } StopBenchmarkTiming(); -diff -ur mysql-8.2.0.orig/unittest/gunit/innodb/ut0rnd-t.cc mysql-8.2.0/unittest/gunit/innodb/ut0rnd-t.cc ---- mysql-8.2.0.orig/unittest/gunit/innodb/ut0rnd-t.cc 2023-12-18 01:19:41.600378312 +0100 -+++ mysql-8.2.0/unittest/gunit/innodb/ut0rnd-t.cc 2023-12-18 01:20:07.134718615 +0100 -@@ -33,7 +33,7 @@ +diff -urNpa mysql-8.4.0.orig/unittest/gunit/innodb/ut0rnd-t.cc mysql-8.4.0/unittest/gunit/innodb/ut0rnd-t.cc +--- mysql-8.4.0.orig/unittest/gunit/innodb/ut0rnd-t.cc 2024-05-09 18:15:15.998009443 +0200 ++++ mysql-8.4.0/unittest/gunit/innodb/ut0rnd-t.cc 2024-05-09 18:15:57.910584352 +0200 +@@ -34,7 +34,7 @@ #include "storage/innobase/include/ut0crc32.h" #include "storage/innobase/include/ut0rnd.h"