Skip to content

Commit f01c613

Browse files
committed
Merge remote-tracking branch 'percona/release-8.0.40-31' into '8.0'
2 parents ed881ad + 4931786 commit f01c613

File tree

1,975 files changed

+60377
-52489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,975 files changed

+60377
-52489
lines changed

.clang-format

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# along with this program; if not, write to the Free Software
2222
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323

24-
# We currently use clang-format version 10.
24+
# We currently use clang-format version 15.
2525
#
2626
# This is the output of
2727
#
@@ -98,15 +98,13 @@ ConstructorInitializerIndentWidth: 4
9898
ContinuationIndentWidth: 4
9999
Cpp11BracedListStyle: true
100100
DeriveLineEnding: true
101-
DerivePointerAlignment: true
102101
DisableFormat: false
103102
ExperimentalAutoDetectBinPacking: false
104103
FixNamespaceComments: true
105104
ForEachMacros:
106105
- foreach
107106
- Q_FOREACH
108107
- BOOST_FOREACH
109-
IncludeBlocks: Regroup
110108
IncludeCategories:
111109
- Regex: '^<ext/.*\.h>'
112110
Priority: 2
@@ -146,7 +144,6 @@ PenaltyBreakString: 1000
146144
PenaltyBreakTemplateDeclaration: 10
147145
PenaltyExcessCharacter: 1000000
148146
PenaltyReturnTypeOnItsOwnLine: 200
149-
PointerAlignment: Left
150147
RawStringFormats:
151148
- Language: Cpp
152149
Delimiters:
@@ -197,7 +194,6 @@ SpacesInCStyleCastParentheses: false
197194
SpacesInParentheses: false
198195
SpacesInSquareBrackets: false
199196
SpaceBeforeSquareBrackets: false
200-
Standard: Auto
201197
StatementMacros:
202198
- Q_UNUSED
203199
- QT_REQUIRE_VERSION
@@ -210,8 +206,7 @@ UseTab: Never
210206
DerivePointerAlignment: false
211207
PointerAlignment: Right
212208

213-
# MySQL source code is allowed to use C++11 (and C++14) features.
214-
Standard: Cpp11
209+
Standard: Latest
215210

216211
# MySQL includes frequently are not order-independent (e.g. my_config.h needs
217212
# to go on top). This is unfortunate, but not something we can change easily,
@@ -277,15 +272,13 @@ ConstructorInitializerIndentWidth: 4
277272
ContinuationIndentWidth: 4
278273
Cpp11BracedListStyle: true
279274
DeriveLineEnding: true
280-
DerivePointerAlignment: true
281275
DisableFormat: false
282276
ExperimentalAutoDetectBinPacking: false
283277
FixNamespaceComments: true
284278
ForEachMacros:
285279
- foreach
286280
- Q_FOREACH
287281
- BOOST_FOREACH
288-
IncludeBlocks: Regroup
289282
IncludeCategories:
290283
- Regex: '^<ext/.*\.h>'
291284
Priority: 2
@@ -325,7 +318,6 @@ PenaltyBreakString: 1000
325318
PenaltyBreakTemplateDeclaration: 10
326319
PenaltyExcessCharacter: 1000000
327320
PenaltyReturnTypeOnItsOwnLine: 200
328-
PointerAlignment: Left
329321
RawStringFormats:
330322
- Language: Cpp
331323
Delimiters:
@@ -376,7 +368,6 @@ SpacesInCStyleCastParentheses: false
376368
SpacesInParentheses: false
377369
SpacesInSquareBrackets: false
378370
SpaceBeforeSquareBrackets: false
379-
Standard: Auto
380371
StatementMacros:
381372
- Q_UNUSED
382373
- QT_REQUIRE_VERSION

CMakeLists.txt

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ ELSEIF(APPLE)
7777
# We must postpone the version test until we have called 'uname -r' below.
7878
ELSEIF(UNIX)
7979
# This is currently minimum version on all supported platforms.
80-
IF(CMAKE_VERSION VERSION_LESS 3.5.1)
80+
IF(CMAKE_VERSION VERSION_LESS 3.11.2)
8181
# Default cmake is 2.8.12.2 on RedHat
8282
IF(EXISTS "/etc/redhat-release")
8383
MESSAGE(WARNING "Please use cmake3 rather than cmake on this platform")
@@ -241,8 +241,8 @@ IF(APPLE)
241241
ENDIF()
242242

