Skip to content

Commit

Permalink
Merge 10.11 into 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jul 26, 2023
2 parents 936edd8 + bce3ee7 commit f2b4972
Show file tree
Hide file tree
Showing 208 changed files with 4,932 additions and 2,612 deletions.
1 change: 1 addition & 0 deletions cmake/cpack_rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ ENDIF()
# MDEV-24629, we need it outside of ELSIFs
IF(RPM MATCHES "fedora")
ALTERNATIVE_NAME("common" "mariadb-connector-c-config" ${MARIADB_CONNECTOR_C_VERSION}-1)
ALTERNATIVE_NAME("shared" "mariadb-connector-c" ${MARIADB_CONNECTOR_C_VERSION}-1)
ENDIF()

SET(PYTHON_SHEBANG "/usr/bin/python3" CACHE STRING "python shebang")
Expand Down
1 change: 1 addition & 0 deletions debian/mariadb-plugin-provider-bzip2.lintian-overrides
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# It's intentional that bzip2 compression plugin doesn't have symbols from libc
# More info https://jira.mariadb.org/browse/MDEV-28120
library-not-linked-against-libc usr/lib/mysql/plugin/provider_bzip2.so
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_bzip2.so]
1 change: 1 addition & 0 deletions debian/mariadb-plugin-provider-lz4.lintian-overrides
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# It's intentional that LZ4 compression plugin doesn't have symbols from libc
# More info https://jira.mariadb.org/browse/MDEV-28120
library-not-linked-against-libc usr/lib/mysql/plugin/provider_lz4.so
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_lz4.so]
1 change: 1 addition & 0 deletions debian/mariadb-plugin-provider-lzma.lintian-overrides
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# It's intentional that LZMA compression plugin doesn't have symbols from libc
# More info https://jira.mariadb.org/browse/MDEV-28120
library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzma.so
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_lzma.so]
1 change: 1 addition & 0 deletions debian/mariadb-plugin-provider-lzo.lintian-overrides
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# It's intentional that LZO compression plugin doesn't have symbols from libc
# More info https://jira.mariadb.org/browse/MDEV-28120
library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzo.so
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_lzo.so]
1 change: 1 addition & 0 deletions debian/mariadb-plugin-provider-snappy.lintian-overrides
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# It's intentional that Snappy compression plugin doesn't have symbols from libc
# More info https://jira.mariadb.org/browse/MDEV-28120
library-not-linked-against-libc usr/lib/mysql/plugin/provider_snappy.so
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_snappy.so]
172 changes: 91 additions & 81 deletions debian/salsa-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ build i386:
script:
- *autobake-deb-steps

build bullseye-backports:
extends: .build-package
variables:
RELEASE: bullseye-backports

# Buster only has libfmt 6.1 but 7.0 is required, so backport build for Buster
# is not possible unless somebody packages libfmt7-dev for Buster.

build sid:
extends: .build-package
script:
Expand Down Expand Up @@ -112,35 +120,64 @@ blhc:
mysql --table -e "SELECT * FROM plugin;" mysql
mysql --table -e "SHOW PLUGINS;" mysql

# Readline was removed from Debian Sid (and Bullseye) in Feb 2021. To be able to install older
# versions of MariaDB that depend on it, fetch and install it from Buster.
.test-install-readline-in-sid-for-backwards-compat: &test-install-readline-in-sid-for-backwards-compat |
curl -sS -O http:https://ftp.de.debian.org/debian/pool/main/r/readline5/libreadline5_5.2+dfsg-3+b13_amd64.deb
apt-get -qq install --no-install-recommends --yes ./libreadline5_5.2+dfsg-3+b13_amd64.deb

.test-enable-bullseye-repos: &test-enable-bullseye-repos
# Replace any old repos with just Sid
- echo 'deb http:https://deb.debian.org/debian bullseye main' > /etc/apt/sources.list
# Upgrade minimal stack first
- apt-get update -qq
- apt-get install -y apt

.test-enable-bullseye-backports-repos: &test-enable-bullseye-backports-repos |
# Enable bullseye-backports (assumes environment already Debian Bullseye)
echo 'deb http:https://deb.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/bullseye-backports.list
.test-enable-buster-backports-repos: &test-enable-buster-backports-repos |
# Enable buster-backports (assumes environment already Debian Buster)
echo 'deb http:https://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/buster-backports.list
# Increase default backports priority policy from '100' to '500' so it can actually be used
cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies
Package: *
Pin: release n=bullseye-*
Pin: release n=buster-*
Pin-Priority: 500
EOF
apt-get update -qq

.test-enable-buster-backports-repos: &test-enable-buster-backports-repos |
# Enable buster-backports (assumes environment already Debian Buster)
echo 'deb http:https://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/buster-backports.list
.test-enable-bullseye-backports-repos: &test-enable-bullseye-backports-repos |
# Enable bullseye-backports (assumes environment already Debian Bullseye)
echo 'deb http:https://deb.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/bullseye-backports.list
# Increase default backports priority policy from '100' to '500' so it can actually be used
cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies
Package: *
Pin: release n=buster-*
Pin: release n=bullseye-*
Pin-Priority: 500
EOF
apt-get update -qq

.test-enable-sid-repos: &test-enable-sid-repos
# Apply usrmerge workaround for Stretch/Buster/Bullseye to Bookworm/Sid upgrades
- echo 'this system will not be supported in the future' > /etc/unsupported-skip-usrmerge-conversion
# Replace any old repos with just Sid
- echo 'deb http:https://deb.debian.org/debian sid main' > /etc/apt/sources.list
# Upgrade minimal stack first
- apt-get update -qq
# Next step will fail on https://bugs.debian.org/993755
# /usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot
# open shared object file: No such file or directory
# dpkg: error processing package libc6:amd64 (--configure):
- apt-get install -y apt || true
# Apply workaround
- cd $(mktemp -d) # Use temp dir where apt can download and unpack files
- apt-get -y download libcrypt1
- dpkg-deb -x libcrypt1_*.deb .
- cp -ra lib/* /lib/
- cd - # Back to /builds/$USER/mariadb-server/debian/output
- find /lib/*/libcrypt.* -ls # Show that new libcrypt is there
- apt-get -y --fix-broken install
# Complete upgrade of minimal stack
- apt-get install -y apt

.test-install: &test-install
# Install MariaDB built in this commit
- apt-get install -y ./*.deb
Expand Down Expand Up @@ -252,35 +289,6 @@ mariadb-10.5 Bullseye upgrade:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/

mariadb-10.3 with Buster backports upgrade:
stage: upgrade extras
needs:
- job: build buster-backports
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
# Install everything MariaDB 10.3 currently in Debian Buster
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
# Verify installation of MariaDB from Buster
- *test-verify-initial
# Buster backports is needed for liburing1 (>= 0.7) and galera-4 (>= 26.4)
- *test-enable-buster-backports-repos
- *test-install
# mariadb-10.3 in Buster ships a /etc/init.d/mysql so it should continue to work
- service mysql status
- service mariadb status
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/

mariadb-10.3 Buster upgrade:
stage: upgrade from Buster
needs:
Expand Down Expand Up @@ -490,6 +498,43 @@ mysql-8.0 from Ubuntu 22.04 upgrade:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/

# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
mysql-community-cluster-8.0 from MySQL.com upgrade:
stage: upgrade extras
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get install --no-install-recommends --yes ca-certificates curl systemctl
- curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x859be8d7c586f538430b19c2467b942d3a79bd29" -o /etc/apt/trusted.gpg.d/mysql.asc
- echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-cluster-8.0" > /etc/apt/sources.list.d/mysql.list
- apt-get update -qq
- apt-get install -y mysql-cluster-community-server
- sed 's/ExecStartPre=+/ExecStartPre=/' -i /lib/systemd/system/mysql.service # Hack to make file compatible with systemctl shim
- systemctl start mysql
- dpkg -l | grep -iE 'maria|mysql|galera'
- systemctl status mysql; mysql -e 'SELECT VERSION()'
- systemctl stop mysql # Stop manually as maintainer scripts don't handle this with systemctl shim
- *test-install
# Ignore systemctl shim result as MariaDB systemd file is incompatible with it and yields:
# ERROR:systemctl:the ExecStartPre control process exited with error code
- systemctl status mysql || true
- mysql -e 'SELECT VERSION()' || true
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/

mariadb.org 10.11 to mariadb upgrade:
stage: upgrade extras
needs:
Expand Down Expand Up @@ -570,7 +615,7 @@ mariadb.org 10.9 to mariadb upgrade:
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://deb.mariadb.org/10.9/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list
- apt-get update
- apt-get install -y mariadb-server
- apt-get install -y mariadb-server-10.9 mariadb-client-10.9
- *test-verify-initial
# Install MariaDB built in this commit
# Force downgrades so our version installs on top of upstream revision, e.g. 1:10.9.1-1 vs 1:10.9.1+mariadb~sid
Expand Down Expand Up @@ -618,43 +663,6 @@ mariadb.org-10.8 to mariadb upgrade:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/

# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
mysql-community-cluster-8.0 from MySQL.com upgrade:
stage: upgrade extras
needs:
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get install --no-install-recommends --yes ca-certificates curl systemctl
- curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x859be8d7c586f538430b19c2467b942d3a79bd29" -o /etc/apt/trusted.gpg.d/mysql.asc
- echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-cluster-8.0" > /etc/apt/sources.list.d/mysql.list
- apt-get update -qq
- apt-get install -y mysql-cluster-community-server
- sed 's/ExecStartPre=+/ExecStartPre=/' -i /lib/systemd/system/mysql.service # Hack to make file compatible with systemctl shim
- systemctl start mysql
- dpkg -l | grep -iE 'maria|mysql|galera'
- systemctl status mysql; mysql -e 'SELECT VERSION()'
- systemctl stop mysql # Stop manually as maintainer scripts don't handle this with systemctl shim
- *test-install
# Ignore systemctl shim result as MariaDB systemd file is incompatible with it and yields:
# ERROR:systemctl:the ExecStartPre control process exited with error code
- systemctl status mysql || true
- mysql -e 'SELECT VERSION()' || true
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/

mariadb.org-10.7 to mariadb upgrade:
stage: upgrade extras
needs:
Expand Down Expand Up @@ -746,11 +754,11 @@ mariadb.org-10.5 to mariadb upgrade:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/

mariadb.org-10.4 to mariadb with Buster backports upgrade:
mariadb.org-10.4 to mariadb upgrade:
stage: upgrade extras
needs:
- job: build buster-backports
image: debian:buster
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
Expand All @@ -762,6 +770,7 @@ mariadb.org-10.4 to mariadb with Buster backports upgrade:
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://archive.mariadb.org/mariadb-10.4/repo/debian buster main" > /etc/apt/sources.list.d/mariadb.list
- apt-get update -qq
- *test-install-readline-in-sid-for-backwards-compat
- apt-get install -y mariadb-server-10.4
# MariaDB.org version of 10.4 and early 10.5 do not install an init file, so
# it must be installed here manually
Expand All @@ -780,11 +789,11 @@ mariadb.org-10.4 to mariadb with Buster backports upgrade:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/

mariadb.org-10.3 to mariadb with Buster backports upgrade:
mariadb.org-10.3 to mariadb upgrade:
stage: upgrade extras
needs:
- job: build bullseye-backports
image: debian:bullseye
- job: build
image: debian:${RELEASE}
artifacts:
when: always
name: "$CI_BUILD_NAME"
Expand All @@ -796,6 +805,7 @@ mariadb.org-10.3 to mariadb with Buster backports upgrade:
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo "deb https://archive.mariadb.org/mariadb-10.3/repo/debian buster main" > /etc/apt/sources.list.d/mariadb.list
- apt-get update -qq
- *test-install-readline-in-sid-for-backwards-compat
- apt-get install -y mariadb-server-10.3
- *test-verify-initial
# Buster backports is needed for liburing1 (>= 0.7) and galera-4 (>= 26.4)
Expand Down
3 changes: 3 additions & 0 deletions debian/source/lintian-overrides
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# MariaDB use high enough debhelper so this is should
# be considered as bug in lintia
missing-build-dependency-for-dh-addon systemd *
# Necessary for drop-in-place-replacement upgrades on mysql-server/-client
# since package breaks/replaces these but at the same time also provides them
version-substvar-for-external-package mariadb-client-core -> mysql-client-5.5
Expand Down
2 changes: 1 addition & 1 deletion include/m_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);

#ifdef __cplusplus
#include <type_traits>
template<typename T> inline const char *_swl_check(T s)
template<typename T> inline constexpr const char *_swl_check(T s)
{
static_assert(std::is_same<T, const char (&)[sizeof(T)]>::value
|| std::is_same<T, const char [sizeof(T)]>::value,
Expand Down
12 changes: 10 additions & 2 deletions include/my_compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@
/* GNU C/C++ */
#if defined __GNUC__
# define MY_ALIGN_EXT
# define MY_ASSERT_UNREACHABLE() __builtin_unreachable()

