Skip to content

Commit

Permalink
Merge branch '10.6' into 10.11
Browse files Browse the repository at this point in the history
  • Loading branch information
sanja-byelkin committed Jul 22, 2024
2 parents 0f6f111 + a938503 commit 0fe39d3
Show file tree
Hide file tree
Showing 362 changed files with 7,659 additions and 3,805 deletions.
28 changes: 11 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ variables:
# Major version dictates which branches share the same ccache. E.g. 10.6-abc
# and 10.6-xyz will have the same cache.
MARIADB_MAJOR_VERSION: "10.9"
# NOTE! Currently ccache is only used on the Centos8 build. As each job has
# NOTE! Currently ccache is only used on the Centos 9 build. As each job has
# sufficiently different environments they are unable to benefit from each
# other's ccaches. As each build generates about 1 GB of ccache, having
# multiple caches would quickly consume all free storage on Gitlab-CI and
Expand All @@ -53,7 +53,7 @@ variables:
# cache:policy are not flexible enough to have a system where the cache is
# uploaded only once a week and not on every build. Having ccache on at least
# one build still helps ensure that ccache compatibility is at least tested
# and if the Centos 8 build is always significantly faster than all other
# and if the Centos 9 build is always significantly faster than all other
# builds (e.g. on self-hosted Gitlab instances) then users would at least be
# able to discover it.
#
Expand Down Expand Up @@ -209,26 +209,20 @@ fedora-sanitizer:
matrix:
- SANITIZER: [-DWITH_ASAN=YES, -DWITH_TSAN=YES, -DWITH_UBSAN=YES]

centos8:
centos9:
stage: build
image: quay.io/centos/centos:stream8 # CentOS 8 is deprecated, use this Stream8 instead
image: quay.io/centos/centos:stream9 # CentOS 9 is deprecated, use this Stream9 instead
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: normal
script:
- yum install -y yum-utils rpm-build openssl-devel pcre2-devel
- yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# dnf --enablerepo=powertools install Judy-devel #--> not found
- dnf config-manager --set-enabled powertools
# Error:
# Problem: conflicting requests
# - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.i686 is filtered out by modular filtering
# - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64 is filtered out by modular filtering
# Solution: install Judy-devel directly from downloaded rpm file:
- 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
# Use eatmydata to speed up build
- yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm
- yum install -y ccache # From EPEL
- yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
- yum install -y yum-utils rpm-build openssl-devel libeatmydata ccache
# Install missing dependencies
- 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
- 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
- yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/multilib-rpm-config-1-19.el9.noarch.rpm
# Configure ccache
- source /etc/profile.d/ccache.sh
- export CCACHE_DIR="$(pwd)/.ccache"; ccache --zero-stats
# This repository does not have any .spec files, so install dependencies based on CentOS spec file
Expand Down
2 changes: 1 addition & 1 deletion client/mysqlbinlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
case QUERY_COMPRESSED_EVENT:
{
Query_log_event *qe= (Query_log_event*)ev;
if (!qe->is_trans_keyword())
if (!qe->is_trans_keyword(print_event_info->is_xa_trans()))
{
if (shall_skip_database(qe->db))
goto end;
Expand Down
91 changes: 74 additions & 17 deletions client/mysqldump.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ static void write_header(FILE *sql_file, const char *db_name)
}
else
{
fprintf(sql_file, "/*!999999\\- enable the sandbox mode */ \n");
fprintf(sql_file, "/*M!999999\\- enable the sandbox mode */ \n");
if (!opt_compact)
{
print_comment(sql_file, 0,
Expand Down Expand Up @@ -6145,8 +6145,11 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
} /* dump_selected_tables */


const char fmt_gtid_pos[]= "%sSET GLOBAL gtid_slave_pos='%s';\n";

static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos,
int have_mariadb_gtid, int use_gtid)
int have_mariadb_gtid, int use_gtid,
char *set_gtid_pos)
{
MYSQL_ROW row;
MYSQL_RES *UNINIT_VAR(master);
Expand Down Expand Up @@ -6207,15 +6210,21 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos,
/* gtid */
if (have_mariadb_gtid)
{
print_comment(md_result_file, 0,
"\n-- Preferably use GTID to start replication from GTID "
"position:\n\n");
if (use_gtid)
{
fprintf(md_result_file,
"%sCHANGE MASTER TO MASTER_USE_GTID=slave_pos;\n",
comment_prefix);
fprintf(md_result_file,
"%sSET GLOBAL gtid_slave_pos='%s';\n",
/*
When --gtid is specified defer print of SET gtid_slave_pos until
after its placeholder table is guaranteed to have been dumped.
*/
print_comment(md_result_file, 0,
"\n-- A corresponding to the above master-data "
"CHANGE-MASTER settings to the slave gtid state is printed "
"later in the file.\n");
}
sprintf(set_gtid_pos, fmt_gtid_pos,
(!use_gtid ? "-- " : comment_prefix), gtid_pos);
}

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

if (!consistent_binlog_pos)
Expand Down Expand Up @@ -6300,8 +6314,8 @@ static int add_slave_statements(void)
return(0);
}

static int do_show_slave_status(MYSQL *mysql_con, int use_gtid,
int have_mariadb_gtid)
static int do_show_slave_status(MYSQL *mysql_con, int have_mariadb_gtid,
int use_gtid, char* set_gtid_pos)
{
MYSQL_RES *UNINIT_VAR(slave);
MYSQL_ROW row;
Expand Down Expand Up @@ -6341,10 +6355,12 @@ static int do_show_slave_status(MYSQL *mysql_con, int use_gtid,
mysql_free_result(slave);
return 1;
}
/* defer print similarly to do_show_master_status */
print_comment(md_result_file, 0,
"-- GTID position to start replication:\n");
fprintf(md_result_file, "%sSET GLOBAL gtid_slave_pos='%s';\n",
gtid_comment_prefix, gtid_pos);
"\n-- A corresponding to the below dump-slave "
"CHANGE-MASTER settings to the slave gtid state is printed "
"later in the file.\n");
sprintf(set_gtid_pos, fmt_gtid_pos, gtid_comment_prefix, gtid_pos);
}
if (use_gtid)
print_comment(md_result_file, 0,
Expand Down Expand Up @@ -7065,6 +7081,34 @@ static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size)
die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG);
}

