Skip to content

Commit 3bf42eb

Browse files
committed
Merge 10.6 into 10.7
2 parents c949772 + d12b5e2 commit 3bf42eb

File tree

98 files changed

+1870
-561
lines changed

Some content is hidden

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

98 files changed

+1870
-561
lines changed

cmake/plugin.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ INCLUDE(CMakeParseArguments)
3030
# [CONFIG cnf_file_name]
3131
# [VERSION version_string]
3232
# [LINK_LIBRARIES lib1...libN]
33-
# [DEPENDENCIES target1...targetN]
33+
# [DEPENDS target1...targetN]
3434

3535
MACRO(MYSQL_ADD_PLUGIN)
3636
CMAKE_PARSE_ARGUMENTS(ARG
3737
"STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;NOT_EMBEDDED;RECOMPILE_FOR_EMBEDDED;CLIENT"
3838
"MODULE_OUTPUT_NAME;STATIC_OUTPUT_NAME;COMPONENT;CONFIG;VERSION"
39-
"LINK_LIBRARIES;DEPENDENCIES"
39+
"LINK_LIBRARIES;DEPENDS"
4040
${ARGN}
4141
)
4242
IF(NOT WITHOUT_SERVER OR ARG_CLIENT)
@@ -115,8 +115,8 @@ MACRO(MYSQL_ADD_PLUGIN)
115115
ENDIF()
116116
UNSET(${with_var} CACHE)
117117

118-
IF(NOT ARG_DEPENDENCIES)
119-
SET(ARG_DEPENDENCIES)
118+
IF(NOT ARG_DEPENDS)
119+
SET(ARG_DEPENDS)
120120
ENDIF()
121121

122122
IF(ARG_VERSION)
@@ -146,7 +146,7 @@ MACRO(MYSQL_ADD_PLUGIN)
146146

147147
ADD_LIBRARY(${target} STATIC ${SOURCES})
148148
DTRACE_INSTRUMENT(${target})
149-
ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES})
149+
ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDS})
150150
RESTRICT_SYMBOL_EXPORTS(${target})
151151
IF(WITH_EMBEDDED_SERVER AND (NOT ARG_NOT_EMBEDDED))
152152
# Embedded library should contain PIC code and be linkable
@@ -160,7 +160,7 @@ MACRO(MYSQL_ADD_PLUGIN)
160160
SET_TARGET_PROPERTIES(${target}_embedded
161161
PROPERTIES COMPILE_DEFINITIONS "EMBEDDED_LIBRARY${version_string}")
162162
ENDIF()
163-
ADD_DEPENDENCIES(${target}_embedded GenError)
163+
ADD_DEPENDENCIES(${target}_embedded GenError ${ARG_DEPENDS})
164164
ENDIF()
165165
ENDIF()
166166

@@ -235,7 +235,7 @@ MACRO(MYSQL_ADD_PLUGIN)
235235
TARGET_LINK_LIBRARIES (${target} "-Wl,--no-undefined")
236236
ENDIF()
237237

238-
ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES})
238+
ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDS})
239239

240240
SET_TARGET_PROPERTIES(${target} PROPERTIES
241241
OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}")

debian/autobake-deb.sh

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,17 @@ set -e
1717
# building the deb packages here.
1818
export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
1919

20-
# Take the files and part of control from MCS directory
21-
if [[ -d storage/columnstore/columnstore/debian ]]
22-
then
23-
cp -v storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.* debian/
24-
echo >> debian/control
25-
cat storage/columnstore/columnstore/debian/control >> debian/control
26-
27-
# ColumnStore is explicitly disabled in the native build, so allow it now
28-
# when build it when triggered by autobake-deb.sh
29-
sed '/-DPLUGIN_COLUMNSTORE=NO/d' -i debian/rules
30-
fi
31-
3220
# General CI optimizations to keep build output smaller
3321
if [[ $TRAVIS ]] || [[ $GITLAB_CI ]]
3422
then
3523
# On both Travis and Gitlab the output log must stay under 4MB so make the
3624
# build less verbose
37-
sed '/Add support for verbose builds/,/^$/d' -i debian/rules
38-
3925
# MCOL-4149: ColumnStore builds are so slow and big that they must be skipped on
4026
# both Travis-CI and Gitlab-CI
41-
sed 's|$(CMAKEFLAGS)|$(CMAKEFLAGS) -DPLUGIN_COLUMNSTORE=NO|' -i debian/rules
42-
sed "/Package: mariadb-plugin-columnstore/,/^$/d" -i debian/control
27+
sed -e '/Add support for verbose builds/,/^$/d' \
28+
-e '/ColumnStore is part of the build/,/^$/d' \
29+
-e 's|$(CMAKEFLAGS)|$(CMAKEFLAGS) -DPLUGIN_COLUMNSTORE=NO|' \
30+
-i debian/rules
4331
fi
4432

