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

mysql_replication: CHANGE REPLICATION SOURCE TO statement support #635

Closed
dennisurtubia opened this issue May 3, 2024 · 7 comments · Fixed by #636
Closed

mysql_replication: CHANGE REPLICATION SOURCE TO statement support #635

dennisurtubia opened this issue May 3, 2024 · 7 comments · Fixed by #636
Labels
help wanted Extra attention is needed

Comments

@dennisurtubia
Copy link
Contributor

SUMMARY

Adds CHANGE REPLICATION SOURCE TO statement support.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

community.mysql.mysql_replication module

ADDITIONAL INFORMATION

The CHANGE MASTER TO statement was deprecated. MySQL doc

Example using Group Replication:

CHANGE REPLICATION SOURCE TO SOURCE_USER='rpl_user', SOURCE_PASSWORD='password' \ 
FOR CHANNEL 'group_replication_recovery';
- name: CHANGE REPLICATION TO SOURCE usage 
  community.mysql.mysql_replication:
    mode: changereplication
    primary_user: rpl_user
    primary_password: password
    channel: group_replication_recovery
@Andersson007 Andersson007 added the help wanted Extra attention is needed label May 6, 2024
@Andersson007
Copy link
Collaborator

@dennisurtubia hello, thanks for reporting the issue! I'll put the help wanted label to indicate that it's vacant

@laurent-indermuehle
Copy link
Collaborator

And yet another MySQL vs MariaDB difference to handle: primary if db_engine == 'mariadb' else source.

@dennisurtubia
Copy link
Contributor Author

@dennisurtubia hello, thanks for reporting the issue! I'll put the help wanted label to indicate that it's vacant

Hey @Andersson007, Idk if this is a good first issue, but, I would love to work on this

@Andersson007
Copy link
Collaborator

@dennisurtubia great, thanks! There's a quick start dev guide that can be handy.
If you have any questions along the way, we'll be happy to help, just post them here

@poyrazus
Copy link

poyrazus commented May 23, 2024

Do you also have plans to update getprimary function for mysql 8.4? It's not anymore SHOW MASTER STATUS but SHOW BINARY LOG STATUS. Support for SHOW MASTER STATUS is already removed in 8.4, so it gives error.

@dennisurtubia
Copy link
Contributor Author

Do you also have plans to update getprimary function for mysql 8.4? It's not anymore SHOW MASTER STATUS but SHOW BINARY LOG STATUS. Support for SHOW MASTER STATUS is already removed in 8.4, so it gives error.

Hello, @poyrazus. I can work on this!

In case, I suggest we create a new mode, something like show_binary_log_status, since this statement is only supported in MySQL >= 8.2.0.

It's make sense @laurent-indermuehle @Andersson007?

@laurent-indermuehle
Copy link
Collaborator

@dennisurtubia in mysql_info and mysql_user (from memory, the truth is in the code) we have methods to get the engine (mysql|mariadb) and the version. So we can reliably implement method only for specific version (using the handy is version('8.4','>=')).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants