Skip to content

Commit

Permalink
Merge branch 10.5 into 10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Mar 18, 2022
2 parents ee80c19 + 06e3bc4 commit 065f995
Show file tree
Hide file tree
Showing 28 changed files with 404 additions and 151 deletions.
85 changes: 37 additions & 48 deletions debian/autobake-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,15 @@
# Exit immediately on any error
set -e

CODENAME="$(lsb_release -sc)"
case "${CODENAME}" in
stretch)
# MDEV-28022 libzstd-dev-1.1.3 minimum version
sed -i -e '/libzstd-dev/d' debian/control
;;
esac

# This file is invoked from Buildbot and Travis-CI to build deb packages.
# As both of those CI systems have many parallel jobs that include different
# parts of the test suite, we don't need to run the mysql-test-run at all when
# building the deb packages here.
# On Buildbot, don't run the mysql-test-run test suite as part of build.
# It takes a lot of time, and we will do a better test anyway in
# Buildbot, running the test suite from installed .debs on a clean VM.
export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"

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

# Don't build or try to put files in a package for selected plugins and components on Travis-CI
# in order to keep build small (in both duration and disk space)
if [[ $TRAVIS ]]
then
# Test suite package not relevant on Travis-CI
sed 's|DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test|DINSTALL_MYSQLTESTDIR=false|' -i debian/rules
sed '/Package: mariadb-test-data/,/^$/d' -i debian/control
sed '/Package: mariadb-test$/,/^$/d' -i debian/control

# Extra plugins such as Mroonga, Spider, OQgraph, Sphinx and the embedded build can safely be skipped
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
sed "/Package: mariadb-plugin-mroonga/,/^$/d" -i debian/control
sed "/Package: mariadb-plugin-rocksdb/,/^$/d" -i debian/control
sed "/Package: mariadb-plugin-spider/,/^$/d" -i debian/control
sed "/Package: mariadb-plugin-oqgraph/,/^$/d" -i debian/control
sed "/ha_sphinx.so/d" -i debian/mariadb-server-10.6.install
sed "/Package: libmariadbd19/,/^$/d" -i debian/control
sed "/Package: libmariadbd-dev/,/^$/d" -i debian/control
fi
# Look up distro-version specific stuff
#
# Always keep the actual packaging as up-to-date as possible following the latest
# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh
# tests for backwards compatibility and strip away parts on older builders.

# If rocksdb-tools is not available (before Debian Buster and Ubuntu Disco)
# remove the dependency from the RocksDB plugin so it can install properly
# and instead ship the one built from MariaDB sources
if ! apt-cache madison rocksdb-tools | grep 'rocksdb-tools' >/dev/null 2>&1
then
remove_rocksdb_tools()
{
sed '/rocksdb-tools/d' -i debian/control
sed '/sst_dump/d' -i debian/not-installed
echo "usr/bin/sst_dump" >> debian/mariadb-plugin-rocksdb.install
fi
if ! grep -q sst_dump debian/mariadb-plugin-rocksdb.install
then
echo "usr/bin/sst_dump" >> debian/mariadb-plugin-rocksdb.install
fi
}


CODENAME="$(lsb_release -sc)"
case "${CODENAME}" in
stretch)
# MDEV-28022 libzstd-dev-1.1.3 minimum version
sed -i -e '/libzstd-dev/d' \
-e 's/libcurl4/libcurl3/g' -i debian/control
remove_rocksdb_tools
;;
bionic)
remove_rocksdb_tools
;;
esac

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

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

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

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

# Don't log package contents on Travis-CI or Gitlab-CI to save time and log size
if [[ ! $TRAVIS ]] && [[ ! $GITLAB_CI ]]
# Don't log package contents on Gitlab-CI to save time and log size
if [[ ! $GITLAB_CI ]]
then
echo "List package contents ..."
cd ..
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
Build-Depends: bison,
cmake,
cracklib-runtime <!nocheck>,
debhelper (>= 9.20160709~),
debhelper (>= 10),
dh-exec,
flex [amd64],
gdb <!nocheck>,
Expand Down
23 changes: 23 additions & 0 deletions mysql-test/main/ctype_utf32.result
Original file line number Diff line number Diff line change
Expand Up @@ -2890,5 +2890,28 @@ HEX(c1)
0000006100000063
DROP TABLE t1;
#
# MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT
#
CREATE TABLE t1 (a CHAR(1));
SET COLLATION_CONNECTION=utf32_general_ci, CHARACTER_SET_CLIENT=binary;
ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32;
ERROR HY000: Column 'a' has duplicated value 'a' in ENUM
ALTER TABLE t1 CHANGE a a ENUM('aaa') CHARACTER SET utf32;
ERROR HY000: Invalid utf32 character string: '\x00aaa'
ALTER TABLE t1 CHANGE a a ENUM('aa') CHARACTER SET utf32;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('慡') CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('a','b') CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SET NAMES utf8;
#
# End of 10.2 tests
#
19 changes: 19 additions & 0 deletions mysql-test/main/ctype_utf32.test
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,25 @@ INSERT INTO t1 (c1) VALUES (1),(2),(3);
SELECT HEX(c1) FROM t1 ORDER BY c1;
DROP TABLE t1;


--echo #
--echo # MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT
--echo #

CREATE TABLE t1 (a CHAR(1));
SET COLLATION_CONNECTION=utf32_general_ci, CHARACTER_SET_CLIENT=binary;
--error ER_DUPLICATED_VALUE_IN_TYPE
ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32;
--error ER_INVALID_CHARACTER_STRING
ALTER TABLE t1 CHANGE a a ENUM('aaa') CHARACTER SET utf32;
ALTER TABLE t1 CHANGE a a ENUM('aa') CHARACTER SET utf32;
SHOW CREATE TABLE t1;
ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32;
SHOW CREATE TABLE t1;
DROP TABLE t1;
SET NAMES utf8;


--echo #
--echo # End of 10.2 tests
--echo #
15 changes: 15 additions & 0 deletions mysql-test/main/ctype_utf32_uca.result
Original file line number Diff line number Diff line change
Expand Up @@ -7941,6 +7941,21 @@ EXECUTE s;
DEALLOCATE PREPARE s;
SET NAMES utf8;
#
# MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT
#
CREATE TABLE t1 (a CHAR(1));
SET COLLATION_CONNECTION=utf32_myanmar_ci, CHARACTER_SET_CLIENT=binary;
ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32;
ERROR HY000: Column 'a' has duplicated value 'a' in ENUM
ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('a','b') CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SET NAMES utf8;
#
# End of 10.2 tests
#
#
Expand Down
13 changes: 13 additions & 0 deletions mysql-test/main/ctype_utf32_uca.test
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,19 @@ EXECUTE s;
DEALLOCATE PREPARE s;
SET NAMES utf8;

--echo #
--echo # MDEV-23210 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on ALTER TABLE, SELECT and INSERT
--echo #

CREATE TABLE t1 (a CHAR(1));
SET COLLATION_CONNECTION=utf32_myanmar_ci, CHARACTER_SET_CLIENT=binary;
--error ER_DUPLICATED_VALUE_IN_TYPE
ALTER TABLE t1 CHANGE a a ENUM('a','a') CHARACTER SET utf32;
ALTER TABLE t1 CHANGE a a ENUM('a','b') CHARACTER SET utf32;
SHOW CREATE TABLE t1;
DROP TABLE t1;
SET NAMES utf8;


--echo #
--echo # End of 10.2 tests
Expand Down
54 changes: 35 additions & 19 deletions mysql-test/main/drop_bad_db_type.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,50 @@ SET debug_dbug='+d,unstable_db_type';
install soname 'ha_archive';
create table t1 (a int) engine=archive;
insert t1 values (1),(2),(3);
create table t2 (a int) engine=archive partition by hash(a) partitions 3;
flush tables;
uninstall soname 'ha_archive';
select table_schema, table_name from information_schema.tables where table_name like 't1';
table_schema test
table_name t1
select table_schema, table_name, engine, version from information_schema.tables where table_name like 't1';
table_schema test
table_name t1
engine ARCHIVE
version NULL
select table_schema, table_name from information_schema.tables where table_name like 't_' order by 1,2;
table_schema table_name
test t1
test t2
select table_schema, table_name, engine, version from information_schema.tables where table_name like 't_' order by 1,2;
table_schema table_name engine version
test t1 ARCHIVE NULL
test t2 NULL NULL
Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'ARCHIVE'
select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't1';
table_schema test
table_name t1
engine ARCHIVE
row_format NULL
Warning 1033 Incorrect information in file: './test/t2.frm'
Warning 1286 Unknown storage engine 'ARCHIVE'
select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't_' order by 1,2;
table_schema table_name engine row_format
test t1 ARCHIVE NULL
test t2 NULL NULL
Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'ARCHIVE'
Warning 1033 Incorrect information in file: './test/t2.frm'
Warning 1286 Unknown storage engine 'ARCHIVE'
install soname 'ha_archive';
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
PARTITION BY HASH (`a`)
PARTITIONS 3
db.opt
t1.ARZ
t1.frm
t2#P#p0.ARZ
t2#P#p1.ARZ
t2#P#p2.ARZ
t2.frm
t2.par
drop table t1;
drop table t2;
db.opt
uninstall soname 'ha_archive';
SET debug_dbug=@saved_dbug;
19 changes: 13 additions & 6 deletions mysql-test/main/drop_bad_db_type.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

--source include/have_partition.inc
--source include/have_debug.inc

if (!$HA_ARCHIVE_SO) {
Expand All @@ -13,18 +13,25 @@ SET debug_dbug='+d,unstable_db_type';
install soname 'ha_archive';
create table t1 (a int) engine=archive;
insert t1 values (1),(2),(3);

create table t2 (a int) engine=archive partition by hash(a) partitions 3;

flush tables;
uninstall soname 'ha_archive';

--vertical_results
select table_schema, table_name from information_schema.tables where table_name like 't1';
select table_schema, table_name, engine, version from information_schema.tables where table_name like 't1';
select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't1';
--horizontal_results
select table_schema, table_name from information_schema.tables where table_name like 't_' order by 1,2;
--replace_result $mysqld_datadir ./
select table_schema, table_name, engine, version from information_schema.tables where table_name like 't_' order by 1,2;
--replace_result $mysqld_datadir ./
select table_schema, table_name, engine, row_format from information_schema.tables where table_name like 't_' order by 1,2;

install soname 'ha_archive';
show create table t1;
show create table t2;

--list_files $mysqld_datadir/test
drop table t1;
drop table t2;
--list_files $mysqld_datadir/test
uninstall soname 'ha_archive';

Expand Down
10 changes: 10 additions & 0 deletions mysql-test/main/error_simulation.result
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,13 @@ SELECT f1(1);
Got one of the listed errors
DROP FUNCTION f1;
SET debug_dbug= @saved_dbug;
#
# MDEV-27978 wrong option name in error when exceeding max_session_mem_used
#
SET SESSION max_session_mem_used = 8192;
SELECT * FROM information_schema.processlist;
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
SET SESSION max_session_mem_used = DEFAULT;
#
# End of 10.2 tests
#
13 changes: 13 additions & 0 deletions mysql-test/main/error_simulation.test
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,16 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory";
SELECT f1(1);
DROP FUNCTION f1;
SET debug_dbug= @saved_dbug;

--echo #
--echo # MDEV-27978 wrong option name in error when exceeding max_session_mem_used
--echo #
SET SESSION max_session_mem_used = 8192;
--error ER_OPTION_PREVENTS_STATEMENT
SELECT * FROM information_schema.processlist;
SET SESSION max_session_mem_used = DEFAULT;


--echo #
--echo # End of 10.2 tests
--echo #
2 changes: 1 addition & 1 deletion mysql-test/main/partition_not_blackhole.result
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SHOW TABLES;
Tables_in_test
t1
SHOW CREATE TABLE t1;
ERROR HY000: Failed to read from the .par file
ERROR HY000: Incorrect information in file: './test/t1.frm'
DROP TABLE t1;
ERROR HY000: Got error 175 "File too short; Expected more data in file" from storage engine partition
t1.frm
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/partition_not_blackhole.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
--copy_file std_data/parts/t1_blackhole.par $MYSQLD_DATADIR/test/t1.par
SHOW TABLES;
--replace_result $MYSQLD_DATADIR ./
--error ER_FAILED_READ_FROM_PAR_FILE
--error ER_NOT_FORM_FILE
SHOW CREATE TABLE t1;

# The replace is needed for Solaris
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/suite/galera/r/galera_kill_applier.result
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ SELECT @@wsrep_slave_threads;
@@wsrep_slave_threads
1
SET GLOBAL wsrep_slave_threads=2;
KILL ID;
Got one of the listed errors
KILL QUERY ID;
Got one of the listed errors
KILL ID;
Got one of the listed errors
KILL QUERY ID;
Got one of the listed errors
SET GLOBAL wsrep_slave_threads=DEFAULT;
connection node_1;
Expand Down
Loading

0 comments on commit 065f995

Please sign in to comment.