4533
# Don't build or try to put files in a package for selected plugins and components on Travis-CI

debian/rules

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ else
3838
NUMJOBS = 1
3939
endif
4040

41-
# RocksDB cannot build on 32-bit platforms
42-
ifeq (32,$(DEB_HOST_ARCH_BITS))
43-
CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO
44-
endif
45-
4641
# Cross building requires stack direction instruction
4742
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
4843
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),alpha amd64 arm arm64 i386 ia64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64))
@@ -59,14 +54,6 @@ ifneq (,$(filter $(DEB_HOST_ARCH_CPU),amd64 arm64 ppc64el))
5954
CMAKEFLAGS += -DWITH_PMEM=yes
6055
endif
6156

62-
# Add extra flag to avoid WolfSSL code crashing the entire mariadbd on s390x. This
63-
# can be removed once upstream has made the code s390x compatible, see
64-
# https://jira.mariadb.org/browse/MDEV-21705 and
65-
# https://github.com/wolfSSL/wolfssl/issues/2828
66-
ifeq ($(DEB_HOST_ARCH),s390x)
67-
CFLAGS += -DWC_NO_CACHE_RESISTANT
68-
endif
69-
7057
# Add support for verbose builds
7158
MAKEFLAGS += VERBOSE=1
7259

@@ -85,15 +72,25 @@ ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
8572
dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure --builddirectory=builddir-native
8673
dh_auto_build --builddirectory=builddir-native -- import_executables
8774
endif
75+
76+
# ColumnStore is part of the build
77+
ifneq (32,$(DEB_HOST_ARCH_BITS))
78+
# Take the files and part of control from MCS directory
79+
cp -v storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.* debian/
80+
# Don't include twice
81+
grep -q '^Package: mariadb-plugin-columnstore$$' debian/control || \
82+
( echo && cat storage/columnstore/columnstore/debian/control ) >> debian/control
83+
endif
84+
8885
echo "server:Version=$(DEB_VERSION)" >> debian/substvars
8986

90-
# Don't build ColumnStore as part of the native build, only build it when
91-
# triggered by autobake-deb.sh. Saves build time and disk space.
87+
# RocksDB and Column Store cannot build on 32-bit platforms
9288
PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \
9389
NO_UPDATE_BUILD_VERSION=1 \
9490
dh_auto_configure --builddirectory=$(BUILDDIR) -- \
9591
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
9692
$(CMAKEFLAGS) \
93+
$(if $(findstring $(DEB_HOST_ARCH_BITS),32),-DPLUGIN_ROCKSDB=NO -DPLUGIN_COLUMNSTORE=NO) \
9794
$(if $(filter $(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)),,-DIMPORT_EXECUTABLES=$(CURDIR)/builddir-native/import_executables.cmake) \
9895
-DCOMPILATION_COMMENT="mariadb.org binary distribution" \
9996
-DMYSQL_SERVER_SUFFIX="-$(DEB_VERSION_REVISION)" \
@@ -102,7 +99,6 @@ endif
10299
-DBUILD_CONFIG=mysql_release \
103100
-DCONC_DEFAULT_CHARSET=utf8mb4 \
104101
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
105-
-DPLUGIN_COLUMNSTORE=NO \
106102
-DIGNORE_AIO_CHECK=YES \
107103
-DWITH_URING=yes \
108104
-DDEB=$(DEB_VENDOR)

extra/mariabackup/xtrabackup.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3451,7 +3451,7 @@ os_file_readdir_next_file(
34513451
if (err == ERROR_NO_MORE_FILES) {
34523452
status = 1;
34533453
} else {
3454-
msg("readdir_next_file in %s returned %lu", dir, err);
3454+
msg("FindNextFile in %s returned %lu", dirname, err);
34553455
status = -1;
34563456
}
34573457
}

