Bad integer comparisons in the "mysqld_safe" script

Bug #1742198 reported by Chris Skretowski
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Fix Committed
Undecided
EvgeniyPatlan

Bug Description

I'm just reporting bug, full credit for fix to vleclere

As per: https://www.percona.com/forums/questions-discussions/percona-xtradb-cluster/49750-can-t-restart-node-after-brutal-shutdown-in-3-nodes-pxc-57-systemd-related?p=49760#post49760

There is a bad integer comparisons in the "mysqld_safe" script.

Code:

What it is:
 if [ $ret > 0 ]; then

What it should be:
 if [ "$ret" -gt "0" ]; then

Bug can be reproduced by following this scenario:

- Start DB, make sure that cluster is in SYNC
- Force brutal shutdown of one node ("power off" or "reset")
- See logs. Without this fix DB will not start.

Thanks
Chris

Revision history for this message
Chris Skretowski (coloomb) wrote :

Tested on latest Perocna XtraDB Cluster 5.7 on latest RHEL 7

Changed in percona-xtradb-cluster:
assignee: nobody → EvgeniyPatlan (evgeniy-patlan)
Revision history for this message
EvgeniyPatlan (evgeniy-patlan) wrote :

fix came during merge

Changed in percona-xtradb-cluster:
status: New → Fix Released
Revision history for this message
Chris Skretowski (coloomb) wrote :

Thank you for a very quick reaction, perfect!

Id that's released now then this bug can be closed. I guess it will be released to PROD at some point in the future?

Cheers
Chris

description: updated
Changed in percona-xtradb-cluster:
status: Fix Released → Fix Committed
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-2024

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.