Skip to content

Commit 065f995

Browse files
committed
Merge branch 10.5 into 10.6
2 parents ee80c19 + 06e3bc4 commit 065f995

28 files changed

+404
-151
lines changed

debian/autobake-deb.sh

Lines changed: 37 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,15 @@
1111
# Exit immediately on any error
1212
set -e
1313

14-
CODENAME="$(lsb_release -sc)"
15-
case "${CODENAME}" in
16-
stretch)
17-
# MDEV-28022 libzstd-dev-1.1.3 minimum version
18-
sed -i -e '/libzstd-dev/d' debian/control
19-
;;
20-
esac
21-
22-
# This file is invoked from Buildbot and Travis-CI to build deb packages.
23-
# As both of those CI systems have many parallel jobs that include different
24-
# parts of the test suite, we don't need to run the mysql-test-run at all when
25-
# building the deb packages here.
14+
# On Buildbot, don't run the mysql-test-run test suite as part of build.
15+
# It takes a lot of time, and we will do a better test anyway in
16+
# Buildbot, running the test suite from installed .debs on a clean VM.
2617
export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
2718

2819
# General CI optimizations to keep build output smaller
29-
if [[ $TRAVIS ]] || [[ $GITLAB_CI ]]
20+
if [[ $GITLAB_CI ]]
3021
then
31-
# On both Travis and Gitlab the output log must stay under 4MB so make the
22+
# On Gitlab the output log must stay under 4MB so make the
3223
# build less verbose
3324
sed '/Add support for verbose builds/,/^$/d' -i debian/rules
3425
elif [ -d storage/columnstore/columnstore/debian ]
@@ -43,41 +34,39 @@ then
4334
cat storage/columnstore/columnstore/debian/control >> debian/control
4435
fi
4536

46-
# Don't build or try to put files in a package for selected plugins and components on Travis-CI
47-
# in order to keep build small (in both duration and disk space)
48-
if [[ $TRAVIS ]]
49-
then
50-
# Test suite package not relevant on Travis-CI
51-
sed 's|DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test|DINSTALL_MYSQLTESTDIR=false|' -i debian/rules
52-
sed '/Package: mariadb-test-data/,/^$/d' -i debian/control
53-
sed '/Package: mariadb-test$/,/^$/d' -i debian/control
54-
55-
# Extra plugins such as Mroonga, Spider, OQgraph, Sphinx and the embedded build can safely be skipped
56-
sed 's|-DDEB|-DPLUGIN_MROONGA=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_SPIDER=NO -DPLUGIN_OQGRAPH=NO -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_SPHINX=NO -DWITH_EMBEDDED_SERVER=OFF -DDEB|' -i debian/rules
57-
sed "/Package: mariadb-plugin-mroonga/,/^$/d" -i debian/control
58-
sed "/Package: mariadb-plugin-rocksdb/,/^$/d" -i debian/control
59-
sed "/Package: mariadb-plugin-spider/,/^$/d" -i debian/control
60-
sed "/Package: mariadb-plugin-oqgraph/,/^$/d" -i debian/control
61-
sed "/ha_sphinx.so/d" -i debian/mariadb-server-10.6.install
62-
sed "/Package: libmariadbd19/,/^$/d" -i debian/control
63-
sed "/Package: libmariadbd-dev/,/^$/d" -i debian/control
64-
fi
37+
# Look up distro-version specific stuff
38+
#
39+
# Always keep the actual packaging as up-to-date as possible following the latest
40+
# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh
41+
# tests for backwards compatibility and strip away parts on older builders.
6542

66-
# If rocksdb-tools is not available (before Debian Buster and Ubuntu Disco)
67-
# remove the dependency from the RocksDB plugin so it can install properly
68-
# and instead ship the one built from MariaDB sources
69-
if ! apt-cache madison rocksdb-tools | grep 'rocksdb-tools' >/dev/null 2>&1
70-
then
43+
remove_rocksdb_tools()
44+
{
7145
sed '/rocksdb-tools/d' -i debian/control
7246
sed '/sst_dump/d' -i debian/not-installed
73-
echo "usr/bin/sst_dump" >> debian/mariadb-plugin-rocksdb.install
74-
fi
47+
if ! grep -q sst_dump debian/mariadb-plugin-rocksdb.install
48+
then
49+
echo "usr/bin/sst_dump" >> debian/mariadb-plugin-rocksdb.install
50+
fi
51+
}
52+
53+
54+
CODENAME="$(lsb_release -sc)"
55+
case "${CODENAME}" in
56+
stretch)
57+
# MDEV-28022 libzstd-dev-1.1.3 minimum version
58+
sed -i -e '/libzstd-dev/d' \
59+
-e 's/libcurl4/libcurl3/g' -i debian/control
60+
remove_rocksdb_tools
61+
;;
62+
bionic)
63+
remove_rocksdb_tools
64+
;;
65+
esac
7566

76-
# If libcurl4 is not available (before Debian Buster and Ubuntu Bionic)
77-
# use older libcurl3 instead
78-
if ! apt-cache madison libcurl4 | grep 'libcurl4' >/dev/null 2>&1
67+
if [[ ! "$(dpkg-architecture -q DEB_BUILD_ARCH)" =~ amd64|arm64|ppc64el|s390x ]]
7968
then
80-
sed 's/libcurl4/libcurl3/g' -i debian/control
69+
remove_rocksdb_tools
8170
fi
8271

8372
# From Debian Bullseye/Ubuntu Groovy, liburing replaces libaio
@@ -111,9 +100,9 @@ dch -b -D "${CODENAME}" -v "${VERSION}" "Automatic build with ${LOGSTRING}." --c
111100

112101
echo "Creating package version ${VERSION} ... "
113102

114-
# On Travis CI and Gitlab-CI, use -b to build binary only packages as there is
103+
# On Gitlab-CI, use -b to build binary only packages as there is
115104
# no need to waste time on generating the source package.
116-
if [[ $TRAVIS ]]
105+
if [[ $GITLAB_CI ]]
117106
then
118107
BUILDPACKAGE_FLAGS="-b"
119108
fi
@@ -133,8 +122,8 @@ fakeroot $BUILDPACKAGE_PREPEND dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS
133122
# If the step above fails due to missing dependencies, you can manually run
134123
# sudo mk-build-deps debian/control -r -i
135124

136-
# Don't log package contents on Travis-CI or Gitlab-CI to save time and log size
137-
if [[ ! $TRAVIS ]] && [[ ! $GITLAB_CI ]]
125+
# Don't log package contents on Gitlab-CI to save time and log size
126+
if [[ ! $GITLAB_CI ]]
138127
then
139128
echo "List package contents ..."
140129
cd ..

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
55
Build-Depends: bison,
66
cmake,
77
cracklib-runtime <!nocheck>,
8-
debhelper (>= 9.20160709~),
8+
debhelper (>= 10),
99
dh-exec,
1010
flex [amd64],
1111
gdb <!nocheck>,