/*
__builtin_unreachable() removes the "statement may fall through" warning-as-
error when MY_ASSERT_UNREACHABLE() is used in "case xxx:" in switch (...)
statements.
abort() is there to prevent the execution from reaching the
__builtin_unreachable() as this may cause misleading stack traces.
*/
# define MY_ASSERT_UNREACHABLE() { abort(); __builtin_unreachable(); }

/* Microsoft Visual C++ */
#elif defined _MSC_VER
Expand Down Expand Up @@ -88,7 +96,7 @@
#endif

#ifndef MY_ASSERT_UNREACHABLE
# define MY_ASSERT_UNREACHABLE() do { assert(0); } while (0)
# define MY_ASSERT_UNREACHABLE() do { abort(); } while (0)
#endif

/**
Expand Down
2 changes: 1 addition & 1 deletion man/comp_err.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'\" t
.\"
.TH "\FBCOMP_ERR\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
.TH "\fBCOMP_ERR\fR" "1" "15 May 2020" "MariaDB 10.11" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion man/galera_new_cluster.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'\" t
.\"
.TH "\FBGALERA_NEW_CLUSTER\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
.TH "\fBGALERA_NEW_CLUSTER\fR" "1" "15 May 2020" "MariaDB 10.11" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion man/galera_recovery.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'\" t
.\"
.TH "\FBGALERA_RECOVERY\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
.TH "\fBGALERA_RECOVERY\fR" "1" "15 May 2020" "MariaDB 10.11" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion man/innochecksum.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'\" t
.\"
.TH "\FBINNOCHECKSUM\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
.TH "\fBINNOCHECKSUM\fR" "1" "15 May 2020" "MariaDB 10.11" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions man/mariadb-access.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'\" t
.\"
.TH "\FBMARIADB-ACCESS\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
.TH "\fBMARIADB-ACCESS\fR" "1" "15 May 2020" "MariaDB 10.11" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
Expand Down Expand Up @@ -400,7 +400,7 @@ script at approximately line 18\&. Search for a line that looks like this:
.RS 4
.\}
.nf
$MYSQL = \'/usr/local/bin/mysql\'; # path to mysql executable
$MYSQL = '/usr/local/bin/mysql'; # path to mysql executable
.fi
.if n \{\
.RE
Expand Down

0 comments on commit f2b4972

Please sign in to comment.