Skip to content

Commit

Permalink
merge 8.4.3 into RonDB 24.10
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelronstrom committed Oct 16, 2024
2 parents fc4e238 + ee079e5 commit af55207
Show file tree
Hide file tree
Showing 2,210 changed files with 62,124 additions and 170,167 deletions.
11 changes: 1 addition & 10 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

# We currently use clang-format version 10.
# We currently use clang-format version 15.
#
# This is the output of
#
Expand Down Expand Up @@ -98,15 +98,13 @@ ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
#DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
#IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
Expand Down Expand Up @@ -146,7 +144,6 @@ PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
#PointerAlignment: Left
RawStringFormats:
- Language: Cpp
Delimiters:
Expand Down Expand Up @@ -197,7 +194,6 @@ SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
#Standard: Auto
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
Expand All @@ -210,7 +206,6 @@ UseTab: Never
DerivePointerAlignment: false
PointerAlignment: Right

# MySQL source code is allowed to use the latest c++ features.
Standard: Latest

# MySQL includes frequently are not order-independent (e.g. my_config.h needs
Expand Down Expand Up @@ -277,15 +272,13 @@ ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
Expand Down Expand Up @@ -325,7 +318,6 @@ PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
RawStringFormats:
- Language: Cpp
Delimiters:
Expand Down Expand Up @@ -376,7 +368,6 @@ SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Auto
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
Expand Down
61 changes: 42 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ IF(APPLE)
ENDIF()

# Add all policies *after* CMAKE_MINIMUM_REQUIRED
# Repeating CMAKE_MINIMUM_REQUIRED here will load defaults for 3.5.1
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
# Repeating CMAKE_MINIMUM_REQUIRED here will load defaults for 3.14.6
CMAKE_MINIMUM_REQUIRED(VERSION 3.14.6)
INCLUDE(cmake_policies NO_POLICY_SCOPE)