/**
Print earlier prepared SET @@global.gtid_slave_pos.
@param set_gtid_pos[in] formatted sql set statement
**/
static void do_print_set_gtid_slave_pos(const char *set_gtid_pos,
my_bool is_master_data)
{
DBUG_ASSERT(opt_master_data || opt_slave_data);
if (is_master_data)
{
print_comment(md_result_file, 0,
"\n-- The deferred gtid setting for slave corresponding to "
"the master-data CHANGE-MASTER follows\n");
print_comment(md_result_file, 0,
"\n-- Preferably use GTID to start replication from GTID "
"position:\n\n");
}
else
{
print_comment(md_result_file, 0,
"\n-- The deferred gtid setting for slave corresponding to "
"the dump-slave CHANGE-MASTER follows\n");
print_comment(md_result_file, 0,
"-- GTID position to start replication:\n");
}
fprintf(md_result_file, "%s", set_gtid_pos);
}

int main(int argc, char **argv)
{
Expand All @@ -7073,6 +7117,12 @@ int main(int argc, char **argv)
int exit_code;
int consistent_binlog_pos= 0;
int have_mariadb_gtid= 0;
/*
to hold SET @@global.gtid_slave_pos which is deferred to print
until the function epilogue.
*/
char master_set_gtid_pos[3 + sizeof(fmt_gtid_pos) + MAX_GTID_LENGTH]= {0};
char slave_set_gtid_pos[3 + sizeof(fmt_gtid_pos) + MAX_GTID_LENGTH]= {0};
MY_INIT(argv[0]);

sf_leaking_memory=1; /* don't report memory leaks on early exits */
Expand Down Expand Up @@ -7111,11 +7161,11 @@ int main(int argc, char **argv)
write_header(md_result_file, *argv);

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

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

/* Check if the server support multi source */
if (mysql_get_server_version(mysql) >= 100000)
Expand Down Expand Up @@ -7176,10 +7226,12 @@ int main(int argc, char **argv)
goto err;

if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos,
have_mariadb_gtid, opt_use_gtid))
have_mariadb_gtid,
opt_use_gtid, master_set_gtid_pos))
goto err;
if (opt_slave_data && do_show_slave_status(mysql, opt_use_gtid,
have_mariadb_gtid))
if (opt_slave_data && do_show_slave_status(mysql,
have_mariadb_gtid,
opt_use_gtid, slave_set_gtid_pos))
goto err;
if (opt_single_transaction && do_unlock_tables(mysql)) /* unlock but no commit! */
goto err;
Expand Down Expand Up @@ -7247,6 +7299,11 @@ int main(int argc, char **argv)
if (opt_system & OPT_SYSTEM_TIMEZONES)
dump_all_timezones();

if (opt_master_data && master_set_gtid_pos[0])
do_print_set_gtid_slave_pos(master_set_gtid_pos, TRUE);
if (opt_slave_data && slave_set_gtid_pos[0])
do_print_set_gtid_slave_pos(slave_set_gtid_pos, FALSE);