mysql-test/main/ctype_utf32.result

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2890,5 +2890,28 @@ HEX(c1)
28902890
0000006100000063
28912891
DROP TABLE t1;
28922892
#
2893+
# MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT
2894+
#
2895+
CREATE TABLE t1 (a CHAR(1));
2896+
SET COLLATION_CONNECTION=utf32_general_ci, CHARACTER_SET_CLIENT=binary;
2897+
ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32;
2898+
ERROR HY000: Column 'a' has duplicated value 'a' in ENUM
2899+
ALTER TABLE t1 CHANGE a a ENUM('aaa') CHARACTER SET utf32;
2900+
ERROR HY000: Invalid utf32 character string: '\x00aaa'
2901+
ALTER TABLE t1 CHANGE a a ENUM('aa') CHARACTER SET utf32;
2902+
SHOW CREATE TABLE t1;
2903+
Table Create Table
2904+
t1 CREATE TABLE `t1` (
2905+
`a` enum('慡') CHARACTER SET utf32 DEFAULT NULL
2906+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
2907+
ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32;
2908+
SHOW CREATE TABLE t1;
2909+
Table Create Table
2910+
t1 CREATE TABLE `t1` (
2911+
`a` enum('a','b') CHARACTER SET utf32 DEFAULT NULL
2912+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
2913+
DROP TABLE t1;
2914+
SET NAMES utf8;
2915+
#
28932916
# End of 10.2 tests
28942917
#

mysql-test/main/ctype_utf32.test

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,25 @@ INSERT INTO t1 (c1) VALUES (1),(2),(3);
10481048
SELECT HEX(c1) FROM t1 ORDER BY c1;
10491049
DROP TABLE t1;
10501050

1051+
1052+
--echo #
1053+
--echo # MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT
1054+
--echo #
1055+
1056+
CREATE TABLE t1 (a CHAR(1));
1057+
SET COLLATION_CONNECTION=utf32_general_ci, CHARACTER_SET_CLIENT=binary;
1058+
--error ER_DUPLICATED_VALUE_IN_TYPE
1059+
ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32;
1060+
--error ER_INVALID_CHARACTER_STRING
1061+
ALTER TABLE t1 CHANGE a a ENUM('aaa') CHARACTER SET utf32;
1062+
ALTER TABLE t1 CHANGE a a ENUM('aa') CHARACTER SET utf32;
1063+
SHOW CREATE TABLE t1;
1064+
ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32;
1065+
SHOW CREATE TABLE t1;
1066+
DROP TABLE t1;
1067+
SET NAMES utf8;
1068+
1069+
10511070
--echo #
10521071
--echo # End of 10.2 tests
10531072
--echo #

mysql-test/main/ctype_utf32_uca.result

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7941,6 +7941,21 @@ EXECUTE s;
79417941
DEALLOCATE PREPARE s;
79427942
SET NAMES utf8;
79437943
#
7944+
# MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT
7945+
#
7946+
CREATE TABLE t1 (a CHAR(1));
7947+
SET COLLATION_CONNECTION=utf32_myanmar_ci, CHARACTER_SET_CLIENT=binary;
7948+
ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32;
7949+
ERROR HY000: Column 'a' has duplicated value 'a' in ENUM
7950+
ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32;
7951+
SHOW CREATE TABLE t1;
7952+
Table Create Table
7953+
t1 CREATE TABLE `t1` (
7954+
`a` enum('a','b') CHARACTER SET utf32 DEFAULT NULL
7955+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
7956+
DROP TABLE t1;
7957+
SET NAMES utf8;
7958+
#
79447959
# End of 10.2 tests
79457960
#
79467961
#

mysql-test/main/ctype_utf32_uca.test

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,19 @@ EXECUTE s;
290290
DEALLOCATE PREPARE s;
291291
SET NAMES utf8;
292292

293+
--echo #
294+
--echo # MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT
295+
--echo #
296+
297+
CREATE TABLE t1 (a CHAR(1));
298+
SET COLLATION_CONNECTION=utf32_myanmar_ci, CHARACTER_SET_CLIENT=binary;
299+
--error ER_DUPLICATED_VALUE_IN_TYPE
300+
ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32;
301+
ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32;
302+
SHOW CREATE TABLE t1;
303+
DROP TABLE t1;
304+
SET NAMES utf8;
305+
293306

294307
--echo #
295308
--echo # End of 10.2 tests

mysql-test/main/drop_bad_db_type.result

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,50 @@ SET debug_dbug='+d,unstable_db_type';
33
install soname 'ha_archive';
44
create table t1 (a int) engine=archive;
55
insert t1 values (1),(2),(3);
6+
create table t2 (a int) engine=archive partition by hash(a) partitions 3;
67
flush tables;
78
uninstall soname 'ha_archive';
8-
select table_schema, table_name from information_schema.tables where table_name like 't1';
9-
table_schema test
10-
table_name t1
11-
select table_schema, table_name, engine, version from information_schema.tables where table_name like 't1';
12-
table_schema test
13-
table_name t1
14-
engine ARCHIVE
15-
version NULL
9+
select table_schema, table_name from information_schema.tables where table_name like 't_' order by 1,2;
10+
table_schema table_name
11+
test t1
12+
test t2
13+
select table_schema, table_name, engine, version from information_schema.tables where table_name like 't_' order by 1,2;
14+
table_schema table_name engine version
15+
test t1 ARCHIVE NULL
16+
test t2 NULL NULL
1617
Warnings:
17-
Level Warning
18-
Code 1286
19-
Message Unknown storage engine 'ARCHIVE'
20-
select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't1';
21-
table_schema test
22-
table_name t1
23-
engine ARCHIVE
24-
row_format NULL
18+
Warning 1033 Incorrect information in file: './test/t2.frm'
19+
Warning 1286 Unknown storage engine 'ARCHIVE'
20+
select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't_' order by 1,2;
21+
table_schema table_name engine row_format
22+
test t1 ARCHIVE NULL
23+
test t2 NULL NULL
2524
Warnings:
26-
Level Warning
27-
Code 1286
28-
Message Unknown storage engine 'ARCHIVE'
25+
Warning 1033 Incorrect information in file: './test/t2.frm'
26+
Warning 1286 Unknown storage engine 'ARCHIVE'
2927
install soname 'ha_archive';
28+
show create table t1;
29+
Table Create Table
30+
t1 CREATE TABLE `t1` (
31+
`a` int(11) DEFAULT NULL
32+
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
33+
show create table t2;
34+
Table Create Table
35+
t2 CREATE TABLE `t2` (
36+
`a` int(11) DEFAULT NULL
37+
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
38+
PARTITION BY HASH (`a`)
39+
PARTITIONS 3
3040
db.opt
3141
t1.ARZ
3242
t1.frm
43+
t2#P#p0.ARZ
44+
t2#P#p1.ARZ
45+
t2#P#p2.ARZ
46+
t2.frm
47+
t2.par
3348
drop table t1;
49+
drop table t2;
3450
db.opt
3551
uninstall soname 'ha_archive';
3652
SET debug_dbug=@saved_dbug;

mysql-test/main/drop_bad_db_type.test

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
--source include/have_partition.inc
22
--source include/have_debug.inc
33

44
if (!$HA_ARCHIVE_SO) {
@@ -13,18 +13,25 @@ SET debug_dbug='+d,unstable_db_type';
1313
install soname 'ha_archive';
1414
create table t1 (a int) engine=archive;
1515
insert t1 values (1),(2),(3);
16+
17+
create table t2 (a int) engine=archive partition by hash(a) partitions 3;
18+
1619
flush tables;
1720
uninstall soname 'ha_archive';
1821

19-
--vertical_results
20-
select table_schema, table_name from information_schema.tables where table_name like 't1';
21-
select table_schema, table_name, engine, version from information_schema.tables where table_name like 't1';
22-
select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't1';
23-
--horizontal_results
22+
select table_schema, table_name from information_schema.tables where table_name like 't_' order by 1,2;
23+
--replace_result $mysqld_datadir ./
24+
select table_schema, table_name, engine, version from information_schema.tables where table_name like 't_' order by 1,2;
25+
--replace_result $mysqld_datadir ./
26+
select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't_' order by 1,2;
2427

2528
install soname 'ha_archive';
29+
show create table t1;
30+
show create table t2;
31+
2632
--list_files $mysqld_datadir/test
2733
drop table t1;
34+
drop table t2;
2835
--list_files $mysqld_datadir/test
2936
uninstall soname 'ha_archive';
3037

mysql-test/main/error_simulation.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,13 @@ SELECT f1(1);
128128
Got one of the listed errors
129129
DROP FUNCTION f1;
130130
SET debug_dbug= @saved_dbug;
131+
#
132+
# MDEV-27978 wrong option name in error when exceeding max_session_mem_used
133+
#
134+
SET SESSION max_session_mem_used = 8192;
135+
SELECT * FROM information_schema.processlist;
136+
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
137+
SET SESSION max_session_mem_used = DEFAULT;
138+
#
139+
# End of 10.2 tests
140+
#

mysql-test/main/error_simulation.test

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,16 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory";
158158
SELECT f1(1);
159159
DROP FUNCTION f1;
160160
SET debug_dbug= @saved_dbug;
161+
162+
--echo #
163+
--echo # MDEV-27978 wrong option name in error when exceeding max_session_mem_used
164+
--echo #
165+
SET SESSION max_session_mem_used = 8192;
166+
--error ER_OPTION_PREVENTS_STATEMENT
167+
SELECT * FROM information_schema.processlist;
168+
SET SESSION max_session_mem_used = DEFAULT;
169+
170+
171+
--echo #
172+
--echo # End of 10.2 tests
173+
--echo #

0 commit comments

Comments
 (0)