Skip to content

Commit 0186b0a

Browse files
committed
Merge mariadb-10.5.3 into 10.5
2 parents 9810e0a + 173adea commit 0186b0a

File tree

100 files changed

+1570
-288
lines changed

Some content is hidden

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

100 files changed

+1570
-288
lines changed

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ IF(SECURITY_HARDENED AND NOT WITH_ASAN AND NOT WITH_UBSAN AND NOT WITH_TSAN)
251251
ENDIF()
252252

253253
INCLUDE(wsrep)
254-
INCLUDE(cpack_rpm)
255-
INCLUDE(cpack_deb)
256254

257255
OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_EXIT()" ON)
258256
IF(WITH_DBUG_TRACE)
@@ -383,8 +381,6 @@ MYSQL_CHECK_SSL()
383381
MYSQL_CHECK_READLINE()
384382

385383
SET(MALLOC_LIBRARY "system")
386-
SET(PYTHON_SHEBANG "/usr/bin/env python" CACHE STRING "python shebang")
387-
MARK_AS_ADVANCED(PYTHON_SHEBANG)
388384

389385
CHECK_PCRE()
390386

@@ -421,6 +417,12 @@ UNSET (MYSQLD_STATIC_PLUGIN_LIBS CACHE)
421417

422418
INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb)
423419

420+
INCLUDE(cpack_rpm)
421+
INCLUDE(cpack_deb)
422+
423+
SET(PYTHON_SHEBANG "/usr/bin/env python" CACHE STRING "python shebang")
424+
MARK_AS_ADVANCED(PYTHON_SHEBANG)
425+
424426
# Add storage engines and plugins.
425427
CONFIGURE_PLUGINS()
426428

