[Bug 340502] Re: MySQL handler does not detect errors

Christian Rishøj christian at rishoj.net
Tue Mar 10 14:05:43 UTC 2009


** Attachment added: "Patch: Adds debug statement, removes superfluous sed"
   http://launchpadlibrarian.net/23721559/fix-mysql.patch

** Description changed:

  Binary package hint: backupninja
  
  
  When listing databases, a superfluous sed hides the return status of the mysql command:
  
- Line 235 in /usr/share/backupninja/mysql:
+ Lines 235-239 in /usr/share/backupninja/mysql:
  
- {{{
  databases=$(su $user -c "$MYSQL $defaultsfile -N -B -e 'show databases'" | sed 's/|//g;/\+----/d')
- }}}
+ if [ $? -ne 0 ]
+ then
+    fatal "Authentication problem, maybe user/password is wrong or mysqld is not running?"
+ fi
+ 
+ Here, the return status of the $MYSQL command is hidden by the tailing
+ sed command.

-- 
MySQL handler does not detect errors
https://bugs.launchpad.net/bugs/340502
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

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




More information about the universe-bugs mailing list