Public bug reported:

Bug in script; does not properly print error message or exit with
correct exit code when mysqld server is not running when executed with
"post" argument.

expected behavior:
when script is called with argument "post", exit with correct exit code and 
print error message when mysqld is not running

actual behavior:
execution drops off end of script with exit code of 0 and no message printed

reason:
script is using test builtin ('[') and doing a string comparison (obvious from 
diff) rather than executing the 'false' builtin.


release:
Description:    Ubuntu 17.10
Release:        17.10

NOTE: launchpad says:
"mysql-server-5.7" does not exist in Ubuntu. Please choose a different package.
My only choice is "mysql-5.7" (which is clearly not what dpkg-query or 
apt-cache report!)

package:

# dpkg-query -S /usr/share/mysql/mysql-systemd-start
mysql-server-5.7: /usr/share/mysql/mysql-systemd-start

# apt-cache policy mysql-server-5.7
mysql-server-5.7:
  Installed: 5.7.20-0ubuntu0.17.10.1
  Candidate: 5.7.20-0ubuntu0.17.10.1
  Version table:
 *** 5.7.20-0ubuntu0.17.10.1 500
        500 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 
Packages
        500 http://security.ubuntu.com/ubuntu artful-security/main amd64 
Packages
        100 /var/lib/dpkg/status
     5.7.19-0ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages


PATCH:

# diff -u /usr/share/mysql/mysql-systemd-start*
--- /usr/share/mysql/mysql-systemd-start        2017-01-16 03:13:03.000000000 
-0800
+++ /usr/share/mysql/mysql-systemd-start.fixed  2017-12-02 08:53:31.779140503 
-0800
@@ -46,7 +46,7 @@
       break
     fi
   done
-  if [ ! $server_up ]; then
+  if ! $server_up ; then
     echo "MySQL server not started"
     exit 1
   fi

** Affects: mysql-5.7 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735930

Title:
  Bug in /usr/share/mysql/mysql-systemd-start script

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1735930/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to