Fix mariadb_ctl premature exit when mysql_upgrade fails

[#72629354]