Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stats_mysql_commands_counters table doesn't address the new source replica terminology commands in MYSQL 8.0, 8.4+ #4727

Open
ParveezBaig opened this issue Oct 24, 2024 · 0 comments

Comments

@ParveezBaig
Copy link

ProxySQL needs to consider the new mysql source/replica terminology commands wherever applicable. MySQL 8.4+ no longer recognize the old master/slave terminology commands.

AFAICS the below three stats in stats_mysql_commands_counters table needs to be updated to consider the new terminology commands:
CHANGE_MASTER (shall consider CHANGE REPLICATION SOURCE)
RESET_MASTER (shall consider RESET BINARY LOGS AND GTIDS)
RESET_SLAVE (shall consider RESET REPLICA)

ProxySQL version : 2.7.1
OS version: centos 9

Steps to reproduce:

  1. Setup proxysql with at least one backend mysql 8.4+ server correctly configured.
  2. Configure the mysql user in proxysql, ensure that the user with necessary privileges exists on mysql 8.4+ server.
  3. Open proxysql connection via the user configured.
  4. Execute CHANGE MASTER command with right syntax as per mysql 8.0, the query errors out as syntax ERROR but the stats_mysql_commands_counters table will increase the count for CHANGE_MASTER.
  5. Execute CHANGE REPLICATION SOURCE command with right syntax, the query executes successfully on server but no effect in CHANGE_MASTER counter.

Same behavior for RESET_MASTER and RESET_SLAVE

Fix:
Rename CHANGE_MASTER, RESET_MASTER and RESET_SLAVE to CHANGE_REPLICATION_SOURCE, RESET_BINARY_LOGS_AND_GTIDS and RESET_REPLICA respectively and when server is 8.4+ then consider only the new terminology commands as old terminology commands are invalid and when the version is lower then 8.4 then consider both the new and old terminology commands.

@ParveezBaig ParveezBaig changed the title stats_mysql_commands_counters table doesn't address the new source replica terminology commands in latest MYSQL 8.0, 8.4 stats_mysql_commands_counters table doesn't address the new source replica terminology commands in MYSQL 8.0, 8.4+ Oct 24, 2024
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

No branches or pull requests

1 participant