Skip to content

Commit 80abd84

Browse files
committed
Merge branch '10.11' into 11.1
2 parents 7ead48a + 0e8fb97 commit 80abd84

File tree

461 files changed

+12070
-5113
lines changed

Some content is hidden

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

461 files changed

+12070
-5113
lines changed

.gitlab-ci.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ variables:
4444
# Major version dictates which branches share the same ccache. E.g. 10.6-abc
4545
# and 10.6-xyz will have the same cache.
4646
MARIADB_MAJOR_VERSION: "11.1"
47-
# NOTE! Currently ccache is only used on the Centos8 build. As each job has
47+
# NOTE! Currently ccache is only used on the Centos 9 build. As each job has
4848
# sufficiently different environments they are unable to benefit from each
4949
# other's ccaches. As each build generates about 1 GB of ccache, having
5050
# multiple caches would quickly consume all free storage on Gitlab-CI and
@@ -53,7 +53,7 @@ variables:
5353
# cache:policy are not flexible enough to have a system where the cache is
5454
# uploaded only once a week and not on every build. Having ccache on at least
5555
# one build still helps ensure that ccache compatibility is at least tested
56-
# and if the Centos 8 build is always significantly faster than all other
56+
# and if the Centos 9 build is always significantly faster than all other
5757
# builds (e.g. on self-hosted Gitlab instances) then users would at least be
5858
# able to discover it.
5959
#
@@ -209,26 +209,20 @@ fedora-sanitizer:
209209
matrix:
210210
- SANITIZER: [-DWITH_ASAN=YES, -DWITH_TSAN=YES, -DWITH_UBSAN=YES]
211211

212-
centos8:
212+
centos9:
213213
stage: build
214-
image: quay.io/centos/centos:stream8 # CentOS 8 is deprecated, use this Stream8 instead
214+
image: quay.io/centos/centos:stream9 # CentOS 9 is deprecated, use this Stream9 instead
215215
variables:
216216
GIT_STRATEGY: fetch
217217
GIT_SUBMODULE_STRATEGY: normal
218218
script:
219-
- yum install -y yum-utils rpm-build openssl-devel pcre2-devel
220-
- yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
221-
# dnf --enablerepo=powertools install Judy-devel #--> not found
222-
- dnf config-manager --set-enabled powertools
223-
# Error:
224-
# Problem: conflicting requests
225-
# - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.i686 is filtered out by modular filtering
226-
# - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64 is filtered out by modular filtering
227-
# Solution: install Judy-devel directly from downloaded rpm file:
228-
- yum install -y http://vault.centos.org/centos/8/PowerTools/x86_64/os/Packages/Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64.rpm
229-
# Use eatmydata to speed up build
230-
- yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm
231-
- yum install -y ccache # From EPEL
219+
- yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
220+
- yum install -y yum-utils rpm-build openssl-devel libeatmydata ccache
221+
# Install missing dependencies
222+
- yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/Judy-devel-1.0.5-28.el9.x86_64.rpm
223+
- yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/bison-devel-3.7.4-5.el9.x86_64.rpm
224+
- yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/multilib-rpm-config-1-19.el9.noarch.rpm
225+
# Configure ccache
232226
- source /etc/profile.d/ccache.sh
233227
- export CCACHE_DIR="$(pwd)/.ccache"; ccache --zero-stats
234228
# This repository does not have any .spec files, so install dependencies based on CentOS spec file