/* add 'START SLAVE' to end of dump */
if (opt_slave_apply && add_slave_statements())
goto err;
Expand Down
4 changes: 2 additions & 2 deletions cmake/pcre.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ MACRO(BUNDLE_PCRE2)
ExternalProject_Add(
pcre2
PREFIX "${dir}"
URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.zip"
URL_MD5 b58f050f2fdd6f2ca5774a2975377a85
URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.zip"
URL_MD5 dfab8313154b3377a6959c3b6377841e
INSTALL_COMMAND ""
CMAKE_ARGS
"-DCMAKE_WARN_DEPRECATED=FALSE"
Expand Down
4 changes: 4 additions & 0 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ CHECK_FUNCTION_EXISTS (vasprintf HAVE_VASPRINTF)
CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
CHECK_FUNCTION_EXISTS (nl_langinfo HAVE_NL_LANGINFO)

IF(NOT HAVE_PTHREAD_RWLOCK_RDLOCK AND NOT HAVE_RWLOCK_INIT AND NOT WIN32)
MESSAGE(FATAL_ERROR "No usable rwlock implementation found")
ENDIF()

IF(HAVE_SYS_EVENT_H)
CHECK_FUNCTION_EXISTS (kqueue HAVE_KQUEUE)
ENDIF()
Expand Down
2 changes: 1 addition & 1 deletion debian/additions/source_mariadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from __future__ import print_function, unicode_literals
import os, os.path

from apport.hookutils import *
from apport.hookutils import path_to_key, read_file, attach_conffiles, attach_mac_events, attach_file

def _add_my_conf_files(report, filename):
key = 'MySQLConf' + path_to_key(filename)
Expand Down
3 changes: 2 additions & 1 deletion debian/mariadb-server.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ EOF
set +e
find $mysql_statedir ! -uid 0 -print0 -or ! -gid 0 -print0 | xargs -0 -r sudo chown 0:0
find $mysql_datadir ! -uid "$(id -u mysql)" -print0 | xargs -0 -r chown mysql
chown -R mysql:adm $mysql_logdir
chown mysql:adm $mysql_logdir
find "$mysql_logdir" -print0 | xargs -0 -r chown mysql:adm
chmod 2750 $mysql_logdir
set -e

Expand Down
10 changes: 9 additions & 1 deletion extra/mariabackup/backup_mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1936,9 +1936,17 @@ char *make_argv(char *buf, size_t len, int argc, char **argv)
while (argc > 0 && left > 0)
{
arg = *argv;
if (strncmp(*argv, "--password", strlen("--password")) == 0) {
if (strncmp(*argv, STRING_WITH_LEN("--password=")) == 0) {
arg = "--password=...";
} else
if (strcmp(*argv, "--password") == 0) {
arg = "--password ...";
++argv; --argc;
} else
if (strncmp(*argv, STRING_WITH_LEN("-p")) == 0) {
arg = "-p...";
}

uint l= snprintf(buf + len - left, left,
"%s%c", arg, argc > 1 ? ' ' : 0);
++argv; --argc;
Expand Down
2 changes: 1 addition & 1 deletion extra/wolfssl/wolfssl
Submodule wolfssl updated 526 files
2 changes: 1 addition & 1 deletion libmariadb
16 changes: 16 additions & 0 deletions man/mysqlbinlog.1
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,22 @@ privilege\&.
.sp -1
.IP \(bu 2.3
.\}
.\" mysqlbinlog: flashback option
.\" flashback option: mysqlbinlog
\fB\-\-flashback\fR,
\fB\-B\fR
.sp
Support flashback mode\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysqlbinlog: force-if-open option
.\" force-if-open option: mysqlbinlog
\fB\-\-force\-if\-open\fR
Expand Down
16 changes: 0 additions & 16 deletions man/mysqldump.1
Original file line number Diff line number Diff line change
Expand Up @@ -892,22 +892,6 @@ instead\&.
.sp -1
.IP \(bu 2.3
.\}
.\" mysqldump: flashback option
.\" flashback option: mysqldump
\fB\-\-flashback\fR,
\fB\-B\fR
.sp
Support flashback mode\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysqldump: flush-logs option
.\" flush-logs option: mysqldump
\fB\-\-flush\-logs\fR,
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/include/analyze-format.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# - r_engine_stats depends on buffer pool state and whether old record versions
# were purged.

--replace_regex /("(r_[a-z_]*_time(_in_progress)?_ms|r_buffer_size)": )[^, \n]*/\1"REPLACED"/ /("r_engine_stats":) {[^}]*}/\1 REPLACED/
--replace_regex /("(r_[a-z_]*_time(_in_progress)?_ms|r_buffer_size|r_partial_match_buffer_size)": )[^, \n]*/\1"REPLACED"/ /("r_engine_stats":) {[^}]*}/\1 REPLACED/
2 changes: 2 additions & 0 deletions mysql-test/include/gis_generic.inc
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
--disable_view_protocol
explain extended SELECT g1.fid as first, g2.fid as second,
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
--enable_view_protocol

DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;

Expand Down
4 changes: 0 additions & 4 deletions mysql-test/include/not_valgrind_build.inc

This file was deleted.

Loading

0 comments on commit 0fe39d3

Please sign in to comment.