MACRO(STRING_APPEND STRING_VAR INPUT)
Expand Down Expand Up @@ -402,16 +402,16 @@ IF(CMAKE_HOST_UNIX AND NOT FORCE_UNSUPPORTED_COMPILER
ELSEIF(LINUX_SUSE_15)
MESSAGE(STATUS "We need to look for a newer GCC on SUSE Linux.")
IF(LINUX_SUSE_15)
FIND_PROGRAM(ALTERNATIVE_GCC gcc-12
FIND_PROGRAM(ALTERNATIVE_GCC gcc-13
NO_DEFAULT_PATH
PATHS "/usr/bin")
FIND_PROGRAM(ALTERNATIVE_GPP g++-12
FIND_PROGRAM(ALTERNATIVE_GPP g++-13
NO_DEFAULT_PATH
PATHS "/usr/bin")
FIND_PROGRAM(GCC_AR_EXECUTABLE gcc-ar-12
FIND_PROGRAM(GCC_AR_EXECUTABLE gcc-ar-13
NO_DEFAULT_PATH
PATHS "/usr/bin")
FIND_PROGRAM(GCC_RANLIB_EXECUTABLE gcc-ranlib-12
FIND_PROGRAM(GCC_RANLIB_EXECUTABLE gcc-ranlib-13
NO_DEFAULT_PATH
PATHS "/usr/bin")
ENDIF()
Expand All @@ -430,7 +430,7 @@ IF(CMAKE_HOST_UNIX AND NOT FORCE_UNSUPPORTED_COMPILER
MESSAGE(STATUS "Using ${ALTERNATIVE_GPP}")
ELSE()
MESSAGE(WARNING "Could not find newer gcc.")
MESSAGE(FATAL_ERROR "Please do zypper install gcc12 gcc12-c++\n"
MESSAGE(FATAL_ERROR "Please do zypper install gcc13 gcc13-c++\n"
"or set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER explicitly.")
ENDIF()
ELSEIF(SOLARIS)
Expand Down Expand Up @@ -518,6 +518,28 @@ INCLUDE(mysql_version)
PROJECT(${MYSQL_PROJECT_NAME}
VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})

# Various 3rd party libraries have this option.
# Some have it ON, other OFF, by default.
# https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html:
# "the top level project must also call option(BUILD_SHARED_LIBS ...)
# before bringing in its dependencies."
# We want all libraries to be explicitly STATIC or SHARED.
OPTION(BUILD_SHARED_LIBS "Build shared libraries by default" OFF)
IF(BUILD_SHARED_LIBS)
MESSAGE(WARNING "Do not set BUILD_SHARED_LIBS to ON/TRUE")
SET(BUILD_SHARED_LIBS OFF)
SET(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
ENDIF()

# https://cmake.org/cmake/help/latest/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.html
OPTION(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
"Target 'install' does not depend on 'all'" OFF)
IF(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY)
MESSAGE(WARNING "Do not set CMAKE_SKIP_INSTALL_ALL_DEPENDENCY to ON/TRUE")
SET(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY OFF)
SET(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY OFF CACHE INTERNAL "" FORCE)
ENDIF()

# Ninja only: List of available pools.
SET_PROPERTY(GLOBAL PROPERTY JOB_POOLS one_job=1)

Expand Down Expand Up @@ -1225,7 +1247,7 @@ IF(LINUX AND NOT ALTERNATIVE_LD AND NOT FPROFILE_GENERATE AND NOT FPROFILE_USE)
ENDIF()
ENDIF()

IF(LINUX_STANDALONE)
IF(LINUX_STANDALONE OR SOLARIS)
# ON by default in pushbuild, but only for standalone builds.
# The comression does not play well with some RPM/DEB packaging.
# Developers can set default in environment.
Expand Down Expand Up @@ -1260,12 +1282,16 @@ ENDIF()
IF(UNIX AND MY_COMPILER_IS_GNU_OR_CLANG)
# By default, do this for STANDALONE and tarball builds.
# Off by default for sanitizer or valgrind builds.
# Off by default in pushbuild.
# Off by default for Apple Clang.
IF((INSTALL_LAYOUT MATCHES "STANDALONE" OR
INSTALL_LAYOUT MATCHES "TARGZ" OR
INSTALL_LAYOUT MATCHES "SVR4"
# ON by default for SOLARIS (also in PB2), to reduce package sizes.
IF(SOLARIS)
SET(MINIMAL_RELWITHDEBINFO_DEFAULT ON)
ELSEIF((INSTALL_LAYOUT MATCHES "STANDALONE" OR
INSTALL_LAYOUT MATCHES "TARGZ"
)
AND NOT CMAKE_COMPILER_FLAG_WITH_SANITIZE AND NOT WITH_VALGRIND
AND NOT DEFINED ENV{PB2WORKDIR}
AND NOT APPLE)
SET(MINIMAL_RELWITHDEBINFO_DEFAULT ON)
ELSE()
Expand Down Expand Up @@ -1356,7 +1382,7 @@ ENDIF()

# Fedora 34, RHEL9: undefined reference to symbol 'crc32_z@@ZLIB_1.2.9'
IF(LINUX_FEDORA_34 OR LINUX_RHEL9)
IF(NOT USING_LD_LLD)
IF(NOT USING_LD_LLD AND NOT USING_LD_MOLD)
STRING_APPEND(CMAKE_CXX_LINK_FLAGS " -Wl,--copy-dt-needed-entries")
ENDIF()
ENDIF()
Expand Down Expand Up @@ -1549,7 +1575,6 @@ ENDIF()
INCLUDE(configure.cmake)

# Common defines and includes
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
ADD_DEFINITIONS(-D__STDC_LIMIT_MACROS) # Enable C99 limit macros
ADD_DEFINITIONS(-D__STDC_FORMAT_MACROS) # Enable C99 printf format macros
ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # Get access to M_PI, M_E, etc. in math.h
Expand Down Expand Up @@ -2030,9 +2055,8 @@ ENDIF()
IF((WITH_SSL_PATH OR ALTERNATIVE_SYSTEM_SSL) AND (LINUX_RHEL8 OR LINUX_RHEL9))
SET(WITH_TIRPC "bundled")
ENDIF()

IF(WITH_TIRPC STREQUAL "bundled")
ADD_SUBDIRECTORY(extra/tirpc)
IF(LINUX)
MYSQL_CHECK_RPC()
ENDIF()

IF(HAVE_ASAN AND MY_COMPILER_IS_CLANG AND WITH_PROTOBUF STREQUAL "bundled")
Expand Down Expand Up @@ -2076,8 +2100,8 @@ IF(WITH_PROTOBUF STREQUAL "bundled" OR WITH_FIDO STREQUAL "bundled")
# Silence warning about CMP0075
CMAKE_PUSH_CHECK_STATE()
SET(CMAKE_REQUIRED_LIBRARIES)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${CBOR_BUNDLE_SRC_PATH})
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${FIDO_BUNDLE_SRC_PATH})
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/extra/libcbor)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/extra/libfido2)
CMAKE_POP_CHECK_STATE()
ENDIF()
ENDIF()
Expand Down Expand Up @@ -2339,7 +2363,6 @@ INCLUDE(cmake/abi_check.cmake)
INCLUDE(cmake/tags.cmake)

CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/my_config.h)
CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/config.h)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
${CMAKE_BINARY_DIR}/include/mysql_version.h )
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
We welcome your code contributions. Before submitting code via a GitHub pull
request, or by filing a bug in https://bugs.mysql.com you will need to have
signed the Oracle Contributor Agreement, see https://oca.opensource.oracle.com

Only pull requests from committers that can be verified as having signed the OCA
can be accepted.

Submitting a contribution
-------------------------

1. Make sure you have a user account at https://bugs.mysql.com. You'll need to reference
this user account when you submit your OCA (Oracle Contributor Agreement).
2. Sign the Oracle OCA. You can find instructions for doing that at the OCA Page,
at https://oca.opensource.oracle.com
3. Validate your contribution by including tests that sufficiently cover the functionality.
4. Verify that the entire test suite passes with your code applied.
5. Submit your pull request via GitHub or uploading it using the contribution tab to a bug
record in https://bugs.mysql.com (using the 'contribution' tab).
Loading

0 comments on commit af55207

Please sign in to comment.