Commit ecb1b872 authored by Otto Kekäläinen's avatar Otto Kekäläinen

Salsa-CI: Copy most of Salsa-CI from Debian 10.5

- Use new Salsa-CI templates just like downstream does
- Also apply adaptations needed for native MariaDB to
  build correctly on Salsa-CI
- Adapt for mysql-8.0 now in Debian Sid, keep also mysql-5.7 test
- Test TLSv1.3 to ensure it does not regress
- Remove Snappy compression from autopkgtest as it not longer works
parent d1809097
# Inlude Salsa-CI as a base ---
# Include Salsa-CI as a base
include: include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
# Overridfe Salsa-CI with MariaDB specific variations # Override Salsa-CI with MariaDB specific variations
variables: variables:
DEB_BUILD_OPTIONS: "nocheck noautodbgsym" DEB_BUILD_OPTIONS: "nocheck noautodbgsym"
RELEASE: sid RELEASE: sid
...@@ -13,14 +14,16 @@ variables: ...@@ -13,14 +14,16 @@ variables:
SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 1 SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1 SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
SALSA_CI_GBP_BUILDPACKAGE_ARGS: "--git-submodules" # did not apply to extract-sources
stages: stages:
- provisioning
- build - build
- test - test
- upgrade in Sid - upgrade in Sid
- upgrade from Buster/Stretch/Jessie - upgrade from Buster/Stretch
- test extras
- upgrade extras - upgrade 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
build: build:
...@@ -37,6 +40,7 @@ build: ...@@ -37,6 +40,7 @@ build:
- debian/autobake-deb.sh |& tail -n 10000 # Keep Gitlab-CI output under 4 MB - debian/autobake-deb.sh |& tail -n 10000 # Keep Gitlab-CI output under 4 MB
- cd ..; rm -rfv *.tmp # Clean away build files not to store as artifacts - cd ..; rm -rfv *.tmp # Clean away build files not to store as artifacts
- cp -v *.* ${WORKING_DIR}/ - cp -v *.* ${WORKING_DIR}/
- rm -rf "${WORKING_DIR}/source_dir" # Remove excess source files
- du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB. - du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB.
- ccache -s # Show ccache stats to validate it worked - ccache -s # Show ccache stats to validate it worked
- mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} || true - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} || true
...@@ -55,20 +59,63 @@ build stretch-backports: ...@@ -55,20 +59,63 @@ build stretch-backports:
variables: variables:
RELEASE: stretch-backports RELEASE: stretch-backports
build native deb: # base image missing git
build i386:
extends: .build-package extends: .build-package
script: script:
- mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR} - apt-get update && apt-get install -y --no-install-recommends git
- mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR} - *autobake-deb-steps
# NOTE! --git-submodules needed despite GIT_SUBMODULE_STRATEGY since --git-export-dir is used image: $SALSA_CI_IMAGES_BASE_I386
- gbp buildpackage --git-submodules --git-ignore-branch --git-ignore-new --git-export-dir=${WORKING_DIR} --git-builder="docker-build.sh ${SALSA_CI_IMAGES_DOCKERBUILDER}" |& filter-output variables:
- du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB. ARCH: 'i386'
- mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} except:
allow_failure: true variables:
- $SALSA_CI_DISABLE_BUILD_PACKAGE_I386 =~ /^(1|yes|true)$/
build native deb:
extends: .build-package
script: &buildpackage-script |
mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR}
mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR}
export CCACHE_DIR=${CCACHE_TMP_DIR}
# Add deb-src entries
sed -n '/^deb\s/s//deb-src /p' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-src.list
apt-get update && eatmydata apt-get install --no-install-recommends -y \
aptitude \
devscripts \
ccache \
equivs \
build-essential \
python3
# Enter source package dir
cd ${WORKING_DIR}/${SOURCE_DIR}
# Install package build dependencies
eatmydata install-build-deps.sh .
# Generate ccache links
dpkg-reconfigure ccache
PATH="/usr/lib/ccache/:${PATH}"
# Reset ccache stats
ccache -z
# Create salsaci user and fix permissions
useradd salsaci
chown -R salsaci. ${WORKING_DIR} ${CCACHE_DIR}
# Define buildlog filename
BUILD_LOGFILE_SOURCE=$(dpkg-parsechangelog -S Source)
BUILD_LOGFILE_VERSION=$(dpkg-parsechangelog -S Version)
BUILD_LOGFILE_VERSION=${BUILD_LOGFILE_VERSION#*:}
BUILD_LOGFILE_ARCH=$(dpkg --print-architecture)
BUILD_LOGFILE="${WORKING_DIR}/${BUILD_LOGFILE_SOURCE}_${BUILD_LOGFILE_VERSION}_${BUILD_LOGFILE_ARCH}.build"
# Build package as user salsaci
su salsaci -c "eatmydata dpkg-buildpackage ${DB_BUILD_PARAM}" |& OUTPUT_FILENAME=${BUILD_LOGFILE} filter-output
# Restore PWD to ${WORKING_DIR}
cd ${WORKING_DIR}
rm -rf ${WORKING_DIR}/${SOURCE_DIR}
# Print ccache stats on job log
ccache -s
mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR}
autopkgtest: autopkgtest:
extends: .test-autopkgtest extends: .test-autopkgtest
allow_failure: true
piuparts: piuparts:
extends: .test-piuparts extends: .test-piuparts
...@@ -77,22 +124,75 @@ piuparts: ...@@ -77,22 +124,75 @@ piuparts:
blhc: blhc:
extends: .test-blhc extends: .test-blhc
stage: test extras stage: test extras
dependencies: needs:
- build native deb # Needs the correct debian/output/*.build - job: build native deb
allow_failure: true artifacts: true
# In addition to Salsa-CI, also run these fully MariaDB specific build jobs
lintian: # Define snippets used to construct jobs
extends: .test-lintian
missing-breaks: .test-prepare-container: &test-prepare-container |
extends: .test-missing-breaks cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
# Enable automatic restarts from maint scripts
sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d
# Fake /sbin/runlevel to avoid warnings of "invoke-rc.d: could not determine current runlevel"
echo -e '#!/bin/sh\necho "N 5"' > /sbin/runlevel; chmod +x /sbin/runlevel
# Avoid the warnings of "debconf: unable to initialize frontend: Dialog"
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Prime the apt cache so later apt commands can run
apt-get update
# In addition to Salsa-CI, also run these fully MariaDB specific build jobs .test-verify-initial: &test-verify-initial |
dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
service mysql status || service mariadb status # Early MariaDB 10.5 only had 'mariadb'
mysql --skip-column-names -e "select @@version, @@version_comment" # Show version
echo 'SHOW DATABASES;' | mysql # List databases before upgrade
mysql -e "SELECT Host, User, plugin,authentication_string FROM user;" mysql
mysql -e "SELECT * FROM plugin;" mysql
.test-enable-sid-repos: &test-enable-sid-repos |
# Replace any old repos with just Sid
echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list
# Upgrade minimal stack first
apt-get update
apt-get install -y apt
.test-install: &test-install |
# Install MariaDB built in this commit
apt-get install -y ./*.deb
# Verify installation of MariaDB built in this commit
dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
mariadb --version # Client version
.test-verify-final: &test-verify-final |
mkdir -p debug # Ensure dir exists before using it
find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
cp -ra /etc/mysql debug/etc-mysql
cp -ra /var/log/mysql debug/var-log-mysql
mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
echo 'SHOW DATABASES;' | mariadb # List databases
mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test that InnoDB works
mariadb -e "SELECT Host, User, plugin,authentication_string FROM user;" mysql
mariadb -e "SELECT * FROM plugin;" mysql
.test-verify-libs: &test-verify-libs
# Don't use a collapsed command as Gitlab-CI would hide each command from the output
- ldconfig -p | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
- apt-get install -y --no-install-recommends g++
.test-install-all-libs: &test-install-all-libs
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb
fresh install: fresh install:
stage: test stage: test
dependencies: needs:
- build - job: build
artifacts: true
image: debian:${RELEASE} image: debian:${RELEASE}
artifacts: artifacts:
when: always when: always
...@@ -100,72 +200,43 @@ fresh install: ...@@ -100,72 +200,43 @@ fresh install:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - *test-install
- apt-get update
# Install MariaDB built in this commit
- apt-get install -y ./*.deb
# 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
- mkdir -p debug # Ensure dir exists before using it - *test-verify-final
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
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.3.x to mariadb-10.5.y upgrade: mariadb-10.5 Sid upgrade:
stage: upgrade in Sid stage: upgrade in Sid
dependencies: needs:
- build - job: build
image: debian:sid artifacts: true
image: debian:${RELEASE}
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - *test-install
- apt-get update - service mariadb status # There is no init.d/mysql in MariaDB 10.5
# Install almost everything currently in Debian Sid - *test-verify-final
- apt-get install -y 'default-mysql*' 'mariadb-*' libmariadb3 'libmariadb-*' 'libmariadbd*' 'libmariadbclient-*'
# Verify installation of MariaDB currently in Debian Sid
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status
- mariadb --skip-column-names -e "select @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- apt-get install -o Dpkg::Options::=--force-confnew -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
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.3.x buster to mariadb-10.5 upgrade: mariadb-10.3 Buster to mariadb-10.5 upgrade:
stage: upgrade from Buster/Stretch/Jessie stage: upgrade from Buster/Stretch
dependencies: needs:
- build - job: build
artifacts: true
image: debian:buster image: debian:buster
artifacts: artifacts:
when: always when: always
...@@ -173,43 +244,26 @@ mariadb-10.3.x buster to mariadb-10.5 upgrade: ...@@ -173,43 +244,26 @@ mariadb-10.3.x buster to mariadb-10.5 upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output # Install everything MariaDB currently in Debian Buster
- apt-get update - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
# Install almost everything currently in Debian Buster
- apt-get install -y 'default-mysql*' 'mariadb-*' libmariadb3 'libmariadb-*' 'libmariadbd*' 'libmariadbclient-*'
# Verify installation of MariaDB from Buster # Verify installation of MariaDB from Buster
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - *test-verify-initial
- *test-enable-sid-repos
- *test-install
- service mysql status - service mysql status
- mysql --skip-column-names -e "select @@version, @@version_comment" - *test-verify-final
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- sed 's/buster/sid/g' -i /etc/apt/sources.list # Enable next Debian release
- sed '/sid-updates/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- sed '/security/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- apt-get update; apt-get install -y apt # Uprade minimal stack first
- apt-get install -o Dpkg::Options::=--force-confnew -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
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 to mariadb-10.5 upgrade: mariadb-10.1 Stretch to mariadb-10.5 upgrade:
stage: upgrade from Buster/Stretch/Jessie stage: upgrade from Buster/Stretch
dependencies: needs:
- build - job: build
artifacts: true
image: debian:stretch image: debian:stretch
artifacts: artifacts:
when: always when: always
...@@ -217,33 +271,16 @@ mariadb-10.1 to mariadb-10.5 upgrade: ...@@ -217,33 +271,16 @@ mariadb-10.1 to mariadb-10.5 upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output # Install almost everything currently in Debian Stretch,
- apt-get update # omitting libmariadbclient-dev-compat as it would conflict
# Install almost everything currently in Debian Stretch
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*' - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*'
# Verify installation of MariaDB from Stretch # Verify installation of MariaDB from Buster
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - *test-verify-initial
- service mysql status - *test-enable-sid-repos
- mysql --skip-column-names -e "select @@version, @@version_comment" - *test-install
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- sed 's/stretch/sid/g' -i /etc/apt/sources.list # Enable next Debian release
- sed '/sid-updates/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- sed '/security/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- apt-get update; apt-get install -y apt # Uprade minimal stack first
- apt-get install -o Dpkg::Options::=--force-confnew -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status - service mysql status
- mkdir -p debug # Ensure dir exists before using it - *test-verify-final
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
...@@ -252,8 +289,9 @@ mariadb-10.1 to mariadb-10.5 upgrade: ...@@ -252,8 +289,9 @@ mariadb-10.1 to mariadb-10.5 upgrade:
test basic features: test basic features:
stage: test stage: test
dependencies: needs:
- build - job: build
artifacts: true
image: debian:${RELEASE} image: debian:${RELEASE}
artifacts: artifacts:
when: always when: always
...@@ -261,44 +299,70 @@ test basic features: ...@@ -261,44 +299,70 @@ test basic features:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - *test-install
- apt-get update
# Install MariaDB built in this commit
- apt-get install -y ./*.deb
# 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
- mkdir -p debug # Ensure dir exists before using it - *test-verify-final
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory" - |
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- echo 'SHOW DATABASES;' | mariadb # List databases
# Print info about server # Print info about server
- mariadb --skip-column-names -e "select @@version, @@version_comment" mariadb --skip-column-names -e "select @@version, @@version_comment"
- mariadb --skip-column-names -e "select engine, support, transactions, savepoints from information_schema.engines order by engine" | sort mariadb --skip-column-names -e "select engine, support, transactions, savepoints from information_schema.engines order by engine" | sort
- mariadb --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins order by plugin_name, plugin_library" mariadb --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins order by plugin_name, plugin_library"
# Test various features # Test various features
- mariadb -e "CREATE DATABASE db" mariadb -e "CREATE DATABASE db"
- mariadb -e "CREATE TABLE db.t_innodb(a1 SERIAL, c1 CHAR(8)) ENGINE=InnoDB; INSERT INTO db.t_innodb VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" mariadb -e "CREATE TABLE db.t_innodb(a1 SERIAL, c1 CHAR(8)) ENGINE=InnoDB; INSERT INTO db.t_innodb VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
- mariadb -e "CREATE TABLE db.t_myisam(a2 SERIAL, c2 CHAR(8)) ENGINE=MyISAM; INSERT INTO db.t_myisam VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" mariadb -e "CREATE TABLE db.t_myisam(a2 SERIAL, c2 CHAR(8)) ENGINE=MyISAM; INSERT INTO db.t_myisam VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
- mariadb -e "CREATE TABLE db.t_aria(a3 SERIAL, c3 CHAR(8)) ENGINE=Aria; INSERT INTO db.t_aria VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" mariadb -e "CREATE TABLE db.t_aria(a3 SERIAL, c3 CHAR(8)) ENGINE=Aria; INSERT INTO db.t_aria VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
- mariadb -e "CREATE TABLE db.t_memory(a4 SERIAL, c4 CHAR(8)) ENGINE=MEMORY; INSERT INTO db.t_memory VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" mariadb -e "CREATE TABLE db.t_memory(a4 SERIAL, c4 CHAR(8)) ENGINE=MEMORY; INSERT INTO db.t_memory VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')"
- mariadb -e "CREATE ALGORITHM=MERGE VIEW db.v_merge AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria" mariadb -e "CREATE ALGORITHM=MERGE VIEW db.v_merge AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria"
- mariadb -e "CREATE ALGORITHM=TEMPTABLE VIEW db.v_temptable AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria" mariadb -e "CREATE ALGORITHM=TEMPTABLE VIEW db.v_temptable AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria"
- mariadb -e "CREATE PROCEDURE db.p() SELECT * FROM db.v_merge" mariadb -e "CREATE PROCEDURE db.p() SELECT * FROM db.v_merge"
- mariadb -e "CREATE FUNCTION db.f() RETURNS INT DETERMINISTIC RETURN 1" mariadb -e "CREATE FUNCTION db.f() RETURNS INT DETERMINISTIC RETURN 1"
# Test that the features still work (this step can be done e.g. after an upgrade) # Test that the features still work (this step can be done e.g. after an upgrade)
- mariadb -e "SHOW TABLES IN db" mariadb -e "SHOW TABLES IN db"
- mariadb -e "SELECT * FROM db.t_innodb; INSERT INTO db.t_innodb VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" mariadb -e "SELECT * FROM db.t_innodb; INSERT INTO db.t_innodb VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
- mariadb -e "SELECT * FROM db.t_myisam; INSERT INTO db.t_myisam VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" mariadb -e "SELECT * FROM db.t_myisam; INSERT INTO db.t_myisam VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
- mariadb -e "SELECT * FROM db.t_aria; INSERT INTO db.t_aria VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" mariadb -e "SELECT * FROM db.t_aria; INSERT INTO db.t_aria VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
- mariadb -e "SELECT * FROM db.t_memory; INSERT INTO db.t_memory VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" mariadb -e "SELECT * FROM db.t_memory; INSERT INTO db.t_memory VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')"
- mariadb -e "SELECT COUNT(*) FROM db.v_merge" mariadb -e "SELECT COUNT(*) FROM db.v_merge"
- mariadb -e "SELECT COUNT(*) FROM db.v_temptable" mariadb -e "SELECT COUNT(*) FROM db.v_temptable"
- mariadb -e "CALL db.p()" mariadb -e "CALL db.p()"
- mariadb -e "SELECT db.f()" mariadb -e "SELECT db.f()"
- |
# Test TLS connections
dpkg -l | grep -i -e tls -e ssl
# Create user for TCP connection, must have password
mariadb -e "SET PASSWORD FOR 'mysql'@'localhost' = PASSWORD('asdf234');"
cat <<EOF > /root/.my.cnf
[client]
user=mysql
password=asdf234
protocol=tcp
EOF
export CERT_PATH=/usr/share/mysql/mysql-test/std_data
openssl verify -CAfile $CERT_PATH/cacert.pem $CERT_PATH/server-cert.pem
openssl x509 -subject -issuer -noout -in $CERT_PATH/cacert.pem
openssl x509 -subject -issuer -noout -in $CERT_PATH/server-cert.pem
cat <<EOF > /etc/mysql/mariadb.conf.d/tls.cnf
[client-server]
ssl = on
ssl-ca = $CERT_PATH/cacert.pem
ssl-cert = $CERT_PATH/server-cert.pem
ssl-key = $CERT_PATH/server-key.pem
[server]
require-secure-transport = on
[client]
ssl-verify-server-cert = on
EOF
service mariadb restart
mariadb -Bse 'STATUS' | tee result
# Ensure important values present, otherwise fail job
grep --quiet "localhost via TCP/IP" result
mariadb -Bse 'SHOW VARIABLES' | grep -e tls -e ssl | tee result
grep --quiet "have_ssl YES" result
grep --quiet TLSv1.3 result
mariadb -Bse 'SHOW SESSION STATUS' | grep -i -e tls -e ssl | tee result
grep --quiet TLSv1.3 result
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
...@@ -309,13 +373,14 @@ test basic features: ...@@ -309,13 +373,14 @@ test basic features:
# libmariadb-dev-compat layer. Should always end up using libmariadb.so.3 run-time. # libmariadb-dev-compat layer. Should always end up using libmariadb.so.3 run-time.
build mariadbclient consumer Python-MySQLdb: build mariadbclient consumer Python-MySQLdb:
stage: test stage: test
dependencies: needs:
- build - job: build
artifacts: true
image: debian:${RELEASE} image: debian:${RELEASE}
script: script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - *test-prepare-container
- mkdir -p debug # Ensure dir exists before using it # Run each step separately to avoitda 800+ lines chunk that lacks the
- apt-get update # commands themselves printed and Gitlab-CI cutting off the output
- apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb ./mariadb-common*.deb - apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb ./mariadb-common*.deb
- pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with - pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with
- apt-get install -y python3-pip - apt-get install -y python3-pip
...@@ -329,21 +394,20 @@ build mariadbclient consumer Python-MySQLdb: ...@@ -329,21 +394,20 @@ build mariadbclient consumer Python-MySQLdb:
- $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)$/
libmysql* to libmariadb* upgrade: libmysql* to libmariadb* upgrade:
stage: test extras stage: upgrade in Sid
dependencies: needs:
- build - job: build
image: debian:unstable artifacts: true
image: debian:${RELEASE}
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - *test-prepare-container
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
# Install all libmysql* available in Debian unstable # Install all libmysql* available in Debian unstable
- apt-get install -y pkg-config libmysqld-dev libmysqlclient-dev - apt-get install -y pkg-config libmysqlclient-dev
- pkg-config --list-all - pkg-config --list-all
- pkg-config --cflags mysqlclient # mysqlclient.pc from original package - pkg-config --cflags mysqlclient # mysqlclient.pc from original package
- apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb - apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb
...@@ -358,45 +422,37 @@ libmysql* to libmariadb* upgrade: ...@@ -358,45 +422,37 @@ libmysql* to libmariadb* upgrade:
- apt-get install -y ./libmariadbd-dev_*.deb - apt-get install -y ./libmariadbd-dev_*.deb
- pkg-config --list-all - pkg-config --list-all
- apt-get install -y default-libmysqlclient-dev default-libmysqld-dev - apt-get install -y default-libmysqlclient-dev default-libmysqld-dev
- ldconfig -p # | grep -e mariadb -e mysql - *test-verify-libs
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except: except:
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 upgrade: default-libmysqlclient-dev Sid upgrade:
stage: upgrade in Sid stage: upgrade in Sid
dependencies: needs:
- build - job: build
image: debian:sid artifacts: true
image: debian:${RELEASE}
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - *test-prepare-container
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
- apt-get install -y pkg-config default-libmysqlclient-dev default-libmysqld-dev - apt-get install -y pkg-config default-libmysqlclient-dev default-libmysqld-dev
- pkg-config --list-all - pkg-config --list-all
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb - *test-install-all-libs
- ldconfig -p # | grep -e mariadb -e mysql - *test-verify-libs
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except: except:
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 on buster upgrade: default-libmysqlclient-dev Buster upgrade:
stage: upgrade from Buster/Stretch/Jessie stage: upgrade from Buster/Stretch
dependencies: needs:
- build - job: build
artifacts: true
image: debian:buster image: debian:buster
artifacts: artifacts:
when: always when: always
...@@ -404,27 +460,21 @@ default-libmysqlclient-dev on buster upgrade: ...@@ -404,27 +460,21 @@ default-libmysqlclient-dev on buster upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - *test-prepare-container
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
- apt-get install -y pkg-config default-libmysqlclient-dev - apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all - pkg-config --list-all
- echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list - *test-enable-sid-repos
- apt-get update; apt-get install -y apt # Uprade minimal stack first - *test-install-all-libs
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb - *test-verify-libs
- ldconfig -p # | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except: except:
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 on stretch upgrade: default-libmysqlclient-dev Stretch upgrade:
stage: upgrade from Buster/Stretch/Jessie stage: upgrade from Buster/Stretch
dependencies: needs:
- build - job: build
artifacts: true
image: debian:stretch image: debian:stretch
artifacts: artifacts:
when: always when: always
...@@ -432,27 +482,21 @@ default-libmysqlclient-dev on stretch upgrade: ...@@ -432,27 +482,21 @@ default-libmysqlclient-dev on stretch upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - *test-prepare-container
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
- apt-get install -y pkg-config default-libmysqlclient-dev - apt-get install -y pkg-config default-libmysqlclient-dev
- pkg-config --list-all - pkg-config --list-all
- echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list - *test-enable-sid-repos
- apt-get update; apt-get install -y apt # Uprade minimal stack first - *test-install-all-libs
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb - *test-verify-libs
- ldconfig -p # | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except: except:
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-connector-c on stretch upgrade: mariadb-connector-c Stretch upgrade:
stage: upgrade from Buster/Stretch/Jessie stage: upgrade from Buster/Stretch
dependencies: needs:
- build - job: build
artifacts: true
image: debian:stretch image: debian:stretch
artifacts: artifacts:
when: always when: always
...@@ -460,73 +504,52 @@ mariadb-connector-c on stretch upgrade: ...@@ -460,73 +504,52 @@ mariadb-connector-c on stretch upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - *test-prepare-container
- dpkg -l | grep -iE 'maria|mysql|galera' || true
- apt-get update
- apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat - apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat
- pkg-config --list-all - pkg-config --list-all
- echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list - *test-enable-sid-repos
- apt-get update; apt-get install -y apt # Uprade minimal stack first - *test-install-all-libs
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb - *test-verify-libs
- ldconfig -p # | grep -e mariadb -e mysql
- pkg-config --list-all
- pkg-config --cflags --libs mysqlclient
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
except: except:
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)$/
mysql-5.5 to mariadb-10.5 upgrade: # Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
stage: upgrade from Buster/Stretch/Jessie # The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
dependencies: mysql-8.0 Sid to mariadb-10.5 upgrade:
- build stage: upgrade in Sid
image: debian:jessie needs:
- job: build
artifacts: true
image: debian:sid
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output # First install often fail due to bug in mysql-8.0
- apt-get update - apt-get install -y mysql-server 'libmysqlc*' || true
- apt-get install -y mysql-server - sleep 10 && apt-get install -f
# Verify installation of MySQL from Jessie - *test-verify-initial
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - *test-install
- service mysql status - service mysql status
- mysql --skip-column-names -e "select @@version, @@version_comment" - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- echo 'SHOW DATABASES;' | mysql - *test-verify-final
# Install MariaDB built in this commit
- sed 's/jessie/sid/g' -i /etc/apt/sources.list # Enable next Debian release
- sed '/sid-updates/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- sed '/security/d' -i /etc/apt/sources.list # Remove repositories that don't exist for Sid
- apt-get update; apt-get install -y apt || true # Install apt 1.4.9 so the wildcard command below works
- apt-get dist-upgrade -y || true # Upgrade all to avoid udev/systemd failures
- apt-get install -o Dpkg::Options::=--force-confnew -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
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)$/
# Installation often fails (not a MariaDB reason), so do not require this test to pass
allow_failure: true
# Upgrading from MySQL 5.7 involves automatic renaming of auth_socket plugin mysql-5.7 Sid to mariadb-10.5 upgrade:
# to unix_socket and automaticly re-adding Password column in user table. stage: upgrade in Sid
mysql-5.7 to mariadb-10.5 upgrade: needs:
stage: test extras - job: build
dependencies: artifacts: true
- build
image: debian:sid image: debian:sid
artifacts: artifacts:
when: always when: always
...@@ -534,33 +557,13 @@ mysql-5.7 to mariadb-10.5 upgrade: ...@@ -534,33 +557,13 @@ mysql-5.7 to mariadb-10.5 upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - apt-get install -y mysql-server-5.7 'libmysqlc*'
- apt-get update - *test-verify-initial
- apt-get install -y mysql-server - *test-install
# Verify installation of MySQL from Sid
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status - service mysql status
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- 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
- mysql --skip-column-names -e "SELECT @@version, @@version_comment" - *test-verify-final
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
...@@ -569,59 +572,83 @@ mysql-5.7 to mariadb-10.5 upgrade: ...@@ -569,59 +572,83 @@ mysql-5.7 to mariadb-10.5 upgrade:
# 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 to mariadb-10.5 upgrade: mysql-8.0 Focal to mariadb-10.5 upgrade:
stage: upgrade extras stage: upgrade extras
dependencies: needs:
- build - job: build buster-backports
image: debian:sid artifacts: true
image: debian:buster
artifacts: artifacts:
when: always when: always
name: "$CI_BUILD_NAME" name: "$CI_BUILD_NAME"
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
# Add Ubuntu Focal archive keys and repository # Add Ubuntu Focal archive keys and repository
- apt-get update
- 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
- apt-get install -y mysql-server # First install often fail due to bug in mysql-8.0
# Verify installation of MySQL from Ubuntu Focal - apt-get install -y mysql-server 'libmysqlc*' || true
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - sleep 10 && apt-get install -f
- *test-verify-initial
# 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
- *test-install
- service mysql status - service mysql status
- mysql --skip-column-names -e "SELECT @@version, @@version_comment" - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql - *test-verify-final
- mysql -e "SELECT * FROM plugin;" mysql variables:
- echo 'SHOW DATABASES;' | mysql GIT_STRATEGY: none
# Install MariaDB built in this commit except:
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected variables:
# Verify installation of MariaDB built in this commit - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed # Installation often fails (not a MariaDB reason), so do not require this test to pass
- mariadb --version # Client version allow_failure: true
mysql-5.7 Bionic to mariadb-10.5 upgrade:
stage: upgrade extras
needs:
- job: build stretch-backports
artifacts: true
image: debian:stretch
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *test-prepare-container
# Add Ubuntu Bionic 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-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 871920D1991BC93C 3B4FE6ACC0B21F32
- echo 'deb http://archive.ubuntu.com/ubuntu/ bionic main restricted' > /etc/apt/sources.list.d/ubuntu.list
- apt-get update
- apt-get install -y 'mysql*' 'libmysqlc*'
- *test-verify-initial
# Enable backports to make libzstd1, rocksdb-tools
- echo 'deb http://deb.debian.org/debian stretch-backports main' >> /etc/apt/sources.list.d/backports.list
# Enable backports to make galera-4 available
- echo 'deb http://deb.debian.org/debian stretch-backports-sloppy main' >> /etc/apt/sources.list.d/backports.list && apt-get update
# Remove plugin that requires libcurl4, not available in Debian Stretch
- rm mariadb-plugin-s3*.deb
- *test-install
- service mysql status - service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- 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
- mysql --skip-column-names -e "SELECT @@version, @@version_comment" - *test-verify-final
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
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.5.x to mariadb-10.5 upgrade: mariadb.org-10.5 to mariadb-10.5 upgrade:
stage: upgrade extras stage: upgrade extras
dependencies: needs:
- build - job: build
artifacts: true
image: debian:sid image: debian:sid
artifacts: artifacts:
when: always when: always
...@@ -629,37 +656,22 @@ mariadb.org-10.5.x to mariadb-10.5 upgrade: ...@@ -629,37 +656,22 @@ mariadb.org-10.5.x to mariadb-10.5 upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- 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 [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.5/debian sid main' > /etc/apt/sources.list.d/mariadb.list - echo 'deb http://mirror.one.com/mariadb/repo/10.5/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- apt-get install -y mariadb-server-10.5 # Package libmariadbclient-dev from mariadb.org conficts with libmariadb-dev in Sid, so cannot use wildcard that would include it
# Verify installation of MySQL from Sid - apt-get install -y 'mariadb*' libmariadb3 'libmariadb-*' 'libmariadbd*'
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - *test-verify-initial
- service mariadb status
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit # Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected # 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
- apt-get install -y --allow-downgrades ./*.deb
# 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 - service mariadb status # There is no init.d/mysql in MariaDB 10.5
- mkdir -p debug # Ensure dir exists before using it - *test-verify-final
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
...@@ -668,8 +680,9 @@ mariadb.org-10.5.x to mariadb-10.5 upgrade: ...@@ -668,8 +680,9 @@ mariadb.org-10.5.x to mariadb-10.5 upgrade:
mariadb.org-10.4 to mariadb-10.5 upgrade: mariadb.org-10.4 to mariadb-10.5 upgrade:
stage: upgrade extras stage: upgrade extras
dependencies: needs:
- build - job: build
artifacts: true
image: debian:sid image: debian:sid
artifacts: artifacts:
when: always when: always
...@@ -677,41 +690,21 @@ mariadb.org-10.4 to mariadb-10.5 upgrade: ...@@ -677,41 +690,21 @@ mariadb.org-10.4 to mariadb-10.5 upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- 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 [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.4/debian sid main' > /etc/apt/sources.list.d/mariadb.list - echo 'deb http://mirror.one.com/mariadb/repo/10.4/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- apt-get install -y mariadb-server-10.4 - apt-get install -y mariadb-server-10.4
# Verify installation of MySQL from Sid
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
# 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
- cp /usr/share/mysql/mysql.init /etc/init.d/mysql; chmod +x /etc/init.d/mysql; service mysql start; sleep 5 - cp /usr/share/mysql/mysql.init /etc/init.d/mysql; chmod +x /etc/init.d/mysql; service mysql start; sleep 5
- service mysql status - *test-verify-initial
- mysql --skip-column-names -e "SELECT @@version, @@version_comment" - *test-install
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status - service mysql status
- service mariadb status - service mariadb status
- mkdir -p debug # Ensure dir exists before using it - *test-verify-final
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
- mysql --skip-column-names -e "SELECT @@version, @@version_comment"
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
...@@ -720,8 +713,9 @@ mariadb.org-10.4 to mariadb-10.5 upgrade: ...@@ -720,8 +713,9 @@ mariadb.org-10.4 to mariadb-10.5 upgrade:
mariadb.org-10.3 to mariadb-10.5 upgrade: mariadb.org-10.3 to mariadb-10.5 upgrade:
stage: upgrade extras stage: upgrade extras
dependencies: needs:
- build - job: build
artifacts: true
image: debian:sid image: debian:sid
artifacts: artifacts:
when: always when: always
...@@ -729,38 +723,24 @@ mariadb.org-10.3 to mariadb-10.5 upgrade: ...@@ -729,38 +723,24 @@ mariadb.org-10.3 to mariadb-10.5 upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- 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 [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.3/debian sid main' > /etc/apt/sources.list.d/mariadb.list - echo 'deb http://mirror.one.com/mariadb/repo/10.3/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- apt-get install -y mariadb-server-10.3 - apt-get install -y mariadb-server-10.3
# Verify installation of MySQL from Sid # 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.5–10.3 # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3
- mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" - 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 Host,User,plugin,authentication_string FROM user;" mysql
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf - *test-install
# Install MariaDB built in this commit
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected
# Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version
- service mysql status - service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- 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
- mysql --skip-column-names -e "SELECT @@version, @@version_comment" - *test-verify-final
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
...@@ -769,8 +749,9 @@ mariadb.org-10.3 to mariadb-10.5 upgrade: ...@@ -769,8 +749,9 @@ mariadb.org-10.3 to mariadb-10.5 upgrade:
mariadb.org-10.2 to mariadb-10.5 upgrade: mariadb.org-10.2 to mariadb-10.5 upgrade:
stage: upgrade extras stage: upgrade extras
dependencies: needs:
- build - job: build
artifacts: true
image: debian:sid image: debian:sid
artifacts: artifacts:
when: always when: always
...@@ -778,38 +759,89 @@ mariadb.org-10.2 to mariadb-10.5 upgrade: ...@@ -778,38 +759,89 @@ mariadb.org-10.2 to mariadb-10.5 upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - *test-prepare-container
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update
- 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 [arch=amd64,i386] http://mirror.one.com/mariadb/repo/10.2/debian sid main' > /etc/apt/sources.list.d/mariadb.list - echo 'deb http://mirror.one.com/mariadb/repo/10.2/debian sid main' > /etc/apt/sources.list.d/mariadb.list
- apt-get update - apt-get update
- apt-get install -y mariadb-server-10.2 - apt-get install -y mariadb-server-10.2
# Verify installation of MySQL from Sid # 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.5–10.3 # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3
- mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" - 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 Host,User,plugin,authentication_string FROM user;" mysql
- mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql - mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mysql --defaults-file=/etc/mysql/debian.cnf - *test-install
# Install MariaDB built in this commit - service mysql status
- apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
# Verify installation of MariaDB built in this commit - *test-verify-final
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed variables:
- mariadb --version # Client version GIT_STRATEGY: none
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
mysql.com-5.7 to mariadb-10.5 upgrade:
stage: upgrade extras
needs:
- job: build buster-backports
artifacts: true
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *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-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com:443 8C718D3B5072E1F5
echo 'deb https://repo.mysql.com/apt/debian/ buster mysql-5.7' > /etc/apt/sources.list.d/mysql.list
apt-get update
apt-get install -y 'mysql*' 'libmysqlc*'
- *test-verify-initial
# 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
- *test-install
- service mysql status
- 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)$/
percona-xtradb-5.7 to mariadb-10.5 upgrade (MDEV-22679):
stage: upgrade extras
needs:
- job: build buster-backports
artifacts: true
image: debian:buster
artifacts:
when: always
name: "$CI_BUILD_NAME"
paths:
- ${WORKING_DIR}/debug
script:
- *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-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
apt-get update
apt-get install -y percona-xtradb-cluster-full-57 percona-xtrabackup-24 percona-toolkit pmm2-client
- service mysql status
- *test-verify-initial
# 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
- *test-install
- service mysql status - service mysql status
- mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list || true # Ignore errors about "no such file or directory"
- cp -ra /etc/mysql debug/etc-mysql
- cp -ra /var/log/mysql debug/var-log-mysql
- 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
- mysql --skip-column-names -e "SELECT @@version, @@version_comment" - *test-verify-final
- mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql
- mysql -e "SELECT * FROM plugin;" mysql
- echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there
- mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
except: except:
......
...@@ -68,7 +68,6 @@ EOT ...@@ -68,7 +68,6 @@ EOT
mysql <<EOT mysql <<EOT
SET GLOBAL innodb_compression_algorithm=lz4; SET GLOBAL innodb_compression_algorithm=lz4;
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment