Skip to content

Commit be24e75

Browse files
committed
Merge 10.11 into 11.0
2 parents 5e2d08b + f833ef5 commit be24e75

File tree

501 files changed

+14938
-28850
lines changed

Some content is hidden

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

501 files changed

+14938
-28850
lines changed

BUILD/SETUP.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ get_make_parallel_flag
126126
# SSL library to use.--with-ssl will select our bundled yaSSL
127127
# implementation of SSL. --with-ssl=yes will first try system library
128128
# then the bundled one --with-ssl=system will use the system library.
129-
# We use bundled by default as this is guaranteed to work with Galera
130-
SSL_LIBRARY=--with-ssl=bundled
129+
# We normally use bundled by default as this is guaranteed to work with Galera
130+
# However as bundled gives problem on SuSE with tls_version1.test, system
131+
# is used
132+
SSL_LIBRARY=--with-ssl=system
131133

132134
if [ "x$warning_mode" = "xpedantic" ]; then
133135
warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,15 @@ ENDIF()
195195

196196
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
197197

198+
#
199+
# Enable protection of statement's memory root after first SP/PS execution.
200+
# Can be switched on only for debug build.
201+
#
202+
OPTION(WITH_PROTECT_STATEMENT_MEMROOT "Enable protection of statement's memory root after first SP/PS execution. Turned into account only for debug build" OFF)
203+
IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND WITH_PROTECT_STATEMENT_MEMROOT)
204+
ADD_DEFINITIONS(-DPROTECT_STATEMENT_MEMROOT)
205+
ENDIF()
206+
198207
INCLUDE(check_compiler_flag)
199208
INCLUDE(check_linker_flag)
200209

client/mysqlbinlog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ static struct my_option my_options[] =
16391639
"given sequence numbers are printed.",
16401640
&stop_pos_str, &stop_pos_str, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
16411641
0, 0},
1642-
{"table", 'T', "List entries for just this table (local log only).",
1642+
{"table", 'T', "List entries for just this table (affects only row events).",
16431643
&table, &table, 0, GET_STR_ALLOC, REQUIRED_ARG,
16441644
0, 0, 0, 0, 0, 0},
16451645
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \

client/mysqltest.cc

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,35 +1037,38 @@ static int do_read_query_result(struct st_connection *cn)
10371037
static int do_stmt_prepare(struct st_connection *cn, const char *q, int q_len)
10381038
{
10391039
/* The cn->stmt is already set. */
1040+
DBUG_ENTER("do_stmt_prepare");
10401041
if (!cn->has_thread)
1041-
return mysql_stmt_prepare(cn->stmt, q, q_len);
1042+
DBUG_RETURN(mysql_stmt_prepare(cn->stmt, q, q_len));
10421043
cn->cur_query= q;
10431044
cn->cur_query_len= q_len;
10441045
signal_connection_thd(cn, EMB_PREPARE_STMT);
10451046
wait_query_thread_done(cn);
1046-
return cn->result;
1047+
DBUG_RETURN(cn->result);
10471048
}
10481049

10491050

10501051
static int do_stmt_execute(struct st_connection *cn)
10511052
{
1053+
DBUG_ENTER("do_stmt_execute");
10521054
/* The cn->stmt is already set. */
10531055
if (!cn->has_thread)
1054-
return mysql_stmt_execute(cn->stmt);
1056+
DBUG_RETURN(mysql_stmt_execute(cn->stmt));
10551057
signal_connection_thd(cn, EMB_EXECUTE_STMT);
10561058
wait_query_thread_done(cn);
1057-
return cn->result;
1059+
DBUG_RETURN(cn->result);
10581060
}
10591061

10601062

10611063
static int do_stmt_close(struct st_connection *cn)
10621064
{
1065+
DBUG_ENTER("do_stmt_close");
10631066
/* The cn->stmt is already set. */
10641067
if (!cn->has_thread)
1065-
return mysql_stmt_close(cn->stmt);
1068+
DBUG_RETURN(mysql_stmt_close(cn->stmt));
10661069
signal_connection_thd(cn, EMB_CLOSE_STMT);
10671070
wait_query_thread_done(cn);
1068-
return cn->result;
1071+
DBUG_RETURN(cn->result);
10691072
}
10701073

10711074

@@ -7967,6 +7970,7 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
79677970

79687971
if (!(count= mysql_warning_count(mysql)))
79697972
DBUG_RETURN(0);
7973+
DBUG_PRINT("info", ("Warnings: %ud", count));
79707974

79717975
/*
79727976
If one day we will support execution of multi-statements
@@ -8422,13 +8426,17 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
84228426
char *query, size_t query_len, DYNAMIC_STRING *ds,
84238427
DYNAMIC_STRING *ds_warnings)
84248428
{
8429+
my_bool ignore_second_execution= 0;
84258430
MYSQL_RES *res= NULL; /* Note that here 'res' is meta data result set */
84268431
MYSQL *mysql= cn->mysql;
84278432
MYSQL_STMT *stmt;
84288433
DYNAMIC_STRING ds_prepare_warnings;
84298434
DYNAMIC_STRING ds_execute_warnings;
84308435
DBUG_ENTER("run_query_stmt");
84318436
DBUG_PRINT("query", ("'%-.60s'", query));
8437+
DBUG_PRINT("info",
8438+
("disable_warnings: %d prepare_warnings_enabled: %d",
8439+
(int) disable_warnings, (int) prepare_warnings_enabled));
84328440

84338441
if (!mysql)
84348442
{
@@ -8499,12 +8507,18 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
84998507
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
85008508
goto end;
85018509
}
8510+
/*
8511+
We cannot run query twice if we get prepare warnings as these will otherwise be
8512+
disabled
8513+
*/
8514+
ignore_second_execution= (prepare_warnings_enabled &&
8515+
mysql_warning_count(mysql) != 0);
85028516
}
85038517

85048518
/*
85058519
Execute the query
85068520
*/
8507-
if (do_stmt_execute(cn))
8521+
if (!ignore_second_execution && do_stmt_execute(cn))
85088522
{
85098523
handle_error(command, mysql_stmt_errno(stmt),
85108524
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
@@ -8579,7 +8593,10 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
85798593
that warnings from both the prepare and execute phase are shown.
85808594
*/
85818595
if (!disable_warnings && !prepare_warnings_enabled)
8596+
{
8597+
DBUG_PRINT("info", ("warnings disabled"));
85828598
dynstr_set(&ds_prepare_warnings, NULL);
8599+
}
85838600
}
85848601
else
85858602
{
@@ -8682,7 +8699,9 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
86828699
error - function will not return
86838700
*/
86848701

8685-
void run_prepare_stmt(struct st_connection *cn, struct st_command *command, const char *query, size_t query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings)
8702+
void run_prepare_stmt(struct st_connection *cn, struct st_command *command,
8703+
const char *query, size_t query_len, DYNAMIC_STRING *ds,
8704+
DYNAMIC_STRING *ds_warnings)
86868705
{
86878706

86888707
MYSQL *mysql= cn->mysql;
@@ -8843,9 +8862,8 @@ void run_bind_stmt(struct st_connection *cn, struct st_command *command,
88438862
*/
88448863

88458864
void run_execute_stmt(struct st_connection *cn, struct st_command *command,
8846-
const char *query, size_t query_len, DYNAMIC_STRING *ds,
8847-
DYNAMIC_STRING *ds_warnings
8848-
)
8865+
const char *query, size_t query_len, DYNAMIC_STRING *ds,
8866+
DYNAMIC_STRING *ds_warnings)
88498867
{
88508868
MYSQL_RES *res= NULL; /* Note that here 'res' is meta data result set */
88518869
MYSQL *mysql= cn->mysql;

cmake/stack_direction.c

Lines changed: 0 additions & 33 deletions
This file was deleted.

configure.cmake

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -672,25 +672,11 @@ int main()
672672
}
673673
" HAVE_PTHREAD_YIELD_ZERO_ARG)
674674

675-
IF(NOT STACK_DIRECTION)
676-
IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
677-
MESSAGE(FATAL_ERROR
678-
"STACK_DIRECTION is not defined. Please specify -DSTACK_DIRECTION=1 "
679-
"or -DSTACK_DIRECTION=-1 when calling cmake.")
680-
ELSE()
681-
TRY_RUN(STACKDIR_RUN_RESULT STACKDIR_COMPILE_RESULT
682-
${CMAKE_BINARY_DIR}
683-
${CMAKE_SOURCE_DIR}/cmake/stack_direction.c
684-
)
685-
# Test program returns 0 (down) or 1 (up).
686-
# Convert to -1 or 1
687-
IF(STACKDIR_RUN_RESULT EQUAL 0)
688-
SET(STACK_DIRECTION -1 CACHE INTERNAL "Stack grows direction")
689-
ELSE()
690-
SET(STACK_DIRECTION 1 CACHE INTERNAL "Stack grows direction")
691-
ENDIF()
692-
MESSAGE(STATUS "Checking stack direction : ${STACK_DIRECTION}")
693-
ENDIF()
675+
IF(STACK_DIRECTION)
676+
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(parisc|hppa)")
677+
SET(STACK_DIRECTION 1 CACHE INTERNAL "Stack grows direction")
678+
ELSE()
679+
SET(STACK_DIRECTION -1 CACHE INTERNAL "Stack grows direction")
694680
ENDIF()
695681

696682
#

debian/rules

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,6 @@ ifeq (32,$(DEB_HOST_ARCH_BITS))
5151
CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO
5252
endif
5353

54-
# Cross building requires stack direction instruction
55-
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
56-
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),alpha amd64 arm arm64 i386 ia64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64))
57-
CMAKEFLAGS += -DSTACK_DIRECTION=-1
58-
endif
59-
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),hppa))
60-
CMAKEFLAGS += -DSTACK_DIRECTION=1
61-
endif
62-
endif
63-
6454
# Only attempt to build with PMEM on archs that have package libpmem-dev available
6555
# See https://packages.debian.org/search?searchon=names&keywords=libpmem-dev
6656
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el riscv64))

extra/mariabackup/xtrabackup.cc

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
8080
#include <srv0start.h>
8181
#include "trx0sys.h"
8282
#include <buf0dblwr.h>
83+
#include <buf0flu.h>
8384
#include "ha_innodb.h"
8485

8586
#include <list>
@@ -2386,10 +2387,15 @@ static bool innodb_init()
23862387
buf_flush_sync();
23872388
recv_sys.debug_free();
23882389
ut_ad(!os_aio_pending_reads());
2389-
ut_ad(!os_aio_pending_writes());
23902390
ut_d(mysql_mutex_lock(&buf_pool.flush_list_mutex));
23912391
ut_ad(!buf_pool.get_oldest_modification(0));
23922392
ut_d(mysql_mutex_unlock(&buf_pool.flush_list_mutex));
2393+
/* os_aio_pending_writes() may hold here if some write_io_callback()
2394+
did not release the slot yet. However, the page write itself must
2395+
have completed, because the buf_pool.flush_list is empty. In debug
2396+
builds, we wait for this to happen, hoping to get a hung process if
2397+
this assumption does not hold. */
2398+
ut_d(os_aio_wait_until_no_pending_writes(false));
23932399
log_sys.close_file();
23942400

23952401
if (xtrabackup_incremental)
@@ -4660,7 +4666,9 @@ static bool xtrabackup_backup_func()
46604666
goto fail;
46614667
}
46624668

4663-
log_sys.create();
4669+
if (!log_sys.create()) {
4670+
goto fail;
4671+
}
46644672
/* get current checkpoint_lsn */
46654673
{
46664674
mysql_mutex_lock(&recv_sys.mutex);
@@ -6030,7 +6038,9 @@ static bool xtrabackup_prepare_func(char** argv)
60306038
}
60316039

60326040
recv_sys.create();
6033-
log_sys.create();
6041+
if (!log_sys.create()) {
6042+
goto error;
6043+
}
60346044
recv_sys.recovery_on = true;
60356045

60366046
xb_fil_io_init();

extra/wolfssl/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ ${WOLFCRYPT_SRCDIR}/rsa.c
102102
${WOLFCRYPT_SRCDIR}/sha.c
103103
${WOLFCRYPT_SRCDIR}/sha256.c
104104
${WOLFCRYPT_SRCDIR}/sha512.c
105+
${WOLFCRYPT_SRCDIR}/poly1305.c
106+
${WOLFCRYPT_SRCDIR}/chacha.c
107+
${WOLFCRYPT_SRCDIR}/chacha20_poly1305.c
105108
${WOLFCRYPT_SRCDIR}/wc_port.c
106109
${WOLFCRYPT_SRCDIR}/wc_encrypt.c
107110
${WOLFCRYPT_SRCDIR}/hash.c
@@ -159,6 +162,8 @@ IF(WOLFSSL_X86_64_BUILD)
159162
LIST(APPEND WOLFCRYPT_SOURCES
160163
${WOLFCRYPT_SRCDIR}/aes_asm.S
161164
${WOLFCRYPT_SRCDIR}/aes_gcm_asm.S
165+
${WOLFCRYPT_SRCDIR}/chacha_asm.S
166+
${WOLFCRYPT_SRCDIR}/poly1305_asm.S
162167
${WOLFCRYPT_SRCDIR}/sha512_asm.S
163168
${WOLFCRYPT_SRCDIR}/sha256_asm.S)
164169
ADD_DEFINITIONS(-maes -msse4.2 -mpclmul)

extra/wolfssl/user_settings.h.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@
1919
#define HAVE_TLS_EXTENSIONS
2020
#define HAVE_AES_ECB
2121
#define HAVE_AESGCM
22+
#define HAVE_CHACHA
23+
#define HAVE_POLY1305
2224
#define WOLFSSL_AES_COUNTER
2325
#define NO_WOLFSSL_STUB
2426
#define OPENSSL_ALL
2527
#define WOLFSSL_ALLOW_TLSV10
2628
#define NO_OLD_TIMEVAL_NAME
29+
#define HAVE_SECURE_RENEGOTIATION
30+
#define HAVE_EXTENDED_MASTER
2731

2832
/* TLSv1.3 definitions (all needed to build) */
2933
#define WOLFSSL_TLS13

0 commit comments

Comments
 (0)