243243
# Add all policies *after* CMAKE_MINIMUM_REQUIRED
244-
# Repeating CMAKE_MINIMUM_REQUIRED here will load defaults for 3.5.1
245-
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
244+
# Repeating CMAKE_MINIMUM_REQUIRED here will load defaults for 3.11.2
245+
CMAKE_MINIMUM_REQUIRED(VERSION 3.11.2)
246246
INCLUDE(cmake_policies NO_POLICY_SCOPE)
247247

248248
MACRO(STRING_APPEND STRING_VAR INPUT)
@@ -473,16 +473,16 @@ IF(CMAKE_HOST_UNIX AND NOT FORCE_UNSUPPORTED_COMPILER
473473
NO_DEFAULT_PATH
474474
PATHS "/usr/bin")
475475
ELSEIF(LINUX_SUSE_15)
476-
FIND_PROGRAM(ALTERNATIVE_GCC gcc-9
476+
FIND_PROGRAM(ALTERNATIVE_GCC gcc-13
477477
NO_DEFAULT_PATH
478478
PATHS "/usr/bin")
479-
FIND_PROGRAM(ALTERNATIVE_GPP g++-9
479+
FIND_PROGRAM(ALTERNATIVE_GPP g++-13
480480
NO_DEFAULT_PATH
481481
PATHS "/usr/bin")
482-
FIND_PROGRAM(GCC_AR_EXECUTABLE gcc-ar-9
482+
FIND_PROGRAM(GCC_AR_EXECUTABLE gcc-ar-13
483483
NO_DEFAULT_PATH
484484
PATHS "/usr/bin")
485-
FIND_PROGRAM(GCC_RANLIB_EXECUTABLE gcc-ranlib-9
485+
FIND_PROGRAM(GCC_RANLIB_EXECUTABLE gcc-ranlib-13
486486
NO_DEFAULT_PATH
487487
PATHS "/usr/bin")
488488
ENDIF()
@@ -510,7 +510,7 @@ IF(CMAKE_HOST_UNIX AND NOT FORCE_UNSUPPORTED_COMPILER
510510
MESSAGE(FATAL_ERROR "Please do zypper install gcc10 gcc10-c++\n"
511511
"or set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER explicitly.")
512512
ELSE()
513-
MESSAGE(FATAL_ERROR "Please do zypper install gcc9 gcc9-c++\n"
513+
MESSAGE(FATAL_ERROR "Please do zypper install gcc13 gcc13-c++\n"
514514
"or set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER explicitly.")
515515
ENDIF()
516516
ENDIF()
@@ -599,6 +599,31 @@ INCLUDE(mysql_version)
599599
PROJECT(${MYSQL_PROJECT_NAME}
600600
VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
601601

602+
# Various 3rd party libraries have this option.
603+
# Some have it ON, other OFF, by default.
604+
# https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html:
605+
# "the top level project must also call option(BUILD_SHARED_LIBS ...)
606+
# before bringing in its dependencies."
607+
# We want all libraries to be explicitly STATIC or SHARED.
608+
OPTION(BUILD_SHARED_LIBS "Build shared libraries by default" OFF)
609+
IF(BUILD_SHARED_LIBS)
610+
MESSAGE(WARNING "Do not set BUILD_SHARED_LIBS to ON/TRUE")
611+
SET(BUILD_SHARED_LIBS OFF)
612+
SET(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
613+
ENDIF()
614+
615+
# https://cmake.org/cmake/help/latest/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.html
616+
OPTION(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
617+
"Target 'install' does not depend on 'all'" OFF)
618+
IF(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY)
619+
MESSAGE(WARNING "Do not set CMAKE_SKIP_INSTALL_ALL_DEPENDENCY to ON/TRUE")
620+
SET(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY OFF)
621+
SET(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY OFF CACHE INTERNAL "" FORCE)
622+
ENDIF()
623+
624+
# Ninja only: List of available pools.
625+
SET_PROPERTY(GLOBAL PROPERTY JOB_POOLS one_job=1)
626+
602627
GET_FILENAME_COMPONENT(REALPATH_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} REALPATH)
603628
GET_FILENAME_COMPONENT(REALPATH_CMAKE_BINARY_DIR ${CMAKE_BINARY_DIR} REALPATH)
604629

@@ -1291,7 +1316,7 @@ IF(USE_LD_LLD)
12911316
ENDIF()
12921317
SET(USING_LD_LLD ${USING_LD_LLD} CACHE INTERNAL "")
12931318

1294-
IF(LINUX_STANDALONE)
1319+
IF(LINUX_STANDALONE OR SOLARIS)
12951320
# ON by default in pushbuild, but only for standalone builds.
12961321
# The comression does not play well with some RPM/DEB packaging.
12971322
# Developers can set default in environment.
@@ -1326,12 +1351,16 @@ ENDIF()
13261351
IF(UNIX AND MY_COMPILER_IS_GNU_OR_CLANG)
13271352
# By default, do this for STANDALONE and tarball builds.
13281353
# Off by default for sanitizer or valgrind builds.
1354+
# Off by default in pushbuild.
13291355
# Off by default for Apple Clang.
1330-
IF((INSTALL_LAYOUT MATCHES "STANDALONE" OR
1331-
INSTALL_LAYOUT MATCHES "TARGZ" OR
1332-
INSTALL_LAYOUT MATCHES "SVR4"
1356+
# ON by default for SOLARIS (also in PB2), to reduce package sizes.
1357+
IF(SOLARIS)
1358+
SET(MINIMAL_RELWITHDEBINFO_DEFAULT ON)
1359+
ELSEIF((INSTALL_LAYOUT MATCHES "STANDALONE" OR
1360+
INSTALL_LAYOUT MATCHES "TARGZ"
13331361
)
13341362
AND NOT CMAKE_COMPILER_FLAG_WITH_SANITIZE AND NOT WITH_VALGRIND
1363+
AND NOT DEFINED ENV{PB2WORKDIR}
13351364
AND NOT APPLE)
13361365
SET(MINIMAL_RELWITHDEBINFO_DEFAULT ON)
13371366
ELSE()
@@ -1625,7 +1654,6 @@ ENDIF()
16251654
INCLUDE(configure.cmake)
16261655

16271656
# Common defines and includes
1628-
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
16291657
ADD_DEFINITIONS(-D__STDC_LIMIT_MACROS) # Enable C99 limit macros
16301658
ADD_DEFINITIONS(-D__STDC_FORMAT_MACROS) # Enable C99 printf format macros
16311659
ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # Get access to M_PI, M_E, etc. in math.h
@@ -2086,9 +2114,8 @@ ENDIF()
20862114
IF(WITH_SSL_PATH AND (LINUX_RHEL8 OR LINUX_RHEL9))
20872115
SET(WITH_TIRPC "bundled")
20882116
ENDIF()
2089-
2090-
IF(WITH_TIRPC STREQUAL "bundled")
2091-
ADD_SUBDIRECTORY(extra/tirpc)
2117+
IF(LINUX)
2118+
MYSQL_CHECK_RPC()
20922119
ENDIF()
20932120

20942121
IF(WITH_PROTOBUF STREQUAL "bundled" OR WITH_FIDO STREQUAL "bundled")
@@ -2114,8 +2141,8 @@ IF(WITH_PROTOBUF STREQUAL "bundled" OR WITH_FIDO STREQUAL "bundled")
21142141
# Silence warning about CMP0075
21152142
CMAKE_PUSH_CHECK_STATE()
21162143
SET(CMAKE_REQUIRED_LIBRARIES)
2117-
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${CBOR_BUNDLE_SRC_PATH})
2118-
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${FIDO_BUNDLE_SRC_PATH})
2144+
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/extra/libcbor)
2145+
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/extra/libfido2)
21192146
CMAKE_POP_CHECK_STATE()
21202147
ENDIF()
21212148
ENDIF()

0 commit comments

Comments
 (0)