Strange or obsolete code in mysql initscript
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-dfsg-5.0 (Ubuntu) |
Confirmed
|
Low
|
Patch for MySQL team |
Bug Description
Hi.
There is several snippets in mysql init script, with 'log_end_msg 1', call and some code after it.
'log_end_msg' returns it's argument as exit status. So 'log_end_msg 1' will be intrepreted by bash as command that always fails. Option '-e' in bash causes script to bail out in case of any error.
So in this fragment:
'stop')
.....
if ! mysqld_status check_dead nowarn; then
set +e
set -e
if [ "$r" -ne 0 ]; then
All futher code will never being executed:
[ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out"
...
Moreover, 'VERBOSE' variable is undefined.
So, I think this code is a little strange one. By the way, I also think that killing all mysqld processes is not very good idea too (MySQL Enterprise Monitor, for example, runs it's own mysqld instance that shouldn't be killed by this init script)
I can send a patch for it if it will be helpful.
Changed in mysql-dfsg-5.0 (Ubuntu): | |
importance: | Undecided → Low |
Changed in mysql-dfsg-5.0 (Ubuntu): | |
assignee: | nobody → Patch for MySQL team (mysql-patch-team) |
I believe I can confirm this. Unless I'm thinking entirely wrong there is no way that code after "log_end_msg 1" will be executed.