cmake/cpack_rpm.cmake

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,16 @@ SET(ignored
114114
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd"
115115
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
116116
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d"
117+
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/sysusers.d"
117118
"%ignore ${CMAKE_INSTALL_PREFIX}/lib64"
119+
"%ignore ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig"
118120
"%ignore ${CMAKE_INSTALL_PREFIX}/sbin"
119121
"%ignore ${CMAKE_INSTALL_PREFIX}/share"
120122
"%ignore ${CMAKE_INSTALL_PREFIX}/share/aclocal"
121123
"%ignore ${CMAKE_INSTALL_PREFIX}/share/doc"
122124
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man"
125+
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man1"
126+
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man8"
123127
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man1*"
124128
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man8*"
125129
"%ignore ${CMAKE_INSTALL_PREFIX}/share/pkgconfig"
@@ -192,9 +196,10 @@ SET(CPACK_RPM_compat_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/
192196
SET(CPACK_RPM_compat_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
193197

194198
MACRO(ALTERNATIVE_NAME real alt)
195-
SET(ver "%{version}-%{release}")
196-
IF (${epoch})
197-
SET(ver "${epoch}:${ver}")
199+
IF(${ARGC} GREATER 2)
200+
SET(ver ${ARGV2})
201+
ELSE()
202+
SET(ver "${epoch}%{version}-%{release}")
198203
ENDIF()
199204

200205
SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES")
@@ -209,17 +214,40 @@ ALTERNATIVE_NAME("test" "mysql-test")
209214

210215
# Argh! Different distributions call packages differently, to be a drop-in
211216
# replacement we have to fake distribution-specific dependencies
217+
# NOTE, use ALTERNATIVE_NAME when a package has a different name
218+
# in some distribution, it's not for adding new PROVIDES
212219

213220
IF(RPM MATCHES "(rhel|centos)6")
214221
ALTERNATIVE_NAME("client" "mysql")
215222
ELSEIF(RPM MATCHES "fedora" OR RPM MATCHES "(rhel|centos)7")
216-
SET(epoch 1) # this is fedora
223+
SET(epoch 1:) # this is fedora
217224
ALTERNATIVE_NAME("client" "mariadb")
218225
ALTERNATIVE_NAME("client" "mysql")
219226
ALTERNATIVE_NAME("devel" "mariadb-devel")
220227
ALTERNATIVE_NAME("server" "mariadb-server")
221228
ALTERNATIVE_NAME("server" "mysql-compat-server")
222229
ALTERNATIVE_NAME("test" "mariadb-test")
230+
ELSEIF(RPM MATCHES "(rhel|centos)8")
231+
SET(epoch 3:)
232+
ALTERNATIVE_NAME("backup" "mariadb-backup")
233+
ALTERNATIVE_NAME("client" "mariadb")
234+
ALTERNATIVE_NAME("common" "mariadb-common")
235+
ALTERNATIVE_NAME("common" "mariadb-errmsg")
236+
ALTERNATIVE_NAME("server" "mariadb-server")
237+
ALTERNATIVE_NAME("server" "mariadb-server-utils")
238+
ALTERNATIVE_NAME("shared" "mariadb-connector-c" ${MARIADB_CONNECTOR_C_VERSION}-1)
239+
ALTERNATIVE_NAME("shared" "mariadb-connector-c-config" ${MARIADB_CONNECTOR_C_VERSION}-1)
240+
SETA(CPACK_RPM_client_PACKAGE_PROVIDES "mariadb-galera = 3:%{version}-%{release}")
241+
SETA(CPACK_RPM_common_PACKAGE_PROVIDES "mariadb-galera-common = 3:%{version}-%{release}")
242+
SETA(CPACK_RPM_common_PACKAGE_REQUIRES "MariaDB-shared")
243+
ELSEIF(RPM MATCHES "sles")
244+
ALTERNATIVE_NAME("server" "mariadb")
245+
SETA(CPACK_RPM_server_PACKAGE_PROVIDES
246+
"mysql = %{version}-%{release}"
247+
"mariadb_${MAJOR_VERSION}${MINOR_VERSION} = %{version}-%{release}"
248+
"mariadb-${MAJOR_VERSION}${MINOR_VERSION} = %{version}-%{release}"
249+
"mariadb-server = %{version}-%{release}"
250+
)
223251
ENDIF()
224252
IF(RPM MATCHES "fedora31" OR RPM MATCHES "(rhel|centos)8")
225253
SET(PYTHON_SHEBANG "/usr/bin/python3" CACHE STRING "python shebang")

cmake/mariadb_connector_c.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ IF(UNIX)
4747
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX})"
4848
COMPONENT Development)
4949
ENDIF()
50+
51+
GET_DIRECTORY_PROPERTY(MARIADB_CONNECTOR_C_VERSION DIRECTORY libmariadb DEFINITION CPACK_PACKAGE_VERSION)
52+
MESSAGE1(MARIADB_CONNECTOR_C_VERSION "MariaDB Connector/C ${MARIADB_CONNECTOR_C_VERSION}")

extra/wolfssl/user_settings.h.in

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@
2020
#define WOLFSSL_AES_COUNTER
2121
#define NO_WOLFSSL_STUB
2222
#define OPENSSL_ALL
23-
#define WOLFSSL_ALLOW_TLSV10
23+
#undef WOLFSSL_ALLOW_TLSV10 /* see https://github.com/wolfSSL/wolfssl/issues/2960 */
24+
#define NO_OLD_TIMEVAL_NAME
25+
/*
26+
FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test
27+
WolfSSL will use more stack space with it, with fastmath
28+
*/
29+
#define FP_MAX_BITS 16384
2430

2531
#cmakedefine WOLFSSL_AESNI
2632
#cmakedefine USE_FAST_MATH
2733
#cmakedefine TFM_TIMING_RESISTANT
2834
#cmakedefine HAVE_INTEL_RDSEED
2935
#cmakedefine USE_INTEL_SPEEDUP
30-
#cmakedefine FP_MAX_BITS @FP_MAX_BITS@
3136
#cmakedefine USE_FAST_MATH
3237
#cmakedefine WOLFSSL_X86_64_BUILD
3338

extra/wolfssl/wolfssl

Submodule wolfssl updated 784 files

include/my_compare.h

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -128,31 +128,32 @@ extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, const uchar *a);
128128
#endif
129129

