How to reset Innodb_deadlocks counter?


we have encountered some deadlocks in the past, but solved them. The extended status of our Percona Server 5.5 shows:

mysqladmin extended-status |grep Innodb_deadlocks| Innodb_deadlocks | 11 |

After sending the FLUSH STATUS command allmost all counters are resettet, but not the deadlock counter.

Is there any way to reset this counter? We don’t want to restart the master because of this problem. :slight_smile:



There are some status variables that can’t be flushed :frowning: Check this bug report opened 6 years ago:

The bug reports shows that Com_% can’t be flushed but the problem also affects other variables like Innodb_deadlocks.

The documentation says:

“Some global variables may be reset to zero as well.”

SOME :slight_smile: