Merge branch 10.7 into 10.8

Closes #2083
This commit is contained in:
Daniel Black 2022-04-06 14:23:20 +10:00
commit 7b06bc9a94
26 changed files with 298 additions and 150 deletions

View file

@ -26,6 +26,7 @@ ENDMACRO()
MACRO (CHECK_LIBFMT) MACRO (CHECK_LIBFMT)
IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto") IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto")
SET(CMAKE_REQUIRED_INCLUDES ${LIBFMT_INCLUDE_DIR})
CHECK_CXX_SOURCE_COMPILES( CHECK_CXX_SOURCE_COMPILES(
"#define FMT_STATIC_THOUSANDS_SEPARATOR ',' "#define FMT_STATIC_THOUSANDS_SEPARATOR ','
#define FMT_HEADER_ONLY 1 #define FMT_HEADER_ONLY 1
@ -37,6 +38,7 @@ MACRO (CHECK_LIBFMT)
std::cout << fmt::vformat(\"The answer is {}.\", std::cout << fmt::vformat(\"The answer is {}.\",
fmt::format_args(&arg, 1)); fmt::format_args(&arg, 1));
}" HAVE_SYSTEM_LIBFMT) }" HAVE_SYSTEM_LIBFMT)
SET(CMAKE_REQUIRED_INCLUDES)
ENDIF() ENDIF()
IF(NOT HAVE_SYSTEM_LIBFMT OR WITH_LIBFMT STREQUAL "bundled") IF(NOT HAVE_SYSTEM_LIBFMT OR WITH_LIBFMT STREQUAL "bundled")
IF (WITH_LIBFMT STREQUAL "system") IF (WITH_LIBFMT STREQUAL "system")

239
debian/salsa-ci.yml vendored
View file