130130
/**
131-
Return values of index_cond_func_xxx functions.
132-
133-
0=ICP_NO_MATCH - index tuple doesn't satisfy the pushed index condition (the
134-
engine should discard the tuple and go to the next one)
135-
1=ICP_MATCH - index tuple satisfies the pushed index condition (the
136-
engine should fetch and return the record)
137-
2=ICP_OUT_OF_RANGE - index tuple is out range that we're scanning, e.g. this
138-
if we're scanning "t.key BETWEEN 10 AND 20" and got a
139-
"t.key=21" tuple (the engine should stop scanning and
140-
return HA_ERR_END_OF_FILE right away).
141-
3=ICP_ABORTED_BY_USER - engine must stop scanning and should return
142-
HA_ERR_ABORTED_BY_USER right away
143-
-1= ICP_ERROR - Reserved for internal errors in engines. Should not be
144-
returned by index_cond_func_xxx
131+
Return values for pushed index condition or rowid filter check functions.
132+
133+
0=CHECK_NEG - The filter is not satisfied. The engine should discard this
134+
index tuple and continue the scan.
135+
1=CHECK_POS - The filter is statisfied. Current index tuple should be
136+
returned to the SQL layer.
137+
2=CHECK_OUT_OF_RANGE - the index tuple is outside of the range that we're
138+
scanning. (Example: if we're scanning "t.key BETWEEN 10 AND
139+
20" and got a "t.key=21" tuple) Tthe engine should stop
140+
scanning and return HA_ERR_END_OF_FILE right away).
141+
3=CHECK_ABORTED_BY_USER - the engine must stop scanning and should return
142+
HA_ERR_ABORTED_BY_USER right away
143+
-1=CHECK_ERROR - Reserved for internal errors in engines. Should not be
144+
returned by ICP or rowid filter check functions.
145145
*/
146146

147-
typedef enum icp_result {
148-
ICP_ERROR=-1,
149-
ICP_NO_MATCH=0,
150-
ICP_MATCH=1,
151-
ICP_OUT_OF_RANGE=2,
152-
ICP_ABORTED_BY_USER=3
153-
} ICP_RESULT;
154-
155-
typedef ICP_RESULT (*index_cond_func_t)(void *param);
156-
typedef int (*rowid_filter_func_t)(void *param);
147+
typedef enum check_result {
148+
CHECK_ERROR=-1,
149+
CHECK_NEG=0,
150+
CHECK_POS=1,
151+
CHECK_OUT_OF_RANGE=2,
152+
CHECK_ABORTED_BY_USER=3
153+
} check_result_t;
154+
155+
typedef check_result_t (*index_cond_func_t)(void *param);
156+
typedef check_result_t (*rowid_filter_func_t)(void *param);
157+
typedef int (*rowid_filter_is_active_func_t)(void *param);
157158

158159
#endif /* _my_compare_h */

include/mysql/service_my_crypt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extern "C" {
4545
/* The max key length of all supported algorithms */
4646
#define MY_AES_MAX_KEY_LENGTH 32
4747

48-
#define MY_AES_CTX_SIZE 600
48+
#define MY_AES_CTX_SIZE 640
4949

5050
enum my_aes_mode {
5151
MY_AES_ECB, MY_AES_CBC

include/ssl_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181

8282
#ifndef HAVE_WOLFSSL
8383
#define EVP_MD_CTX_reset(X) EVP_MD_CTX_cleanup(X)
84-
#endif
8584
#define EVP_CIPHER_CTX_reset(X) EVP_CIPHER_CTX_cleanup(X)
85+
#endif
8686
#define X509_get0_notBefore(X) X509_get_notBefore(X)
8787
#define X509_get0_notAfter(X) X509_get_notAfter(X)
8888
#endif

include/violite.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ int vio_getnameinfo(const struct sockaddr *sa,
149149
/* Set yaSSL to use same type as MySQL do for socket handles */
150150
typedef my_socket YASSL_SOCKET_T;
151151
#define YASSL_SOCKET_T_DEFINED
152-
#define Timeval WOLFSSL_Timeval
152+
#define template _template /* bug in WolfSSL 4.4.0, see also my_crypt.cc */
153153
#include <openssl/ssl.h>
154-
#undef Timeval
154+
#undef template
155155
#include <openssl/err.h>
156156
#ifdef DEPRECATED
157157
#undef DEPRECATED

libmariadb

0 commit comments

Comments
 (0)