~bisscuitt/percona-monitoring-plugins/lsof_find

« back to all changes in this revision

Viewing changes to nagios/bin/pmp-check-mysql-replication-running

  • Committer: Roman Vynar
  • Date: 2014-07-10 15:09:58 UTC
  • Revision ID: roman.vynar@percona.com-20140710150958-rdgxi7nmftcx9gbi
Fix for bug #1297442 leverage lock-free SHOW SLAVE STATUS in Percona Server

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
   local TEMP=$(mktemp -t "${0##*/}.XXXXXX") || exit $?
59
59
   trap "rm -f '${TEMP}' >/dev/null 2>&1" EXIT
60
60
   if [ -z "$1" ]; then
61
 
      mysql_exec 'SHOW SLAVE STATUS\G' > "${TEMP}"
 
61
      # Leverage lock-free SHOW SLAVE STATUS NOLOCK with Percona Server
 
62
      mysql_exec "SHOW SLAVE STATUS NOLOCK\G" > "${TEMP}" 2>/dev/null || mysql_exec "SHOW SLAVE STATUS\G" > "${TEMP}"
62
63
   else
63
64
      # This is just for testing.  /dev/null it.
64
65
      cat "$1" > "${TEMP}" 2>/dev/null
194
195
 
195
196
=item *
196
197
 
197
 
C<SHOW SLAVE STATUS>.
 
198
C<SHOW SLAVE STATUS NOLOCK> with Percona Server and w/o NOLOCK otherwise.
198
199
 
199
200
=back
200
201