@ -21,7 +21,7 @@ stages:
- build - build
- test - test
- upgrade in Sid - upgrade in Sid
- upgrade from Bullseye/Buster/Stretch - upgrade from Bullseye/Buster
- upgrade extras - upgrade extras
- test extras - test extras
- publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used - publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used
@ -54,6 +54,13 @@ build bullseye-backports:
build buster-backports: build buster-backports:
extends: .build-package extends: .build-package
script: script:
# 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-Priority: 500
EOF
- *autobake-deb-steps - *autobake-deb-steps
variables: variables:
RELEASE: buster-backports RELEASE: buster-backports
@ -68,9 +75,17 @@ build i386:
variables: variables:
ARCH: 'i386' ARCH: 'i386'
# Build native deb without using autobake-deb.sh. This way we will detect
# if the debian/control file and other packaging is correct as-is for Debian Sid.
build native deb: build native deb:
extends: .build-package extends: .build-package
autopkgtest:
extends: .test-autopkgtest
artifacts:
reports:
junit: ${WORKING_DIR}/debci/artifacts/mysql-test-run-junit.xml
piuparts: piuparts:
extends: .test-piuparts extends: .test-piuparts
stage: test extras stage: test extras
@ -78,6 +93,7 @@ piuparts:
blhc: blhc:
extends: .test-blhc extends: .test-blhc
stage: test extras stage: test extras
# Build log checker needs a .build file and thus only works on native build
needs: needs:
- job: build native deb - job: build native deb
@ -96,11 +112,17 @@ blhc:
# Prime the apt cache so later apt commands can run # Prime the apt cache so later apt commands can run
apt-get update apt-get update
# 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 -O http://ftp.de.debian.org/debian/pool/main/r/readline5/libreadline5_5.2+dfsg-3+b13_amd64.deb
apt install -y ./libreadline5_5.2+dfsg-3+b13_amd64.deb
.test-verify-initial: &test-verify-initial | .test-verify-initial: &test-verify-initial |
dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
service mysql status || service mariadb status # Early MariaDB 10.5 only had 'mariadb' service mysql status || service mariadb status # Early MariaDB 10.5 only had 'mariadb'
mysql --skip-column-names -e "select @@version, @@version_comment" # Show version mysql --skip-column-names -e "select @@version, @@version_comment" # Show version
mysql --table -e 'SHOW DATABASES;' # List databases before upgrade mysql --table -e "SHOW DATABASES;" # List databases before upgrade
mysql --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql mysql --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql
mysql --table -e "SELECT * FROM plugin;" mysql mysql --table -e "SELECT * FROM plugin;" mysql
mysql --table -e "SHOW PLUGINS;" mysql mysql --table -e "SHOW PLUGINS;" mysql
@ -125,7 +147,7 @@ blhc:
cp -ra /etc/mysql debug/etc-mysql cp -ra /etc/mysql debug/etc-mysql
cp -ra /var/log/mysql debug/var-log-mysql cp -ra /var/log/mysql debug/var-log-mysql
mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
mariadb --table -e 'SHOW DATABASES;' # List databases mariadb --table -e "SHOW DATABASES;" # List databases
mariadb --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql mariadb --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql
mariadb --table -e "SELECT * FROM plugin;" mysql mariadb --table -e "SELECT * FROM plugin;" mysql
mariadb --table -e "SHOW PLUGINS;" mysql mariadb --table -e "SHOW PLUGINS;" mysql
@ -221,7 +243,7 @@ mariadb-10.8 Sid upgrade:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb-10.5 Bullseye to mariadb-10.8 upgrade: mariadb-10.5 Bullseye to mariadb-10.8 upgrade:
stage: upgrade from Bullseye/Buster/Stretch stage: upgrade from Bullseye/Buster
needs: needs:
- job: build - job: build
image: debian:bullseye image: debian:bullseye
@ -247,7 +269,7 @@ mariadb-10.5 Bullseye to mariadb-10.8 upgrade:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb-10.3 Buster to mariadb-10.8 upgrade: mariadb-10.3 Buster to mariadb-10.8 upgrade:
stage: upgrade from Bullseye/Buster/Stretch stage: upgrade from Bullseye/Buster
needs: needs:
- job: build - job: build
image: debian:buster image: debian:buster
@ -272,34 +294,6 @@ mariadb-10.3 Buster to mariadb-10.8 upgrade:
variables: variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb-10.1 Stretch to mariadb-10.8 upgrade:
stage: upgrade from Bullseye/Buster/Stretch
needs:
- job: build
image: debian:stretch
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
# Install almost everything currently in Debian Stretch,
# omitting libmariadbclient-dev-compat as it would conflict
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*'
# Verify installation of MariaDB from Stretch
- *test-verify-initial
- apt-get remove -y manpages # Workaround for Bug#99375
- *test-enable-sid-repos
- *test-install
- service mysql status
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
test basic features: test basic features:
stage: test stage: test
needs: needs:
@ -457,8 +451,29 @@ default-libmysqlclient-dev Sid upgrade:
variables: variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
default-libmysqlclient-dev Bullseye upgrade:
stage: upgrade from Bullseye/Buster
needs:
- job: build
image: debian:bullseye
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all
- *test-enable-sid-repos
- *test-install-all-libs
- *test-verify-libs
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
default-libmysqlclient-dev Buster upgrade: default-libmysqlclient-dev Buster upgrade:
stage: upgrade from Bullseye/Buster/Stretch stage: upgrade from Bullseye/Buster
needs: needs:
- job: build - job: build
image: debian:buster image: debian:buster
@ -478,52 +493,6 @@ default-libmysqlclient-dev Buster upgrade:
variables: variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
default-libmysqlclient-dev Stretch upgrade:
stage: upgrade from Bullseye/Buster/Stretch
needs:
- job: build
image: debian:stretch
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all
- apt-get remove -y manpages # Workaround for Bug#99375
- *test-enable-sid-repos
- *test-install-all-libs
- *test-verify-libs
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb-connector-c Stretch upgrade:
stage: upgrade from Bullseye/Buster/Stretch
needs:
- job: build
image: debian:stretch
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
- apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat
- pkg-config --list-all
- apt-get remove -y manpages # Workaround for Bug#99375
- *test-enable-sid-repos
- *test-install-all-libs
- *test-verify-libs
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
# Upgrading libc from Stretch to Bookworm is not possible due to Bug#993755
# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump. # 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. # The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
mysql-8.0 Sid to mariadb-10.8 upgrade: mysql-8.0 Sid to mariadb-10.8 upgrade:
@ -568,14 +537,14 @@ mysql-8.0 Focal to mariadb-10.8 upgrade:
# Add Ubuntu Focal archive keys and repository # Add Ubuntu Focal archive keys and repository
- apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work - apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work
- apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 871920D1991BC93C 3B4FE6ACC0B21F32 - apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 871920D1991BC93C 3B4FE6ACC0B21F32
- echo 'deb http://archive.ubuntu.com/ubuntu/ focal main restricted' > /etc/apt/sources.list.d/ubuntu.list - echo "deb http://archive.ubuntu.com/ubuntu/ focal main restricted" > /etc/apt/sources.list.d/ubuntu.list
- apt-get update - apt-get update
# First install often fail due to bug in mysql-8.0 # First install often fail due to bug in mysql-8.0
- apt-get install -y mysql-server 'libmysqlc*' || true - apt-get install -y mysql-server 'libmysqlc*' || true
- sleep 10 && apt-get install -f - sleep 10 && apt-get install -f
- *test-verify-initial - *test-verify-initial
# Enable backports to make galera-4 available # Enable backports to make galera-4 available
- echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list && apt-get update - echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list && apt-get update
- *test-install - *test-install
- service mysql status - service mysql status
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
@ -586,12 +555,11 @@ mysql-8.0 Focal to mariadb-10.8 upgrade:
variables: variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mariadb.org-10.6 to mariadb-10.8 upgrade:
mariadb.org-10.5 to mariadb-10.8 upgrade:
stage: upgrade extras stage: upgrade extras
needs: needs:
- job: build - job: build
image: debian:sid image: debian:${RELEASE}
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
@ -601,15 +569,12 @@ mariadb.org-10.5 to mariadb-10.8 upgrade:
- *test-prepare-container - *test-prepare-container
- apt install -y curl - apt install -y curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo 'deb http://mirror.one.com/mariadb/repo/10.5/debian sid main' > /etc/apt/sources.list.d/mariadb.list - echo "deb https://deb.mariadb.org/10.6/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
# The 10.5.9 release is missing mariadb-plugin-columnstore, define all other packages but it to avoid hitting the error:
# The following packages have unmet dependencies:
# mariadb-plugin-columnstore : Depends: mariadb-server-10.5 (= 1:10.5.8+maria~sid) but 1:10.5.9+maria~sid is to be installed
- apt-get install -y libmariadb3 'libmariadb-*' 'libmariadbd*' 'mariadb-c*' 'mariadb-b*' 'mariadb-s*' 'mariadb-t*' 'mariadb-plugin-con*' 'mariadb-plugin-cr*' 'mariadb-plugin-g*' 'mariadb-plugin-m*' 'mariadb-plugin-o*' 'mariadb-plugin-s*'
# Once 10.5.10 is out, revert back to:
# Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Sid, so cannot use wildcard that would include it # Package libmariadbclient-dev from mariadb.org conflicts with libmariadb-dev in Sid, so cannot use wildcard that would include it
#- apt-get install -y 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*' # Enable this line when there is a way to install them only from the mariadb.org repo
# - apt-get install -y 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*'
- apt-get install -y mariadb-server-10.6
- *test-verify-initial - *test-verify-initial
# Install MariaDB built in this commit # Install MariaDB built in this commit
# Force downgrades so our version installs on top of upstream revision, e.g. 1:10.5.5-1 vs 1:10.5.5+mariadb~sid # Force downgrades so our version installs on top of upstream revision, e.g. 1:10.5.5-1 vs 1:10.5.5+mariadb~sid
@ -617,6 +582,41 @@ mariadb.org-10.5 to mariadb-10.8 upgrade:
# Verify installation of MariaDB built in this commit # Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version - mariadb --version # Client version
- service mariadb status # There is no init.d/mysql in MariaDB 10.8
- *test-verify-final
variables:
GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
allow_failure: true
# Installation on Sid fails on missing liburing1 because upstream 10.8
# MariaDB.org buildbot has not run 'apt upgrade' for a long time.
# Remove this allow_failure once buildbot has built a new 10.8
# release using latest liburing-dev in Debian Sid.
mariadb.org-10.5 to mariadb-10.8 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 install -y curl
- 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.5/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list
- apt-get update
- apt-get install -y mariadb-server-10.5
- *test-verify-initial
# Install MariaDB built in this commit
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mariadb status # There is no init.d/mysql in MariaDB 10.5 - service mariadb status # There is no init.d/mysql in MariaDB 10.5
- *test-verify-final - *test-verify-final
variables: variables:
@ -629,7 +629,7 @@ mariadb.org-10.4 to mariadb-10.8 upgrade:
stage: upgrade extras stage: upgrade extras
needs: needs:
- job: build - job: build
image: debian:sid image: debian:${RELEASE}
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
@ -639,8 +639,9 @@ mariadb.org-10.4 to mariadb-10.8 upgrade:
- *test-prepare-container - *test-prepare-container
- apt install -y curl systemctl # systemctl shim needed on platforms that don't have systemd - apt install -y curl systemctl # systemctl shim needed on platforms that don't have systemd
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo 'deb http://mirror.one.com/mariadb/repo/10.4/debian sid main' > /etc/apt/sources.list.d/mariadb.list - echo "deb https://deb.mariadb.org/10.4/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- *test-install-readline-in-sid-for-backwards-compat
- apt-get install -y mariadb-server-10.4 - 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 # MariaDB.org version of 10.4 and early 10.5 do not install an init file, so
# it must be installed here manually # it must be installed here manually
@ -661,7 +662,7 @@ mariadb.org-10.3 to mariadb-10.8 upgrade:
stage: upgrade extras stage: upgrade extras
needs: needs:
- job: build - job: build
image: debian:sid image: debian:${RELEASE}
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
@ -671,20 +672,16 @@ mariadb.org-10.3 to mariadb-10.8 upgrade:
- *test-prepare-container - *test-prepare-container
- apt install -y curl - apt install -y curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo 'deb http://mirror.one.com/mariadb/repo/10.3/debian sid main' > /etc/apt/sources.list.d/mariadb.list - echo "deb https://deb.mariadb.org/10.3/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- *test-install-readline-in-sid-for-backwards-compat
- apt-get install -y mariadb-server-10.3 - apt-get install -y mariadb-server-10.3
# Verify initial state before upgrade - *test-verify-initial
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
# prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.510.3
- mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql
- *test-install - *test-install
- service mysql status - service mysql status
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server # Give the mariadb-upgrade plenty of time to complete, otherwise next commands
# fail on non-existing mariadb.sys user
- sleep 15
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -696,7 +693,7 @@ mariadb.org-10.2 to mariadb-10.8 upgrade:
stage: upgrade extras stage: upgrade extras
needs: needs:
- job: build - job: build
image: debian:sid image: debian:${RELEASE}
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
@ -706,20 +703,24 @@ mariadb.org-10.2 to mariadb-10.8 upgrade:
- *test-prepare-container - *test-prepare-container
- apt install -y curl - apt install -y curl
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
- echo 'deb http://mirror.one.com/mariadb/repo/10.2/debian sid main' > /etc/apt/sources.list.d/mariadb.list - echo "deb https://deb.mariadb.org/10.2/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- *test-install-readline-in-sid-for-backwards-compat
- apt-get install -y mariadb-server-10.2 - apt-get install -y mariadb-server-10.2
# Verify initial state before upgrade # Verify initial state before upgrade
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status - service mysql status
# prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.510.3 # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.510.3
- mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" - |
- echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost" mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SHOW DATABASES;"
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM mysql.plugin; SHOW PLUGINS" mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost;"
mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS;"
- *test-install - *test-install
- service mysql status - service mysql status
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server # Give the mariadb-upgrade plenty of time to complete, otherwise next commands
# fail on non-existing mariadb.sys user
- sleep 15
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -741,16 +742,16 @@ mysql.com-5.7 to mariadb-10.8 upgrade:
- *test-prepare-container - *test-prepare-container
- | - |
apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work
apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 8C718D3B5072E1F5 apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 467B942D3A79BD29
echo 'deb https://repo.mysql.com/apt/debian/ buster mysql-5.7' > /etc/apt/sources.list.d/mysql.list echo "deb https://repo.mysql.com/apt/debian/ buster mysql-5.7" > /etc/apt/sources.list.d/mysql.list
apt-get update apt-get update
apt-get install -y 'mysql*' 'libmysqlc*' apt-get install -y 'mysql*' 'libmysqlc*'
- *test-verify-initial - *test-verify-initial
# Enable backports to make galera-4 available # Enable backports to make galera-4 available
- echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/backports.list && apt-get update - echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update
- *test-install - *test-install
- service mysql status - service mysql status
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -773,16 +774,16 @@ percona-xtradb-5.7 to mariadb-10.8 upgrade (MDEV-22679):
- | - |
apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work apt-get install --no-install-recommends --yes gpg gpg-agent dirmngr ca-certificates # Bare minimal (<4MB) for apt-key to work
apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 9334A25F8507EFA5 apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 9334A25F8507EFA5
echo 'deb https://repo.percona.com/apt/ buster main' > /etc/apt/sources.list.d/mysql.list echo "deb https://repo.percona.com/apt/ buster main" > /etc/apt/sources.list.d/mysql.list
apt-get update apt-get update
apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client
- service mysql status - service mysql status
- *test-verify-initial - *test-verify-initial
# Enable backports to make galera-4 available # Enable backports to make galera-4 available
- echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/backports.list && apt-get update - echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && apt-get update
- *test-install - *test-install
- service mysql status - service mysql status
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - sleep 15 # Give the mysql_upgrade a bit of extra time to complete with MySQL 5.7 before querying the server
- *test-verify-final - *test-verify-final
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none

View file

@ -23,10 +23,10 @@ version-substvar-for-external-package libmariadbd-dev -> libmariadbclient-dev
# ColumnStore not used in Debian, safe to ignore. Reported upstream in https://jira.mariadb.org/browse/MDEV-24124 # ColumnStore not used in Debian, safe to ignore. Reported upstream in https://jira.mariadb.org/browse/MDEV-24124
source-is-missing storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2 source-is-missing storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2
# Must be fixed upstream # Must be fixed upstream
source-is-missing storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.js * source-is-missing storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.js*
# Intentional control relationships # Intentional control relationships
version-substvar-for-external-package Replaces (line 216) ${source:Version} libmariadbd-dev -> libmariadbclient-dev version-substvar-for-external-package Replaces * ${source:Version} libmariadbd-dev -> libmariadbclient-dev
version-substvar-for-external-package Replaces (line 66) ${source:Version} libmariadb-dev -> libmysqlclient-dev version-substvar-for-external-package Replaces * ${source:Version} libmariadb-dev -> libmysqlclient-dev
version-substvar-for-external-package Replaces (line 66) ${source:Version} libmariadb-dev -> libmysqld-dev version-substvar-for-external-package Replaces * ${source:Version} libmariadb-dev -> libmysqld-dev
# We can't change build dependencies on a stable branch (10.5..10.8) so just override this # We can't change build dependencies on a stable branch (10.5..10.8) so just override this
missing-build-dependency-for-dh-addon systemd * missing-build-dependency-for-dh-addon systemd *

View file

@ -3,8 +3,12 @@ Tests: smoke
# for its existence (see the list in debian/control), install it if available # for its existence (see the list in debian/control), install it if available
# and check in the test if it's functional when it should be. # and check in the test if it's functional when it should be.
# The plugin package also already depends on the other one. # The plugin package also already depends on the other one.
Depends: mariadb-plugin-rocksdb | mariadb-server-10.8 Depends: mariadb-plugin-rocksdb | mariadb-server-10.8,
Restrictions: allow-stderr needs-root isolation-container mariadb-plugin-provider-bzip2,
mariadb-plugin-provider-lz4,
mariadb-plugin-provider-lzma,
mariadb-plugin-provider-lzo,
mariadb-plugin-provider-snappy
Tests: upstream Tests: upstream
Depends: mariadb-test, eatmydata Depends: mariadb-test, eatmydata

13
debian/tests/smoke vendored
View file

@ -38,6 +38,11 @@ else
# If systemd (and systemctl) is available, but the service did not start, then # If systemd (and systemctl) is available, but the service did not start, then
# this smoke test is supposed to fail if next commands don't work. # this smoke test is supposed to fail if next commands don't work.
echo "Found systemctl, continuing smoke test.." echo "Found systemctl, continuing smoke test.."
# Compression plugins are separated from main server package
# to own packages (for example LZ4 package mariadb-plugin-provider-lz4)
# and they are installed after mariadb-server.
# which means that they don't exist if MariaDB is not restarted
systemctl restart mariadb
fi fi
mysql <<EOT mysql <<EOT
@ -71,10 +76,10 @@ EOT
# but disabled with '#' the options that are not available in this binary build # but disabled with '#' the options that are not available in this binary build
mariadb <<EOT mariadb <<EOT
SET GLOBAL innodb_compression_algorithm=lz4; SET GLOBAL innodb_compression_algorithm=lz4;
#SET GLOBAL innodb_compression_algorithm=lzo; SET GLOBAL innodb_compression_algorithm=lzo;
#SET GLOBAL innodb_compression_algorithm=lzma; SET GLOBAL innodb_compression_algorithm=lzma;
#SET GLOBAL innodb_compression_algorithm=bzip2; SET GLOBAL innodb_compression_algorithm=bzip2;
#SET GLOBAL innodb_compression_algorithm=snappy; SET GLOBAL innodb_compression_algorithm=snappy;
SET GLOBAL innodb_compression_algorithm=zlib; SET GLOBAL innodb_compression_algorithm=zlib;
SET GLOBAL innodb_compression_algorithm=none; SET GLOBAL innodb_compression_algorithm=none;
EOT EOT

View file

@ -8913,3 +8913,15 @@ ERROR 42000: Incorrect usage/placement of 'HIGH_PRIORITY'
# #
# End of 10.4 tests # End of 10.4 tests
# #
#
# MDEV-28129: MariaDB UAF issue at lex_end_nops(LEX*)
#
CREATE PROCEDURE sp() SELECT 1 INTO @;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
CREATE PROCEDURE sp() SET @=1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=1' at line 1
CREATE PROCEDURE sp() SELECT @;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
#
# End of 10.7 tests
#

View file

@ -10484,3 +10484,20 @@ DELIMITER ;$$
--echo # --echo #
--echo # End of 10.4 tests --echo # End of 10.4 tests
--echo # --echo #
--echo #
--echo # MDEV-28129: MariaDB UAF issue at lex_end_nops(LEX*)
--echo #
--error ER_PARSE_ERROR
CREATE PROCEDURE sp() SELECT 1 INTO @;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp() SET @=1;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp() SELECT @;
--echo #
--echo # End of 10.7 tests
--echo #

View file

@ -250,3 +250,21 @@ LOCK TABLES t1 WRITE,t2 WRITE;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1);
DROP TABLE t2, t1; DROP TABLE t2, t1;
#
# MDEV-28138 MariaDB Assertion Failed in mtr_buf_t::has_space
#
CREATE TABLE t1(
f1 SERIAL,
f2 LINESTRING NOT NULL DEFAULT LineFromText('LINESTRING(1 1,2 2,3 3)'),
SPATIAL INDEX(f2))ENGINE=InnoDB;
INSERT INTO t1(f1) VALUES(0), (1), (2);
ERROR 23000: Duplicate entry '1' for key 'f1'
DROP TABLE t1;
#
# MDEV-28237 Assertion `0' failed in row_upd_sec_index_entry on DELETE
#
CREATE TABLE t1 (c0 YEAR UNIQUE) ENGINE=InnoDB;
INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(0),(0);
ERROR HY000: Got error 1 "Operation not permitted" during COMMIT
DELETE FROM t1;
DROP TABLE t1;

View file

@ -261,3 +261,23 @@ LOCK TABLES t1 WRITE,t2 WRITE;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1);
DROP TABLE t2, t1; DROP TABLE t2, t1;
--echo #
--echo # MDEV-28138 MariaDB Assertion Failed in mtr_buf_t::has_space
--echo #
CREATE TABLE t1(
f1 SERIAL,
f2 LINESTRING NOT NULL DEFAULT LineFromText('LINESTRING(1 1,2 2,3 3)'),
SPATIAL INDEX(f2))ENGINE=InnoDB;
--error ER_DUP_ENTRY
INSERT INTO t1(f1) VALUES(0), (1), (2);
DROP TABLE t1;
--echo #
--echo # MDEV-28237 Assertion `0' failed in row_upd_sec_index_entry on DELETE
--echo #
CREATE TABLE t1 (c0 YEAR UNIQUE) ENGINE=InnoDB;
--error ER_ERROR_DURING_COMMIT
INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(0),(0);
DELETE FROM t1;
DROP TABLE t1;

View file

@ -3,6 +3,6 @@ INSERT INTO t VALUES(1);
SHOW VARIABLES like 'log_bin'; SHOW VARIABLES like 'log_bin';
Variable_name Value Variable_name Value
log_bin ON log_bin ON
FOUND 1 /Last binlog file .*, position .*/ in current_test FOUND 1 /Last binlog file .+, position \d+/ in current_test
# expect FOUND # expect FOUND
DROP TABLE t; DROP TABLE t;

View file

@ -15,7 +15,7 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir
exec $XTRABACKUP --prepare --binlog-info=1 --target-dir=$basedir ; exec $XTRABACKUP --prepare --binlog-info=1 --target-dir=$basedir ;
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test; let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
--let SEARCH_PATTERN= Last binlog file .*, position .* --let SEARCH_PATTERN= Last binlog file .+, position \d+
--source include/search_pattern_in_file.inc --source include/search_pattern_in_file.inc
--echo # expect FOUND --echo # expect FOUND

View file

@ -236,6 +236,6 @@ maria_declare_plugin(password_reuse_check)
NULL, NULL,
sysvars, sysvars,
"1.0", "1.0",
MariaDB_PLUGIN_MATURITY_BETA MariaDB_PLUGIN_MATURITY_GAMMA
} }
maria_declare_plugin_end; maria_declare_plugin_end;

View file

@ -28,7 +28,7 @@ PLUGIN_TYPE FUNCTION
PLUGIN_AUTHOR MariaDB Corporation PLUGIN_AUTHOR MariaDB Corporation
PLUGIN_DESCRIPTION Function UUID() PLUGIN_DESCRIPTION Function UUID()
PLUGIN_LICENSE GPL PLUGIN_LICENSE GPL
PLUGIN_MATURITY Gamma PLUGIN_MATURITY Stable
PLUGIN_AUTH_VERSION 1.0 PLUGIN_AUTH_VERSION 1.0
# #
# End of 10.5 tests # End of 10.5 tests

View file

@ -24,7 +24,7 @@ PLUGIN_TYPE DATA TYPE
PLUGIN_AUTHOR MariaDB Corporation PLUGIN_AUTHOR MariaDB Corporation
PLUGIN_DESCRIPTION Data type UUID PLUGIN_DESCRIPTION Data type UUID
PLUGIN_LICENSE GPL PLUGIN_LICENSE GPL
PLUGIN_MATURITY Gamma PLUGIN_MATURITY Stable
PLUGIN_AUTH_VERSION 1.0 PLUGIN_AUTH_VERSION 1.0
# #
# End of 10.5 tests # End of 10.5 tests

View file

@ -87,7 +87,7 @@ maria_declare_plugin(type_uuid)
NULL, // Status variables NULL, // Status variables
NULL, // System variables NULL, // System variables
"1.0", // String version representation "1.0", // String version representation
MariaDB_PLUGIN_MATURITY_GAMMA // Maturity(see include/mysql/plugin.h)*/ MariaDB_PLUGIN_MATURITY_STABLE// Maturity(see include/mysql/plugin.h)*/
}, },
{ {
MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h) MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h)
@ -102,7 +102,7 @@ maria_declare_plugin(type_uuid)
NULL, // Status variables NULL, // Status variables
NULL, // System variables NULL, // System variables
"1.0", // String version representation "1.0", // String version representation
MariaDB_PLUGIN_MATURITY_GAMMA // Maturity(see include/mysql/plugin.h)*/ MariaDB_PLUGIN_MATURITY_STABLE// Maturity(see include/mysql/plugin.h)*/
}, },
{ {
MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h) MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h)
@ -117,6 +117,6 @@ maria_declare_plugin(type_uuid)
NULL, // Status variables NULL, // Status variables
NULL, // System variables NULL, // System variables
"1.0", // String version representation "1.0", // String version representation
MariaDB_PLUGIN_MATURITY_GAMMA // Maturity(see include/mysql/plugin.h)*/ MariaDB_PLUGIN_MATURITY_STABLE// Maturity(see include/mysql/plugin.h)*/
} }
maria_declare_plugin_end; maria_declare_plugin_end;

View file

@ -7017,7 +7017,8 @@ static int alter_close_table(ALTER_PARTITION_PARAM_TYPE *lpt)
static void handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt, static void handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt,
bool action_completed, bool action_completed,
bool drop_partition, bool drop_partition,
bool frm_install) bool frm_install,
bool reopen)
{ {
THD *thd= lpt->thd; THD *thd= lpt->thd;
partition_info *part_info= lpt->part_info->get_clone(thd); partition_info *part_info= lpt->part_info->get_clone(thd);
@ -7061,6 +7062,9 @@ static void handle_alter_part_error(ALTER_PARTITION_PARAM_TYPE *lpt,
close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED, NULL); close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED, NULL);
} }
if (!reopen)
DBUG_VOID_RETURN;
if (part_info->list && if (part_info->list &&
ddl_log_execute_entry(thd, part_info->list->entry_pos)) ddl_log_execute_entry(thd, part_info->list->entry_pos))
{ {
@ -7491,7 +7495,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
thd->query(), thd->query_length()), FALSE)) || thd->query(), thd->query_length()), FALSE)) ||
ERROR_INJECT("drop_partition_9")) ERROR_INJECT("drop_partition_9"))
{ {
handle_alter_part_error(lpt, action_completed, TRUE, frm_install); handle_alter_part_error(lpt, action_completed, TRUE, frm_install, true);
goto err; goto err;
} }
if (alter_partition_lock_handling(lpt)) if (alter_partition_lock_handling(lpt))
@ -7527,9 +7531,12 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
(thd->binlog_xid= 0))) || (thd->binlog_xid= 0))) ||
ERROR_INJECT("convert_partition_9")) ERROR_INJECT("convert_partition_9"))
{ {
DDL_LOG_STATE main_state= *lpt->part_info;
handle_alter_part_error(lpt, true, true, false, false);
ddl_log_complete(&chain_drop_backup); ddl_log_complete(&chain_drop_backup);
(void) ddl_log_revert(thd, lpt->part_info); (void) ddl_log_revert(thd, &main_state);
handle_alter_part_error(lpt, true, true, false); if (thd->locked_tables_mode)
thd->locked_tables_list.reopen_tables(thd, false);
goto err; goto err;
} }
ddl_log_complete(lpt->part_info); ddl_log_complete(lpt->part_info);
@ -7576,9 +7583,12 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
(thd->binlog_xid= 0))) || (thd->binlog_xid= 0))) ||
ERROR_INJECT("convert_partition_9")) ERROR_INJECT("convert_partition_9"))
{ {
DDL_LOG_STATE main_state= *lpt->part_info;
handle_alter_part_error(lpt, true, true, false, false);
ddl_log_complete(&chain_drop_backup); ddl_log_complete(&chain_drop_backup);
(void) ddl_log_revert(thd, lpt->part_info); (void) ddl_log_revert(thd, &main_state);
handle_alter_part_error(lpt, true, true, false); if (thd->locked_tables_mode)
thd->locked_tables_list.reopen_tables(thd, false);
goto err; goto err;
} }
ddl_log_complete(lpt->part_info); ddl_log_complete(lpt->part_info);
@ -7650,7 +7660,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
thd->query(), thd->query_length()), FALSE)) || thd->query(), thd->query_length()), FALSE)) ||
ERROR_INJECT("add_partition_10")) ERROR_INJECT("add_partition_10"))
{ {
handle_alter_part_error(lpt, action_completed, FALSE, frm_install); handle_alter_part_error(lpt, action_completed, FALSE, frm_install, true);
goto err; goto err;
} }
if (alter_partition_lock_handling(lpt)) if (alter_partition_lock_handling(lpt))
@ -7743,7 +7753,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
thd->query(), thd->query_length()), FALSE)) || thd->query(), thd->query_length()), FALSE)) ||
ERROR_INJECT("change_partition_12")) ERROR_INJECT("change_partition_12"))
{ {
handle_alter_part_error(lpt, action_completed, FALSE, frm_install); handle_alter_part_error(lpt, action_completed, FALSE, frm_install, true);
goto err; goto err;
} }
if (alter_partition_lock_handling(lpt)) if (alter_partition_lock_handling(lpt))

View file

@ -3558,7 +3558,7 @@ simple_target_specification:
if (!$2.length) if (!$2.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$= new (thd->mem_root) Item_func_get_user_var(thd, &$2); $$= new (thd->mem_root) Item_func_get_user_var(thd, &$2);
if (unlikely($$ == NULL)) if (unlikely($$ == NULL))
@ -10961,7 +10961,7 @@ variable_aux:
if (!$1.length) if (!$1.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$= item= new (thd->mem_root) Item_func_set_user_var(thd, &$1, $3); $$= item= new (thd->mem_root) Item_func_set_user_var(thd, &$1, $3);
if (unlikely($$ == NULL)) if (unlikely($$ == NULL))
@ -10975,7 +10975,7 @@ variable_aux:
if (!$1.length) if (!$1.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$= new (thd->mem_root) Item_func_get_user_var(thd, &$1); $$= new (thd->mem_root) Item_func_get_user_var(thd, &$1);
if (unlikely($$ == NULL)) if (unlikely($$ == NULL))
@ -12613,7 +12613,7 @@ select_outvar:
if (!$2.length) if (!$2.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$ = Lex->result ? new (thd->mem_root) my_var_user(&$2) : NULL; $$ = Lex->result ? new (thd->mem_root) my_var_user(&$2) : NULL;
@ -14604,7 +14604,7 @@ field_or_var:
if (!$2.length) if (!$2.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
$$= new (thd->mem_root) Item_user_var_as_out_param(thd, &$2); $$= new (thd->mem_root) Item_user_var_as_out_param(thd, &$2);
@ -16425,7 +16425,7 @@ option_value_no_option_type:
if (!$2.length) if (!$2.length)
{ {
thd->parse_error(); thd->parse_error();
YYABORT; MYSQL_YYABORT;
} }
if (sp_create_assignment_lex(thd, $1.str)) if (sp_create_assignment_lex(thd, $1.str))

View file

@ -387,7 +387,8 @@ ENDIF()
# s390x because of the way it defines the high level intrinsics # s390x because of the way it defines the high level intrinsics
# as not-inline in the header file can only be included by one # as not-inline in the header file can only be included by one
# source file that has -mhtm enabled. # source file that has -mhtm enabled.
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64|s390x") IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64|s390x"
OR CMAKE_SYSTEM_NAME MATCHES "AIX")
ADD_COMPILE_FLAGS( ADD_COMPILE_FLAGS(
sync/srw_lock.cc sync/srw_lock.cc
COMPILE_FLAGS "-mhtm" COMPILE_FLAGS "-mhtm"

View file

@ -16953,6 +16953,10 @@ innobase_xa_prepare(
SQL statement */ SQL statement */
trx_mark_sql_stat_end(trx); trx_mark_sql_stat_end(trx);
if (UNIV_UNLIKELY(trx->error_state != DB_SUCCESS)) {
trx_rollback_for_mysql(trx);
return 1;
}
} }
if (thd_sql_command(thd) != SQLCOM_XA_PREPARE if (thd_sql_command(thd) != SQLCOM_XA_PREPARE

View file

@ -2388,6 +2388,16 @@ public:
static dict_table_t *create(const span<const char> &name, fil_space_t *space, static dict_table_t *create(const span<const char> &name, fil_space_t *space,
ulint n_cols, ulint n_v_cols, ulint flags, ulint n_cols, ulint n_v_cols, ulint flags,
ulint flags2); ulint flags2);
/** Check whether the table has any spatial indexes */
bool has_spatial_index() const
{
for (auto i= UT_LIST_GET_FIRST(indexes);
(i= UT_LIST_GET_NEXT(indexes, i)) != nullptr; )
if (i->is_spatial())
return true;
return false;
}
}; };
inline void dict_index_t::set_modified(mtr_t& mtr) const inline void dict_index_t::set_modified(mtr_t& mtr) const

View file

@ -333,22 +333,19 @@ typedef ssize_t lint;
#ifdef _WIN32 #ifdef _WIN32
/* Use the integer types and formatting strings defined in Visual Studio. */ /* Use the integer types and formatting strings defined in Visual Studio. */
# define UINT32PF "%u" # define UINT32PF "%u"
# define INT64PF "%lld"
# define UINT64scan "llu" # define UINT64scan "llu"
# define UINT64PFx "%016llx" # define UINT64PFx "%016llx"
#elif defined __APPLE__ #elif defined __APPLE__
/* Apple prefers to call the 64-bit types 'long long' /* Apple prefers to call the 64-bit types 'long long'
in both 32-bit and 64-bit environments. */ in both 32-bit and 64-bit environments. */
# define UINT32PF "%" PRIu32 # define UINT32PF "%" PRIu32
# define INT64PF "%lld"
# define UINT64scan "llu" # define UINT64scan "llu"
# define UINT64PFx "%016llx" # define UINT64PFx "%016llx"
#elif defined _AIX #elif defined _AIX
/* Workaround for macros expension trouble */ /* Workaround for macros expension trouble */
# define UINT32PF "%u" # define UINT32PF "%u"
# define INT64PF "%lld"
# define UINT64scan "lu" # define UINT64scan "lu"
# define UINT64PFx "%016llx" # define UINT64PFx "%016lx"
#else #else
/* Use the integer types and formatting strings defined in the C99 standard. */ /* Use the integer types and formatting strings defined in the C99 standard. */
# define UINT32PF "%" PRIu32 # define UINT32PF "%" PRIu32

View file

@ -2641,6 +2641,7 @@ commit_exit:
&& block->page.id().page_no() == index->page && block->page.id().page_no() == index->page
&& !index->table->skip_alter_undo && !index->table->skip_alter_undo
&& !index->table->n_rec_locks && !index->table->n_rec_locks
&& !index->table->has_spatial_index()
&& !trx->is_wsrep() /* FIXME: MDEV-24623 */ && !trx->is_wsrep() /* FIXME: MDEV-24623 */
&& !thd_is_slave(trx->mysql_thd) /* FIXME: MDEV-24622 */) { && !thd_is_slave(trx->mysql_thd) /* FIXME: MDEV-24622 */) {
DEBUG_SYNC_C("empty_root_page_insert"); DEBUG_SYNC_C("empty_root_page_insert");

View file

@ -1210,10 +1210,9 @@ dberr_t srv_start(bool create_new_db)
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
return srv_init_abort(err); return srv_init_abort(err);
} }
if (srv_operation == SRV_OPERATION_RESTORE) { if (srv_operation != SRV_OPERATION_RESTORE) {
break; dict_sys.load_sys_tables();
} }
dict_sys.load_sys_tables();
err = trx_lists_init_at_db_start(); err = trx_lists_init_at_db_start();
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
return srv_init_abort(err); return srv_init_abort(err);

View file

@ -14,7 +14,7 @@ connection master_1;
CREATE DATABASE auto_test_local; CREATE DATABASE auto_test_local;
USE auto_test_local; USE auto_test_local;
# MDEV-27923 Deprecate spider_use_handler # MDEV-27923 Deprecate spider_use_handler
SET spider_use_handler= 3; SET spider_use_handler = 3;
Warnings: Warnings:
Warning 1287 '@@spider_use_handler' is deprecated and will be removed in a future release Warning 1287 '@@spider_use_handler' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_use_handler"; SHOW VARIABLES LIKE "spider_use_handler";
@ -26,6 +26,37 @@ Warning 1287 The table parameter 'uhd' is deprecated and will be removed in a fu
CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='use_handler "3"'; CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='use_handler "3"';
Warnings: Warnings:
Warning 1287 The table parameter 'use_handler' is deprecated and will be removed in a future release Warning 1287 The table parameter 'use_handler' is deprecated and will be removed in a future release
# MDEV-28005 Deprecate Spider plugin variables regarding UDFs
SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
Warnings:
Warning 1287 '@@spider_udf_ds_bulk_insert_rows' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows";
Variable_name Value
spider_udf_ds_bulk_insert_rows -1
SET spider_udf_ds_table_loop_mode = 1;
Warnings:
Warning 1287 '@@spider_udf_ds_table_loop_mode' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode";
Variable_name Value
spider_udf_ds_table_loop_mode 1
SET spider_udf_ds_use_real_table = 1;
Warnings:
Warning 1287 '@@spider_udf_ds_use_real_table' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ds_use_real_table";
Variable_name Value
spider_udf_ds_use_real_table 1
SET GLOBAL spider_udf_ct_bulk_insert_interval = 1;
Warnings:
Warning 1287 '@@spider_udf_ct_bulk_insert_interval' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval";
Variable_name Value
spider_udf_ct_bulk_insert_interval 1
SET GLOBAL spider_udf_ct_bulk_insert_rows = 1;
Warnings:
Warning 1287 '@@spider_udf_ct_bulk_insert_rows' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
Variable_name Value
spider_udf_ct_bulk_insert_rows 1
DROP DATABASE auto_test_local; DROP DATABASE auto_test_local;
for master_1 for master_1
for child2 for child2

View file

@ -13,11 +13,27 @@ CREATE DATABASE auto_test_local;
USE auto_test_local; USE auto_test_local;
--echo # MDEV-27923 Deprecate spider_use_handler --echo # MDEV-27923 Deprecate spider_use_handler
SET spider_use_handler= 3; SET spider_use_handler = 3;
SHOW VARIABLES LIKE "spider_use_handler"; SHOW VARIABLES LIKE "spider_use_handler";
eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='uhd "3"'; eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='uhd "3"';
eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='use_handler "3"'; eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='use_handler "3"';
--echo # MDEV-28005 Deprecate Spider plugin variables regarding UDFs
SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows";
SET spider_udf_ds_table_loop_mode = 1;
SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode";
SET spider_udf_ds_use_real_table = 1;
SHOW VARIABLES LIKE "spider_udf_ds_use_real_table";
SET GLOBAL spider_udf_ct_bulk_insert_interval = 1;
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval";
SET GLOBAL spider_udf_ct_bulk_insert_rows = 1;
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
DROP DATABASE auto_test_local; DROP DATABASE auto_test_local;
--disable_query_log --disable_query_log

View file

@ -2039,7 +2039,7 @@ uint spider_param_udf_table_mon_mutex_count()
*/ */
static MYSQL_THDVAR_LONGLONG( static MYSQL_THDVAR_LONGLONG(
udf_ds_bulk_insert_rows, /* name */ udf_ds_bulk_insert_rows, /* name */
PLUGIN_VAR_RQCMDARG, /* opt */ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
"Number of rows for bulk inserting", /* comment */ "Number of rows for bulk inserting", /* comment */
NULL, /* check */ NULL, /* check */
NULL, /* update */ NULL, /* update */
@ -2066,7 +2066,7 @@ longlong spider_param_udf_ds_bulk_insert_rows(
*/ */
static MYSQL_THDVAR_INT( static MYSQL_THDVAR_INT(
udf_ds_table_loop_mode, /* name */ udf_ds_table_loop_mode, /* name */
PLUGIN_VAR_RQCMDARG, /* opt */ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
"Table loop mode if the number of tables in table list are less than the number of result sets", /* comment */ "Table loop mode if the number of tables in table list are less than the number of result sets", /* comment */
NULL, /* check */ NULL, /* check */
NULL, /* update */ NULL, /* update */
@ -2423,7 +2423,7 @@ static int spider_udf_ct_bulk_insert_interval;
static MYSQL_SYSVAR_INT( static MYSQL_SYSVAR_INT(
udf_ct_bulk_insert_interval, udf_ct_bulk_insert_interval,
spider_udf_ct_bulk_insert_interval, spider_udf_ct_bulk_insert_interval,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED,
"The interval time between bulk insert and next bulk insert at coping", "The interval time between bulk insert and next bulk insert at coping",
NULL, NULL,
NULL, NULL,
@ -2449,7 +2449,7 @@ static longlong spider_udf_ct_bulk_insert_rows;
static MYSQL_SYSVAR_LONGLONG( static MYSQL_SYSVAR_LONGLONG(
udf_ct_bulk_insert_rows, udf_ct_bulk_insert_rows,
spider_udf_ct_bulk_insert_rows, spider_udf_ct_bulk_insert_rows,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED,
"The number of rows inserted with bulk insert of one time at coping", "The number of rows inserted with bulk insert of one time at coping",
NULL, NULL,
NULL, NULL,
@ -2689,7 +2689,7 @@ int spider_param_bulk_access_free(
*/ */
static MYSQL_THDVAR_INT( static MYSQL_THDVAR_INT(
udf_ds_use_real_table, /* name */ udf_ds_use_real_table, /* name */
PLUGIN_VAR_RQCMDARG, /* opt */ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
"Use real table for temporary table list", /* comment */ "Use real table for temporary table list", /* comment */
NULL, /* check */ NULL, /* check */
NULL, /* update */ NULL, /* update */