Skip to content

Support SHOW REPLICA STATUS for MySQL 8.0.22+#187

Open
psujit775 wants to merge 2 commits intogithub:masterfrom
psujit775:support-replica-status
Open

Support SHOW REPLICA STATUS for MySQL 8.0.22+#187
psujit775 wants to merge 2 commits intogithub:masterfrom
psujit775:support-replica-status

Conversation

@psujit775
Copy link

Summary

  • MySQL 8.4.0+ deprecated SHOW SLAVE STATUS, causing syntax errors when freno queries replication lag
  • Implements a fallback: try SHOW REPLICA STATUS first, fall back to SHOW SLAVE STATUS on MySQL error 1064 (syntax error) for older versions
  • Updates column names (Replica_IO_Running, Replica_SQL_Running, Seconds_Behind_Source) for the new syntax
  • Updates documentation to reflect dual-syntax support

Backward compatibility

  • MySQL >= 8.0.22: uses SHOW REPLICA STATUS directly
  • MySQL < 8.0.22: falls back to SHOW SLAVE STATUS transparently
  • No configuration changes required

Test plan

  • script/test passes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant