summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-05-08 15:02:19 +0200
committerSergei Golubchik <serg@mariadb.org>2022-05-08 23:03:08 +0200
commita70a1cf3f4ed10c9d9194b2b8df6b6f08551a937 (patch)
tree517124ec5059f48bff1e02b934355e8162183efc /debian
parent40b8f3ec1a76fc23eb6bf9c5a8fef1debcbf5843 (diff)
parent79660e59ee8fcd23f928c72dc77682b875bd58ce (diff)
downloadmariadb-git-a70a1cf3f4ed10c9d9194b2b8df6b6f08551a937.tar.gz
Merge branch '10.3' into 10.4
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/additions/debian-start2
-rw-r--r--debian/mariadb-server-10.4.postrm5
-rw-r--r--debian/mariadb-server-10.4.preinst6
3 files changed, 10 insertions, 3 deletions
diff --git a/debian/additions/debian-start b/debian/additions/debian-start
index 7de59ce1fe9..5c15e1e0130 100755
--- a/debian/additions/debian-start
+++ b/debian/additions/debian-start
@@ -16,7 +16,7 @@ fi
MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
# Don't run full mysql_upgrade on every server restart, use --version-check to do it only once
-MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check"
+MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check --silent"
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
MYCHECK_PARAMS="--all-databases --fast --silent"
diff --git a/debian/mariadb-server-10.4.postrm b/debian/mariadb-server-10.4.postrm
index 3cbd3721414..60d90c36280 100644
--- a/debian/mariadb-server-10.4.postrm
+++ b/debian/mariadb-server-10.4.postrm
@@ -11,6 +11,11 @@ MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
# do it himself. No database directories should be removed while the server
# is running!
stop_server() {
+ # Return immediately if there are no mysql processes running
+ # as there is no point in trying to shutdown in that case.
+ # Compatibility with versions that ran 'mariadbd'
+ if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
+
set +e
systemctl stop mysql
errno=$?
diff --git a/debian/mariadb-server-10.4.preinst b/debian/mariadb-server-10.4.preinst
index 6e3b8e761e1..b3977a40bac 100644
--- a/debian/mariadb-server-10.4.preinst
+++ b/debian/mariadb-server-10.4.preinst
@@ -20,9 +20,11 @@ mysql_upgradedir=/var/lib/mysql-upgrade
# do it himself. No database directories should be removed while the server
# is running! Another mysqld in e.g. a different chroot is fine for us.
stop_server() {
- # Return immediately if there are no mysql processes running
+ # Return immediately if there are no mysql processes running on a host
+ # (leave containerized processes with the same name in other namespaces)
# as there is no point in trying to shutdown in that case.
- if ! pgrep -x --ns $$ mysqld > /dev/null; then return; fi
+ # Compatibility with versions that ran 'mariadbd'
+ if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
set +e
systemctl stop mysql