Skip to content

Commit f3fcf5f

Browse files
committed
Merge 10.5 to 10.6
2 parents 475f69b + 17980e3 commit f3fcf5f

File tree

85 files changed

+1512
-449
lines changed

Some content is hidden

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

85 files changed

+1512
-449
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
@@ -3450,7 +3450,7 @@ os_file_readdir_next_file(
34503450
if (err == ERROR_NO_MORE_FILES) {
34513451
status = 1;
34523452
} else {
3453-
msg("readdir_next_file in %s returned %lu", dir, err);
3453+
msg("FindNextFile in %s returned %lu", dirname, err);
34543454
status = -1;
34553455
}
34563456
}

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/show_concurrent_rotate.test

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ FLUSH LOGS;
88
FLUSH LOGS;
99
FLUSH LOGS;
1010

11-
SET DEBUG_SYNC= "at_after_lock_index WAIT_FOR con1_go";
11+
# This forced synchronization pattern ensures con1 will execute its retry
12+
# path. More specifically, con1 should see that the cache of log files it
13+
# creates during SHOW BINARY LOGS becomes invalidated after con2 completes
14+
# RESET MASTER.
15+
SET DEBUG_SYNC= "at_after_lock_index SIGNAL con1_ready WAIT_FOR con1_go";
1216
--send SHOW BINARY LOGS
1317

1418
connect(con2,localhost,root,,);
19+
SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
1520
RESET MASTER;
1621
FLUSH LOGS;
1722
SET DEBUG_SYNC= "now SIGNAL con1_go";
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# MDEV-26131 SEGV in ha_innobase::discard_or_import_tablespace
3+
#
4+
CREATE TABLE t1(f1 int,f2 text)ENGINE=InnoDB;
5+
INSERT INTO t1 VALUES(1, "InnoDB");
6+
CREATE TABLE t2 LIKE t1;
7+
ALTER TABLE t2 ADD KEY idx (f2(13));
8+
ALTER TABLE t2 DISCARD TABLESPACE;
9+
FLUSH TABLES t1 FOR EXPORT;
10+
UNLOCK TABLES;
11+
ALTER TABLE t2 IMPORT TABLESPACE;
12+
ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t2 when .cfg file is missing.
13+
ALTER TABLE t2 DROP KEY idx;
14+
ALTER TABLE t2 IMPORT TABLESPACE;
15+
Warnings:
16+
Warning 1814 Tablespace has been discarded for table `t2`
17+
Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
18+
SELECT * FROM t2;
19+
f1 f2
20+
1 InnoDB
21+
DROP TABLE t1, t2;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[page_compressed]
2+
innodb-compression-default=1
3+
[encryption]
4+
innodb-encrypt-tables=1
5+
[page_compressed_encryption]
6+
innodb-compression-default=1
7+
innodb-encrypt-tables=1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--innodb-checksum-algorithm=crc32
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--source include/have_innodb.inc
2+
--source include/have_example_key_management_plugin.inc
3+
--source include/innodb_checksum_algorithm.inc
4+
--echo #
5+
--echo # MDEV-26131 SEGV in ha_innobase::discard_or_import_tablespace
6+
--echo #
7+
let $MYSQLD_DATADIR = `SELECT @@datadir`;
8+
CREATE TABLE t1(f1 int,f2 text)ENGINE=InnoDB;
9+
INSERT INTO t1 VALUES(1, "InnoDB");
10+
CREATE TABLE t2 LIKE t1;
11+
ALTER TABLE t2 ADD KEY idx (f2(13));
12+
ALTER TABLE t2 DISCARD TABLESPACE;
13+
FLUSH TABLES t1 FOR EXPORT;
14+
--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
15+
UNLOCK TABLES;
16+
--error ER_INTERNAL_ERROR
17+
ALTER TABLE t2 IMPORT TABLESPACE;
18+
19+
ALTER TABLE t2 DROP KEY idx;
20+
--replace_regex /opening '.*\/test\//opening '.\/test\//
21+
ALTER TABLE t2 IMPORT TABLESPACE;
22+
SELECT * FROM t2;
23+
DROP TABLE t1, t2;