mysql-test/suite/binlog/r/binlog_truncate_active_log.result

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
call mtr.add_suppression("Can.t init tc log");
22
call mtr.add_suppression("Aborting");
33
RESET MASTER;
4+
SET @@global.sync_binlog=1;
45
CREATE TABLE t (f INT) ENGINE=INNODB;
56
CREATE TABLE t2 (f INT) ENGINE=INNODB;
67
CREATE TABLE tm (f INT) ENGINE=Aria;
@@ -28,7 +29,7 @@ connection default;
2829
disconnect master1;
2930
disconnect master2;
3031
disconnect master3;
31-
# restart: --rpl-semi-sync-slave-enabled=1
32+
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
3233
FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-6/ in mysqld.1.err
3334
Pre-crash binlog file content:
3435
include/show_binlog_events.inc
@@ -77,7 +78,7 @@ connection default;
7778
disconnect master1;
7879
disconnect master2;
7980
disconnect master3;
80-
# restart: --rpl-semi-sync-slave-enabled=1
81+
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
8182
FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-10/ in mysqld.1.err
8283
Pre-crash binlog file content:
8384
include/show_binlog_events.inc
@@ -133,7 +134,7 @@ connection default;
133134
disconnect master1;
134135
disconnect master2;
135136
disconnect master3;
136-
# restart: --rpl-semi-sync-slave-enabled=1
137+
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
137138
FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-14/ in mysqld.1.err
138139
Pre-crash binlog file content:
139140
include/show_binlog_events.inc
@@ -195,7 +196,7 @@ connection default;
195196
disconnect master1;
196197
disconnect master2;
197198
disconnect master3;
198-
# restart: --rpl-semi-sync-slave-enabled=1
199+
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
199200
FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-20/ in mysqld.1.err
200201
Pre-crash binlog file content:
201202
include/show_binlog_events.inc
@@ -234,4 +235,5 @@ DELETE FROM t;
234235
DROP PROCEDURE sp_xa;
235236
# Cleanup
236237
DROP TABLE t,t2,tm;
238+
SET @@global.sync_binlog= default;
237239
# End of the tests

mysql-test/suite/binlog/r/binlog_truncate_multi_engine.result

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
call mtr.add_suppression("Can.t init tc log");
22
call mtr.add_suppression("Aborting");
3+
SET @@global.sync_binlog= 1;
34
CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;
45
CREATE TABLE t2 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=rocksdb;
56
#
@@ -30,9 +31,9 @@ Log_name File_size
3031
master-bin.000001 #
3132
master-bin.000002 #
3233
master-bin.000003 #
33-
# restart the server with --rpl-semi-sync-slave-enabled=1
34+
# restart the server with --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
3435
# the server is restarted
35-
# restart: --rpl-semi-sync-slave-enabled=1
36+
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
3637
connection default;
3738
#
3839
# *** Summary: 1 row should be present in both tables; binlog is truncated; number of binlogs at reconnect - 3:
@@ -97,7 +98,7 @@ INSERT INTO t2 VALUES (2, REPEAT("x", 4100));
9798
INSERT INTO t1 VALUES (2, REPEAT("x", 4100));
9899
COMMIT;
99100
connection default;
100-
# restart: --rpl-semi-sync-slave-enabled=1
101+
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
101102
connection default;
102103
#
103104
# *** Summary: 2 rows should be present in both tables; no binlog truncation; one extra binlog file compare with A; number of binlogs at reconnect - 4:
@@ -154,9 +155,9 @@ Log_name File_size
154155
master-bin.000001 #
155156
master-bin.000002 #
156157
master-bin.000003 #
157-
# restart the server with --rpl-semi-sync-slave-enabled=1
158+
# restart the server with --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
158159
# the server is restarted
159-
# restart: --rpl-semi-sync-slave-enabled=1
160+
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
160161
connection default;
161162
#
162163
# *** Summary: 2 rows should be present in both tables; no binlog truncation; the same # of binlog files as in B; number of binlogs at reconnect - 4:
@@ -186,4 +187,5 @@ DELETE FROM t2;
186187
disconnect con1;
187188
#
188189
DROP TABLE t1, t2;
190+
SET @@global.sync_binlog= default;
189191
# End of the tests

