[debian-mysql] Bug#1112499: mariadb-server: ExecStartPost fails with "/usr/share/mysql/debian-start.inc.sh: line 87: MARIADB: unbound variable"
Otto Kekäläinen
otto at debian.org
Sat Aug 30 17:45:12 BST 2025
Actually I do see this warning in e.g.
https://salsa.debian.org/mariadb-team/mariadb-server/-/jobs/8130323
and https://salsa.debian.org/mariadb-team/mariadb-server/-/jobs/8130324
However, it is not preventing the service from starting nor does it
emit an exit code. Reproduction:
root at 15f8cbad768d:~# ps faxu
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 4068 3040 pts/0 Ss 16:33 0:00
/bin/bash /debcraft-shell.sh
root 123 0.0 0.0 4192 3544 pts/0 S 16:33 0:00 /bin/bash
root 1225 0.0 0.0 8104 3964 pts/0 R+ 16:35 0:00 \_ ps faxu
root at 15f8cbad768d:~# /etc/init.d/mariadb start
Starting MariaDB database server: mariadbd.
/usr/share/mysql/debian-start.inc.sh: line 87: MARIADB: unbound variable
root at 15f8cbad768d:~# echo $?
0
root at 15f8cbad768d:~# ps faxu
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 4068 3040 pts/0 Ss 16:33 0:00
/bin/bash /debcraft-shell.sh
root 123 0.0 0.0 4192 3544 pts/0 S 16:33 0:00 /bin/bash
root 1423 0.0 0.0 8104 4008 pts/0 R+ 16:35 0:00 \_ ps faxu
root 1249 0.0 0.0 2580 1740 pts/0 S 16:35 0:00
/bin/sh /usr/bin/mysqld_safe
mysql 1374 1.0 0.6 1275708 100528 pts/0 Sl 16:35 0:00 \_
/usr/sbin/mariadbd --basedir=/usr --datadir=/var/lib/mysql
--plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --p
root 1375 0.0 0.0 5948 1448 pts/0 S 16:35 0:00 \_
logger -t mysqld -p daemon error
In this 10.11 series in Debian the variable to be used is still the
old MYSQL and not MARIADB, and the fix is simply to change the
variable name:
# diff -u /usr/share/mysql/debian-start.inc.sh.orig
/usr/share/mysql/debian-start.inc.sh
--- /usr/share/mysql/debian-start.inc.sh.orig 2025-08-30
16:37:23.998123407 +0000
+++ /usr/share/mysql/debian-start.inc.sh 2025-08-30 16:37:49.177608997 +0000
@@ -78,7 +78,7 @@
JSON_VALUE(priv, '$.plugin') in ('mysql_native_password',
'mysql_old_password', 'parsec') AND
JSON_VALUE(priv, '$.authentication_string') = '' AND
JSON_VALUE(priv, '$.password_last_changed') != 0
- " | $MARIADB --skip-column-names)
+ " | $MYSQL --skip-column-names)
if [ "$ret" -ne "0" ]
then
logger -p daemon.warn -i -t"$0" "WARNING: mysql.user contains
$ret root accounts without password!"
# grep -E "MYSQL|MARIADB" /usr/share/mysql/debian-start.inc.sh
LC_ALL=C $MYSQL --skip-column-names --batch -e '
xargs -i $MYSQL --skip-column-names --silent --batch \
" | $MYSQL --skip-column-names)
root at 15f8cbad768d:~# /etc/init.d/mariadb restart
Stopping MariaDB database server: mariadbd.
Starting MariaDB database server: mariadbd.
root at 15f8cbad768d:~#
(no warnings)
Regression was from incorrectly cherry-picking
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/7eb4211a3ac63f73c2733c45f8865ef033d77f28
without modifying the variable name.
Fixed in https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/48ef3c2dcd2fde4e747852f5c3fda1fcc18f0e11
I will proceed to upload this to bookworm-proposed-updates now.
More information about the pkg-mysql-maint
mailing list