mysql-test/suite/federated/federated_partition.result

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,42 @@ connection slave;
4747
drop table federated.t1_1;
4848
drop table federated.t1_2;
4949
End of 5.1 tests
50+
#
51+
# MDEV-18734 ASAN heap-use-after-free upon sorting by blob column from partitioned table
52+
#
53+
connection slave;
54+
use federated;
55+
create table t1_1 (x int, b text, key(x));
56+
create table t1_2 (x int, b text, key(x));
57+
connection master;
58+
create table t1 (x int, b text, key(x)) engine=federated
59+
partition by range columns (x) (
60+
partition p1 values less than (40) connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1',
61+
partition pn values less than (maxvalue) connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2'
62+
);
63+
insert t1 values (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8);
64+
insert t1 select x + 8, x + 8 from t1;
65+
insert t1 select x + 16, x + 16 from t1;
66+
insert t1 select x + 49, repeat(x + 49, 100) from t1;
67+
flush tables;
68+
# This produces wrong result before MDEV-17573
69+
select x, left(b, 10) from t1 where x > 30 and x < 60 order by b;
70+
x left(b, 10)
71+
31 31
72+
32 32
73+
50 5050505050
74+
51 5151515151
75+
52 5252525252
76+
53 5353535353
77+
54 5454545454
78+
55 5555555555
79+
56 5656565656
80+
57 5757575757
81+
58 5858585858
82+
59 5959595959
83+
drop table t1;
84+
connection slave;
85+
drop table t1_1, t1_2;
5086
connection master;
5187
DROP TABLE IF EXISTS federated.t1;
5288
DROP DATABASE IF EXISTS federated;

mysql-test/suite/federated/federated_partition.test

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,29 @@ drop table federated.t1_2;
5151

5252
--echo End of 5.1 tests
5353

54+
--echo #
55+
--echo # MDEV-18734 ASAN heap-use-after-free upon sorting by blob column from partitioned table
56+
--echo #
57+
connection slave;
58+
use federated;
59+
create table t1_1 (x int, b text, key(x));
60+
create table t1_2 (x int, b text, key(x));
61+
connection master;
62+
--replace_result $SLAVE_MYPORT SLAVE_PORT
63+
eval create table t1 (x int, b text, key(x)) engine=federated
64+
partition by range columns (x) (
65+
partition p1 values less than (40) connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_1',
66+
partition pn values less than (maxvalue) connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_2'
67+
);
68+
insert t1 values (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8);
69+
insert t1 select x + 8, x + 8 from t1;
70+
insert t1 select x + 16, x + 16 from t1;
71+
insert t1 select x + 49, repeat(x + 49, 100) from t1;
72+
flush tables;
73+
--echo # This produces wrong result before MDEV-17573
74+
select x, left(b, 10) from t1 where x > 30 and x < 60 order by b;
75+
drop table t1;
76+
connection slave;
77+
drop table t1_1, t1_2;
78+
5479
source include/federated_cleanup.inc;

mysql-test/suite/galera/r/galera_as_slave_replay.result

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,21 @@ SET GLOBAL wsrep_provider_options = 'dbug=';
8484
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
8585
SET DEBUG_SYNC = "RESET";
8686
connection node_2a;
87-
set session wsrep_sync_wait=15;
88-
SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e';
89-
COUNT(*) = 1
90-
1
9187
set session wsrep_sync_wait=0;
88+
SELECT * from test.t1;
89+
f1 f2
90+
1 a
91+
2 b
92+
3 e
93+
4 d
94+
connection node_1;
95+
SELECT * from test.t1;
96+
f1 f2
97+
1 a
98+
2 b
99+
3 e
100+
4 d
101+
connection node_2a;
92102
STOP SLAVE;
93103
RESET SLAVE;
94104
DROP TABLE t1;

mysql-test/suite/galera/t/galera_as_slave_replay.test

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,17 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
185185
SET DEBUG_SYNC = "RESET";
186186

187187
--connection node_2a
188-
189-
set session wsrep_sync_wait=15;
190-
SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e';
191188
set session wsrep_sync_wait=0;
189+
--let $wait_condition = SELECT COUNT(*) = 1 FROM test.t1 where f2 = 'e'
190+
--source include/wait_condition.inc
191+
SELECT * from test.t1;
192192

193+
--connection node_1
194+
--let $wait_condition = SELECT COUNT(*) = 1 FROM test.t1 where f2 = 'e'
195+
--source include/wait_condition.inc
196+
SELECT * from test.t1;
197+
198+
--connection node_2a
193199
STOP SLAVE;
194200
RESET SLAVE;
195201

0 commit comments

Comments
 (0)