client/mysqlbinlog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
10521052
case QUERY_COMPRESSED_EVENT:
10531053
{
10541054
Query_log_event *qe= (Query_log_event*)ev;
1055-
if (!qe->is_trans_keyword())
1055+
if (!qe->is_trans_keyword(print_event_info->is_xa_trans()))
10561056
{
10571057
if (shall_skip_database(qe->db))
10581058
goto end;

client/mysqldump.c

Lines changed: 74 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ static void write_header(FILE *sql_file, const char *db_name)
740740
}
741741
else
742742
{
743-
fprintf(sql_file, "/*!999999\\- enable the sandbox mode */ \n");
743+
fprintf(sql_file, "/*M!999999\\- enable the sandbox mode */ \n");
744744
if (!opt_compact)
745745
{
746746
print_comment(sql_file, 0, "-- MariaDB dump %s-%s, for %s (%s)\n--\n",
@@ -6136,8 +6136,11 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
61366136
} /* dump_selected_tables */
61376137

61386138

6139+
const char fmt_gtid_pos[]= "%sSET GLOBAL gtid_slave_pos='%s';\n";
6140+
61396141
static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos,
6140-
int have_mariadb_gtid, int use_gtid)
6142+
int have_mariadb_gtid, int use_gtid,
6143+
char *set_gtid_pos)
61416144
{
61426145
MYSQL_ROW row;
61436146
MYSQL_RES *UNINIT_VAR(master);
@@ -6198,15 +6201,21 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos,
61986201
/* gtid */
61996202
if (have_mariadb_gtid)
62006203
{
6201-
print_comment(md_result_file, 0,
6202-
"\n-- Preferably use GTID to start replication from GTID "
6203-
"position:\n\n");
62046204
if (use_gtid)
6205+
{
62056206
fprintf(md_result_file,
62066207
"%sCHANGE MASTER TO MASTER_USE_GTID=slave_pos;\n",
62076208
comment_prefix);
6208-
fprintf(md_result_file,
6209-
"%sSET GLOBAL gtid_slave_pos='%s';\n",
6209+
/*
6210+
When --gtid is specified defer print of SET gtid_slave_pos until
6211+
after its placeholder table is guaranteed to have been dumped.
6212+
*/
6213+
print_comment(md_result_file, 0,
6214+
"\n-- A corresponding to the above master-data "
6215+
"CHANGE-MASTER settings to the slave gtid state is printed "
6216+
"later in the file.\n");
6217+
}
6218+
sprintf(set_gtid_pos, fmt_gtid_pos,
62106219
(!use_gtid ? "-- " : comment_prefix), gtid_pos);
62116220
}
62126221

@@ -6222,6 +6231,11 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos,
62226231
fprintf(md_result_file,
62236232
"%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
62246233
(use_gtid ? "-- " : comment_prefix), file, offset);
6234+
if (have_mariadb_gtid && !use_gtid)
6235+
print_comment(md_result_file, 0,
6236+
"\n-- A corresponding to the above master-data CHANGE-MASTER "
6237+
"settings to the slave gtid state is printed as comments "
6238+
"later in the file.\n");
62256239
check_io(md_result_file);
62266240

62276241
if (!consistent_binlog_pos)
@@ -6291,8 +6305,8 @@ static int add_slave_statements(void)
62916305
return(0);
62926306
}
62936307

6294-
static int do_show_slave_status(MYSQL *mysql_con, int use_gtid,
6295-
int have_mariadb_gtid)
6308+
static int do_show_slave_status(MYSQL *mysql_con, int have_mariadb_gtid,
6309+
int use_gtid, char* set_gtid_pos)
62966310
{
62976311
MYSQL_RES *UNINIT_VAR(slave);
62986312
MYSQL_ROW row;
@@ -6332,10 +6346,12 @@ static int do_show_slave_status(MYSQL *mysql_con, int use_gtid,
63326346
mysql_free_result(slave);
63336347
return 1;
63346348
}
6349+
/* defer print similarly to do_show_master_status */
63356350
print_comment(md_result_file, 0,
6336-
"-- GTID position to start replication:\n");
6337-
fprintf(md_result_file, "%sSET GLOBAL gtid_slave_pos='%s';\n",
6338-
gtid_comment_prefix, gtid_pos);
6351+
"\n-- A corresponding to the below dump-slave "
6352+
"CHANGE-MASTER settings to the slave gtid state is printed "
6353+
"later in the file.\n");
6354+
sprintf(set_gtid_pos, fmt_gtid_pos, gtid_comment_prefix, gtid_pos);
63396355
}
63406356
if (use_gtid)
63416357
print_comment(md_result_file, 0,
@@ -7056,6 +7072,34 @@ static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size)
70567072
die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG);
70577073
}
70587074

7075+
/**
7076+
Print earlier prepared SET @@global.gtid_slave_pos.
7077+
7078+
@param set_gtid_pos[in] formatted sql set statement
7079+
**/
7080+
static void do_print_set_gtid_slave_pos(const char *set_gtid_pos,
7081+
my_bool is_master_data)
7082+
{
7083+
DBUG_ASSERT(opt_master_data || opt_slave_data);
7084+
if (is_master_data)
7085+
{
7086+
print_comment(md_result_file, 0,
7087+
"\n-- The deferred gtid setting for slave corresponding to "
7088+
"the master-data CHANGE-MASTER follows\n");
7089+
print_comment(md_result_file, 0,
7090+
"\n-- Preferably use GTID to start replication from GTID "
7091+
"position:\n\n");
7092+
}
7093+
else
7094+
{
7095+
print_comment(md_result_file, 0,
7096+
"\n-- The deferred gtid setting for slave corresponding to "
7097+
"the dump-slave CHANGE-MASTER follows\n");
7098+
print_comment(md_result_file, 0,
7099+
"-- GTID position to start replication:\n");
7100+
}
7101+
fprintf(md_result_file, "%s", set_gtid_pos);
7102+
}
70597103

70607104
int main(int argc, char **argv)
70617105
{
@@ -7064,6 +7108,12 @@ int main(int argc, char **argv)
70647108
int exit_code;
70657109
int consistent_binlog_pos= 0;
70667110
int have_mariadb_gtid= 0;
7111+
/*
7112+
to hold SET @@global.gtid_slave_pos which is deferred to print
7113+
until the function epilogue.
7114+
*/
7115+
char master_set_gtid_pos[3 + sizeof(fmt_gtid_pos) + MAX_GTID_LENGTH]= {0};
7116+
char slave_set_gtid_pos[3 + sizeof(fmt_gtid_pos) + MAX_GTID_LENGTH]= {0};
70677117
MY_INIT(argv[0]);
70687118

70697119
sf_leaking_memory=1; /* don't report memory leaks on early exits */
@@ -7102,11 +7152,11 @@ int main(int argc, char **argv)
71027152
write_header(md_result_file, *argv);
71037153

71047154
/* Set MAX_STATEMENT_TIME to 0 unless set in client */
7105-
my_snprintf(query, sizeof(query), "/*!100100 SET @@MAX_STATEMENT_TIME=%f */", opt_max_statement_time);
7155+
my_snprintf(query, sizeof(query), "/*M!100100 SET @@MAX_STATEMENT_TIME=%f */", opt_max_statement_time);
71067156
mysql_query(mysql, query);
71077157

71087158
/* Set server side timeout between client commands to server compiled-in default */
7109-
mysql_query(mysql, "/*!100100 SET WAIT_TIMEOUT=DEFAULT */");
7159+
mysql_query(mysql, "/*M!100100 SET WAIT_TIMEOUT=DEFAULT */");
71107160

71117161
/* Check if the server support multi source */
71127162
if (mysql_get_server_version(mysql) >= 100000)
@@ -7167,10 +7217,12 @@ int main(int argc, char **argv)
71677217
goto err;
71687218

71697219
if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos,
7170-
have_mariadb_gtid, opt_use_gtid))
7220+
have_mariadb_gtid,
7221+
opt_use_gtid, master_set_gtid_pos))
71717222
goto err;
7172-
if (opt_slave_data && do_show_slave_status(mysql, opt_use_gtid,
7173-
have_mariadb_gtid))
7223+
if (opt_slave_data && do_show_slave_status(mysql,
7224+
have_mariadb_gtid,
7225+
opt_use_gtid, slave_set_gtid_pos))
71747226
goto err;
71757227
if (opt_single_transaction && do_unlock_tables(mysql)) /* unlock but no commit! */
71767228
goto err;
@@ -7238,6 +7290,11 @@ int main(int argc, char **argv)
72387290
if (opt_system & OPT_SYSTEM_TIMEZONES)
72397291
dump_all_timezones();
72407292

7293+
if (opt_master_data && master_set_gtid_pos[0])
7294+
do_print_set_gtid_slave_pos(master_set_gtid_pos, TRUE);
7295+
if (opt_slave_data && slave_set_gtid_pos[0])
7296+
do_print_set_gtid_slave_pos(slave_set_gtid_pos, FALSE);
7297+
72417298
/* add 'START SLAVE' to end of dump */
72427299
if (opt_slave_apply && add_slave_statements())
72437300
goto err;

cmake/libfmt.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ MACRO(BUNDLE_LIBFMT)
1515
ExternalProject_Add(
1616
libfmt
1717
PREFIX "${dir}"
18-
URL "https://github.com/fmtlib/fmt/archive/refs/tags/8.0.1.zip"
19-
URL_MD5 e77873199e897ca9f780479ad68e25b1
18+
URL "https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zip"
19+
URL_MD5 5f3915e2eff60e7f70c558120592100d
2020
INSTALL_COMMAND ""
2121
CONFIGURE_COMMAND ""
2222
BUILD_COMMAND ""

cmake/os/Windows.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ IF(MSVC)
273273
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " /d2OptimizeHugeFunctions")
274274
STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /d2OptimizeHugeFunctions")
275275
ENDIF()
276+
ADD_COMPILE_OPTIONS($<$<COMPILE_LANGUAGE:C,CXX>:/utf-8>)
276277
ENDIF()
277278

278279
# Always link with socket/synchronization libraries

cmake/pcre.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ MACRO(BUNDLE_PCRE2)
5757
ExternalProject_Add(
5858
pcre2
5959
PREFIX "${dir}"
60-
URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.zip"
61-
URL_MD5 b58f050f2fdd6f2ca5774a2975377a85
60+
URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.zip"
61+
URL_MD5 dfab8313154b3377a6959c3b6377841e
6262
INSTALL_COMMAND ""
6363
CMAKE_ARGS
6464
"-DCMAKE_WARN_DEPRECATED=FALSE"

configure.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ CHECK_FUNCTION_EXISTS (vasprintf HAVE_VASPRINTF)
414414
CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
415415
CHECK_FUNCTION_EXISTS (nl_langinfo HAVE_NL_LANGINFO)
416416

417+
IF(NOT HAVE_PTHREAD_RWLOCK_RDLOCK AND NOT HAVE_RWLOCK_INIT AND NOT WIN32)
418+
MESSAGE(FATAL_ERROR "No usable rwlock implementation found")
419+
ENDIF()
420+
417421
IF(HAVE_SYS_EVENT_H)
418422
CHECK_FUNCTION_EXISTS (kqueue HAVE_KQUEUE)
419423
ENDIF()

debian/additions/debian-start

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,27 @@
66
# Changes to this file will be preserved when updating the Debian package.
77
#
88

9+
# shellcheck source=debian/additions/debian-start.inc.sh
910
source /usr/share/mariadb/debian-start.inc.sh
1011

1112
# Read default/mysql first and then default/mariadb just like the init.d file does
12-
if [ -f /etc/default/mysql ]; then
13+
if [ -f /etc/default/mysql ]
14+
then
15+
# shellcheck source=/dev/null
1316
. /etc/default/mysql
1417
fi
1518

16-
if [ -f /etc/default/mariadb ]; then
19+
if [ -f /etc/default/mariadb ]
20+
then
21+
# shellcheck source=/dev/null
1722
. /etc/default/mariadb
1823
fi
1924

2025
MARIADB="/usr/bin/mariadb --defaults-file=/etc/mysql/debian.cnf"
2126
MYADMIN="/usr/bin/mariadb-admin --defaults-file=/etc/mysql/debian.cnf"
2227
# Don't run full mariadb-upgrade on every server restart, use --version-check to do it only once
2328
MYUPGRADE="/usr/bin/mariadb-upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check --silent"
24-
MYCHECK="/usr/bin/mariadb-check --defaults-file=/etc/mysql/debian.cnf"
2529
MYCHECK_SUBJECT="WARNING: mariadb-check has found corrupt tables"
26-
MYCHECK_PARAMS="--all-databases --fast --silent"
2730
MYCHECK_RCPT="${MYCHECK_RCPT:-root}"
2831

2932
## Checking for corrupt, not cleanly closed (only for MyISAM and Aria engines) and upgrade needing tables.

0 commit comments

Comments
 (0)