From fc6ec779771b0ad7c2c8b46475a46deae4866bef Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 18 Dec 2023 22:46:30 +0100 Subject: [PATCH] - reenabled system-xxhash, cleanup --- mysql-opt.patch | 57 ---------- mysql-system-xxhash.patch | 201 +++++++++++++++++++++++++---------- mysql.spec | 27 +---- mysqldumpslow-clusters.patch | 46 -------- 4 files changed, 149 insertions(+), 182 deletions(-) delete mode 100644 mysql-opt.patch delete mode 100644 mysqldumpslow-clusters.patch diff --git a/mysql-opt.patch b/mysql-opt.patch deleted file mode 100644 index b48ce5d..0000000 --- a/mysql-opt.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- mysql-5.7.27/cmake/build_configurations/compiler_options.cmake.orig 2019-06-10 16:43:20.000000000 +0200 -+++ mysql-5.7.27/cmake/build_configurations/compiler_options.cmake 2019-07-29 05:55:55.892824445 +0200 -@@ -50,8 +50,8 @@ - IF(C_NO_EXPENSIVE_OPTIMIZATIONS) - SET(COMMON_C_FLAGS "${COMMON_C_FLAGS} -fno-expensive-optimizations") - ENDIF() -- SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}") -- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}") -+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMMON_C_FLAGS}") -+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMMON_C_FLAGS}") - ENDIF() - IF(CMAKE_COMPILER_IS_GNUCXX) - SET(COMMON_CXX_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing") -@@ -59,7 +59,7 @@ - EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion - OUTPUT_VARIABLE GXX_VERSION) - IF(GXX_VERSION VERSION_EQUAL 6.0 OR GXX_VERSION VERSION_GREATER 6.0) -- SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -std=gnu++03") -+ SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -std=gnu++11") - ENDIF() - # Disable inline optimizations for valgrind testing to avoid false positives - IF(WITH_VALGRIND) -@@ -80,15 +80,15 @@ - IF(CXX_NO_EXPENSIVE_OPTIMIZATIONS) - SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -fno-expensive-optimizations") - ENDIF() -- SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}") -- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}") -+ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}") -+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS}") - ENDIF() - - # Default Clang flags - IF(CMAKE_C_COMPILER_ID MATCHES "Clang") - SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing") -- SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}") -- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}") -+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMMON_C_FLAGS}") -+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMMON_C_FLAGS}") - ENDIF() - IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing") -@@ -95,11 +95,11 @@ - IF(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.0 OR - CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0) - IF(CMAKE_SYSTEM_NAME MATCHES "Linux") -- SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -std=gnu++03") -+ SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -std=gnu++11") - ENDIF() - ENDIF() -- SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}") -- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}") -+ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}") -+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS}") - ENDIF() - - # Solaris flags diff --git a/mysql-system-xxhash.patch b/mysql-system-xxhash.patch index 9ca5514..5d1fc10 100644 --- a/mysql-system-xxhash.patch +++ b/mysql-system-xxhash.patch @@ -1,6 +1,26 @@ ---- mysql-8.0.30/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc.orig 2022-07-06 23:36:34.000000000 +0200 -+++ mysql-8.0.30/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_split.cc 2022-10-09 14:33:34.598098038 +0200 -@@ -126,7 +126,7 @@ Gcs_sender_id calculate_sender_id(const +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 @@ + src/bindings/xcom/gcs_xcom_statistics_interface.cc + src/bindings/xcom/gcs_xcom_proxy.cc + src/bindings/xcom/gcs_xcom_communication_protocol_changer.cc +- ${BUNDLED_LZ4_PATH}/xxhash.c # required by gcs_message_stage_split + 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 @@ + # Dependency on mysys from gcs_logging_system.cc + # but pick up symbols from the server: + # TARGET_LINK_LIBRARIES(mysqlgcs mysys) ++TARGET_LINK_LIBRARIES(mysqlgcs xxhash) + + 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 @@ std::string info(node.get_member_id().get_member_id()); info.append(node.get_member_uuid().actual_value); @@ -9,8 +29,9 @@ } bool Gcs_message_stage_split_v2::update_members_information( ---- mysql-8.0.30/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h.orig 2022-07-06 23:36:34.000000000 +0200 -+++ mysql-8.0.30/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xxhash.h 2022-10-09 08:41:35.109178797 +0200 +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 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -23,27 +44,10 @@ +#include #endif // GCS_XXHASH_H_INCLUDED ---- mysql-8.0.30/plugin/group_replication/libmysqlgcs/CMakeLists.txt.orig 2022-07-06 23:36:34.000000000 +0200 -+++ mysql-8.0.30/plugin/group_replication/libmysqlgcs/CMakeLists.txt 2022-10-09 08:42:55.768741827 +0200 -@@ -140,7 +140,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 -- ${BUNDLED_LZ4_PATH}/xxhash.c # required by gcs_message_stage_split - src/bindings/xcom/gcs_message_stage_split.cc - src/bindings/xcom/gcs_xcom_synode.cc - src/bindings/xcom/gcs_xcom_expels_in_progress.cc) -@@ -219,6 +218,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) -+TARGET_LINK_LIBRARIES(mysqlgcs xxhash) - - IF(CMAKE_VERSION VERSION_GREATER "3.19" AND NOT APPLE_XCODE) - # New in version 3.19: ---- mysql-8.0.30/sql/CMakeLists.txt.orig 2022-07-06 23:36:34.000000000 +0200 -+++ mysql-8.0.30/sql/CMakeLists.txt 2022-10-09 08:53:20.935355008 +0200 -@@ -755,7 +755,6 @@ SET(SQL_SOURCE +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 @@ ${CONF_SOURCES} ${SQL_SHARED_SOURCES} ${SQL_HEADERS} @@ -51,7 +55,7 @@ ../libmysql/errmsg.cc ../sql-common/client.cc ../sql-common/client_plugin.cc -@@ -813,11 +812,6 @@ IF(WIN32) +@@ -831,11 +830,6 @@ ) ENDIF() @@ -63,13 +67,14 @@ # Workaround for Apple Clang bug on ARM. # When linking mysqld (and executables using server_unittest_library) # we get linker warnings about -@@ -842,13 +836,6 @@ IF(APPLE_ARM) +@@ -860,14 +854,6 @@ ) ENDIF() -ADD_COMPILE_FLAGS( - ${BUNDLED_LZ4_PATH}/xxhash.c - iterators/hash_join_iterator.cc +- iterators/composite_iterators.cc - rpl_write_set_handler.cc - COMPILE_FLAGS -I${CMAKE_SOURCE_DIR}/extra/lz4 -I${BUNDLED_LZ4_PATH} - ) @@ -77,17 +82,102 @@ # Fixes "C1128: number of sections exceeded object file format limit" in MSVC IF(WIN32) ADD_COMPILE_FLAGS( -@@ -924,7 +911,7 @@ ADD_DEPENDENCIES(sql_main GenBootstrapPr - ADD_DEPENDENCIES(sql_main GenSysSchema) +@@ -961,7 +947,7 @@ + TARGET_LINK_LIBRARIES(sql_main ${MYSQLD_STATIC_PLUGIN_LIBS} mysql_server_component_services mysys strings vio -- binlogevents_static ${LIBWRAP} ${LIBDL} ${SSL_LIBRARIES}) -+ binlogevents_static xxhash ${LIBWRAP} ${LIBDL} ${SSL_LIBRARIES}) +- mysql_binlog_event ${LIBWRAP} ${LIBDL} OpenSSL::SSL OpenSSL::Crypto ++ mysql_binlog_event xxhash ${LIBWRAP} ${LIBDL} OpenSSL::SSL OpenSSL::Crypto + extra::rapidjson) # sql/immutable_string.h uses - # google::protobuf::io::CodedOutputStream::WriteVarint64ToArray ---- mysql-8.0.30/sql/iterators/hash_join_iterator.cc.orig 2022-07-06 23:36:34.000000000 +0200 -+++ mysql-8.0.30/sql/iterators/hash_join_iterator.cc 2022-10-09 17:45:57.618897459 +0200 +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 @@ + #include "my_dbug.h" + #include "my_inttypes.h" + #include "my_sys.h" +-#include "my_xxhash.h" ++#include + #include "mysqld_error.h" + #include "prealloced_array.h" + #include "scope_guard.h" +@@ -2255,7 +2255,7 @@ + const ulonglong primary_hash = + static_cast(m_materialized_table->hash_field->val_int()); + const uint64_t chunk_hash = +- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); ++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); + + 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 @@ + const ulonglong primary_hash = + static_cast(m_materialized_table->hash_field->val_int()); + const uint64_t chunk_hash = +- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); ++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); + 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 @@ + const ulonglong primary_hash = + static_cast(m_materialized_table->hash_field->val_int()); + const uint64_t chunk_hash = +- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); ++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); + 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 @@ + m_materialized_table->hash_field->store( + static_cast(primary_hash), true); + const uint64_t chunk_hash = +- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); ++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); + 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 @@ + const ulonglong primary_hash = + static_cast(m_materialized_table->hash_field->val_int()); + const uint64_t chunk_hash = +- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); ++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); + 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 @@ + const ulonglong primary_hash = static_cast( + m_materialized_table->hash_field->val_int()); + const uint64_t chunk_hash = +- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); ++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); + 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 @@ + const ulonglong primary_hash = static_cast( + m_materialized_table->hash_field->val_int()); + const uint64_t chunk_hash = +- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); ++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); + 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 @@ + const ulonglong primary_hash = static_cast( + m_materialized_table->hash_field->val_int()); + const uint64_t chunk_hash = +- MY_XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); ++ XXH64(&primary_hash, sizeof(primary_hash), m_hash_seed); + 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" @@ -97,7 +187,7 @@ #include "my_inttypes.h" #include "my_sys.h" -@@ -307,7 +307,7 @@ static bool WriteRowToChunk( +@@ -356,7 +356,7 @@ const uint64_t join_key_hash = join_key_and_row_buffer->length() == 0 ? kZeroKeyLengthHash @@ -106,18 +196,19 @@ join_key_and_row_buffer->length(), xxhash_seed); assert((chunks->size() & (chunks->size() - 1)) == 0); ---- mysql-8.0.30/sql/rpl_write_set_handler.cc.orig 2022-07-06 23:36:34.000000000 +0200 -+++ mysql-8.0.30/sql/rpl_write_set_handler.cc 2022-10-09 20:07:41.099496817 +0200 -@@ -37,7 +37,7 @@ +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 @@ #include "my_dbug.h" #include "my_inttypes.h" #include "my_murmur3.h" // murmur3_32 -#include "my_xxhash.h" // IWYU pragma: keep +#include + #include "mysql/strings/m_ctype.h" #include "mysql_com.h" #include "sql-common/json_binary.h" - #include "sql-common/json_dom.h" -@@ -75,7 +75,7 @@ uint64 calc_hash(ulong algorithm, type T +@@ -75,7 +75,7 @@ if (algorithm == HASH_ALGORITHM_MURMUR32) return (murmur3_32((const uchar *)T, len, 0)); else @@ -126,18 +217,19 @@ } #ifndef NDEBUG ---- mysql-8.0.30/unittest/gunit/hash_join-t.cc.orig 2022-07-06 23:36:34.000000000 +0200 -+++ mysql-8.0.30/unittest/gunit/hash_join-t.cc 2022-10-09 20:36:43.693389709 +0200 -@@ -28,7 +28,7 @@ - - #include "include/my_murmur3.h" - #include "my_alloc.h" +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 @@ + #include "my_config.h" + #include "my_inttypes.h" + #include "my_murmur3.h" -#include "my_xxhash.h" +#include - #include "sql/item_cmpfunc.h" - #include "sql/iterators/hash_join_buffer.h" - #include "sql/iterators/hash_join_iterator.h" -@@ -204,7 +204,7 @@ static void BM_XXHash64ShortData(size_t + #include "mysql/components/services/bits/psi_bits.h" + #include "prealloced_array.h" + #include "sql/field.h" +@@ -226,7 +226,7 @@ size_t sum = 0; for (size_t i = 0; i < num_iterations; ++i) { @@ -146,7 +238,7 @@ } StopBenchmarkTiming(); -@@ -223,7 +223,7 @@ static void BM_XXHash64LongData(size_t n +@@ -245,7 +245,7 @@ size_t sum = 0; for (size_t i = 0; i < num_iterations; ++i) { @@ -155,8 +247,9 @@ } StopBenchmarkTiming(); ---- mysql-8.0.30/unittest/gunit/innodb/ut0rnd-t.cc.orig 2022-07-06 23:36:34.000000000 +0200 -+++ mysql-8.0.30/unittest/gunit/innodb/ut0rnd-t.cc 2022-10-09 20:46:00.157041753 +0200 +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 @@ #include "storage/innobase/include/ut0crc32.h" #include "storage/innobase/include/ut0rnd.h" diff --git a/mysql.spec b/mysql.spec index 959081e..96fab47 100644 --- a/mysql.spec +++ b/mysql.spec @@ -41,7 +41,6 @@ Version: 8.2.0 Release: 1 License: GPL v2 + MySQL FOSS License Exception Group: Applications/Databases -#Source0Download: https://dev.mysql.com/downloads/mysql/8.2.html#downloads Source0: http://cdn.mysql.com/Downloads/MySQL-%{majorver}/mysql-%{version}.tar.gz # Source0-md5: 9ddeecbdb046cd4a8a4340445206130d Source100: http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz @@ -63,7 +62,6 @@ Source11: mysql-ndb-cpc.init Source12: mysql-ndb-cpc.sysconfig Source13: mysql-client.conf Source14: my.cnf -Patch0: mysql-opt.patch Patch1: mysql-system-xxhash.patch Patch17: mysql-5.7-sphinx.patch @@ -72,7 +70,6 @@ Patch18: mysql-sphinx.patch Patch24: mysql-cmake.patch Patch25: mysql-readline.patch -Patch26: mysqldumpslow-clusters.patch URL: http://www.mysql.com/products/community/ BuildRequires: bison >= 1.875 %{?with_system_boost:BuildRequires: boost-devel >= 1.77.0} @@ -80,7 +77,6 @@ BuildRequires: cmake >= 2.8.2 %{?with_ldap:BuildRequires: cyrus-sasl-devel} # for configure and tests %{?with_ldap:BuildRequires: cyrus-sasl-scram} -#%{?with_ldap:BuildRequires: krb5-devel} BuildRequires: libaio-devel BuildRequires: libevent-devel BuildRequires: libhsclient-devel @@ -475,9 +471,7 @@ Ten pakiet zawiera standardowego demona MySQL NDB CPC. %prep %setup -q %{?with_sphinx:-a100} %{!?with_system_boost:-a101} -n mysql-%{version} -#%patch0 -p1 -# FIXME -#%patch1 -p1 +%patch1 -p1 %if %{with sphinx} # http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51 @@ -489,16 +483,13 @@ Ten pakiet zawiera standardowego demona MySQL NDB CPC. %patch24 -p1 %patch25 -p1 -#%patch26 -p1 - # to get these files rebuild [ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc [ -f sql/sql_yacc.h ] && %{__rm} sql/sql_yacc.h # ensure sytstem lib # need to keep xxhash.[ch] -# FIXME -#%{__rm} -rv extra/lz4/lz4** +%{__rm} -rv extra/lz4/lz4** %build install -d build @@ -620,7 +611,6 @@ sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config %{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk %{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog %{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack -#%{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables %{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults %{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck @@ -629,9 +619,6 @@ sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_safe %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_multi %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}* -#%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate -#%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server -#%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server* %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1* %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1* @@ -749,9 +736,6 @@ fi %attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so -#%attr(755,root,root) %{_libdir}/%{name}/plugin/authentication_fido_client.so -#%{?with_ldap:%attr(755,root,root) %{_libdir}/%{name}/plugin/authentication_ldap_sasl_client.so} -#%attr(755,root,root) %{_libdir}/%{name}/plugin/authentication_oci_client.so %attr(755,root,root) %{_libdir}/%{name}/plugin/component_audit_api_message_emit.so %attr(755,root,root) %{_libdir}/%{name}/plugin/component_keyring_file.so %attr(755,root,root) %{_libdir}/%{name}/plugin/component_log_filter_dragnet.so @@ -992,17 +976,10 @@ fi %attr(755,root,root) %{_libdir}/%{name}/plugin/test_services_host_application_signal.so %attr(755,root,root) %{_libdir}/%{name}/plugin/test_services_plugin_registry.so %attr(755,root,root) %{_libdir}/%{name}/plugin/udf_example.so -#%dir %{_datadir}/sql-bench -#%{_datadir}/sql-bench/[CDRl]* -#%attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]* %{_mandir}/man1/lz4_decompress.1* %{_mandir}/man1/mysqlslap%{majorver}.1* %{_mandir}/man1/zlib_decompress%{majorver}.1* -#%files doc -#%defattr(644,root,root,755) -#%doc Docs/manual.html Docs/manual_toc.html - %if %{with ndb} %files ndb %defattr(644,root,root,755) diff --git a/mysqldumpslow-clusters.patch b/mysqldumpslow-clusters.patch deleted file mode 100644 index 415ab93..0000000 --- a/mysqldumpslow-clusters.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- percona-server-5.6.20-68.0/scripts/mysqldumpslow.sh~ 2014-08-29 10:58:05.000000000 +0300 -+++ percona-server-5.6.20-68.0/scripts/mysqldumpslow.sh 2014-09-06 20:50:22.000000000 +0300 -@@ -51,8 +51,33 @@ - - $opt{'help'} and usage(); - -+# find config file for first defined cluster -+sub get_defaults_file { -+ my $clusters_file = '/etc/mysql/clusters.conf'; -+ return unless -f $clusters_file; -+ -+ open(my $fh , "< $clusters_file") or return; -+ while (<$fh>) { -+ my ($config, $clusterdir) = m{^([^#]+)\s*=\s*(.+)$}; -+ next unless $config; -+ -+ if ($config !~ m{/}) { -+ my $f = "/etc/mysql/$config"; -+ return $f if -f $f; -+ -+ my $f = "$clusterdir/$config"; -+ return $f if -f $f; -+ } -+ return $config; -+ } -+ close($fh) or die $!; -+ return undef; -+} -+ - unless (@ARGV) { -- my $defaults = `my_print_defaults mysqld`; -+ my $defaults_file = get_defaults_file; -+ my $defaults_arg = "-c $defaults_file" if $defaults_file; -+ my $defaults = `my_print_defaults $defaults_arg mysqld`; - my $basedir = ($defaults =~ m/--basedir=(.*)/)[0] - or die "Can't determine basedir from 'my_print_defaults mysqld' output: $defaults"; - warn "basedir=$basedir\n" if $opt{v}; -@@ -61,7 +86,7 @@ - my $slowlog = ($defaults =~ m/--slow-query-log-file=(.*)/)[0]; - if (!$datadir or $opt{i}) { - # determine the datadir from the instances section of /etc/my.cnf, if any -- my $instances = `my_print_defaults instances`; -+ my $instances = `my_print_defaults $defaults_arg instances`; - die "Can't determine datadir from 'my_print_defaults mysqld' output: $defaults" - unless $instances; - my @instances = ($instances =~ m/^--(\w+)-/mg); -- 2.46.0