mysql-test/suite/binlog/r/binlog_truncate_multi_log.result

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
call mtr.add_suppression("Can.t init tc log");
22
call mtr.add_suppression("Aborting");
33
SET @@global.max_binlog_size= 4096;
4+
SET @@global.sync_binlog= 1;
45
RESET MASTER;
56
FLUSH LOGS;
67
CREATE TABLE ti (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;
@@ -13,11 +14,11 @@ master-bin.000001 #
1314
master-bin.000002 #
1415
INSERT INTO ti VALUES(1,"I am gonna survive");
1516
INSERT INTO tm VALUES(1,"me too!");
16-
SET DEBUG_SYNC= "commit_after_release_LOCK_after_binlog_sync SIGNAL master1_ready WAIT_FOR con1_go";
17+
SET DEBUG_SYNC= "commit_after_release_LOCK_after_binlog_sync SIGNAL master1_ready WAIT_FOR master1_go_never_arrives";
1718
INSERT INTO ti VALUES (2, REPEAT("x", 4100));
1819
connect master2,localhost,root,,;
1920
SET DEBUG_SYNC= "now WAIT_FOR master1_ready";
20-
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL master2_ready WAIT_FOR master2_go";
21+
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL master2_ready WAIT_FOR master2_go_never_arrives";
2122
INSERT INTO ti VALUES (3, "not gonna survive");
2223
connection default;
2324
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
@@ -35,7 +36,7 @@ connection default;
3536
# Kill the server
3637
disconnect master1;
3738
disconnect master2;
38-
# restart: --rpl-semi-sync-slave-enabled=1
39+
# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
3940
FOUND 1 /truncated binlog file:.*master.*000002/ in mysqld.1.err
4041
"One record should be present in table"
4142
SELECT * FROM ti;
@@ -50,4 +51,5 @@ SELECT @@global.gtid_binlog_pos;
5051
0-1-4
5152
# Cleanup
5253
DROP TABLE ti;
54+
SET @@global.sync_binlog= default;
5355
# End of the tests

mysql-test/suite/binlog/r/binlog_truncate_multi_log_unsafe.result

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@ call mtr.add_suppression("mysqld: Table.*tm.*is marked as crashed");
1212
call mtr.add_suppression("Checking table.*tm");
1313
RESET MASTER;
1414
FLUSH LOGS;
15+
SET @@global.sync_binlog=1;
1516
CREATE TABLE ti (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;
1617
CREATE TABLE tm (f INT) ENGINE=MYISAM;
1718
INSERT INTO tm VALUES(1);
1819
connect master1,localhost,root,,;
1920
connect master2,localhost,root,,;
2021
connect master3,localhost,root,,;
2122
connection master1;
22-
SET DEBUG_SYNC= "commit_after_release_LOCK_after_binlog_sync SIGNAL master1_ready WAIT_FOR master1_go";
23+
SET DEBUG_SYNC= "commit_after_release_LOCK_after_binlog_sync SIGNAL master1_ready WAIT_FOR master1_go_never_arrives";
2324
INSERT INTO ti VALUES (5 - 1, REPEAT("x", 4100));
2425
connection master2;
25-
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL master2_ready WAIT_FOR master2_go";
26+
SET DEBUG_SYNC= "now WAIT_FOR master1_ready";
27+
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL master2_ready WAIT_FOR master2_go_never_arrives";
2628
INSERT INTO ti VALUES (5, REPEAT("x", 1));
2729
connection master3;
2830
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";

mysql-test/suite/binlog/r/show_concurrent_rotate.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ connect con1,localhost,root,,;
22
FLUSH LOGS;
33
FLUSH LOGS;
44
FLUSH LOGS;
5-
SET DEBUG_SYNC= "at_after_lock_index WAIT_FOR con1_go";
5+
SET DEBUG_SYNC= "at_after_lock_index SIGNAL con1_ready WAIT_FOR con1_go";
66
SHOW BINARY LOGS;
77
connect con2,localhost,root,,;
8+
SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
89
RESET MASTER;
910
FLUSH LOGS;
1011
SET DEBUG_SYNC= "now SIGNAL con1_go";

mysql-test/suite/binlog/t/binlog_truncate_active_log.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ SELECT @@global.gtid_binlog_pos as 'Before the crash';
3131
#
3232
# Server restart
3333
#
34-
--let $restart_parameters= --rpl-semi-sync-slave-enabled=1
34+
--let $restart_parameters= --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
3535
--source include/start_mysqld.inc
3636

3737
# Check error log for a successful truncate message.
3838
--let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.1.err
3939

4040
--let SEARCH_FILE=$log_error_
4141
--let SEARCH_PATTERN=Successfully truncated.*to remove transactions starting from GTID $truncate_gtid_pos
42-
42+
4343
--source include/search_pattern_in_file.inc
4444

4545
--echo Pre-crash binlog file content:

0 commit comments

Comments
 (0)