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

refactor(mysql-status): Refined compatibility checks for MySQL and Ma… #2132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CoreyWinkelmannPP
Copy link

…riaDB versions

This PR updates the getShowBinlogSQL method to enhance compatibility and accuracy in determining the correct SQL command for checking binary log status based on the database type and version.

MySQL 8.2+ uses SHOW BINARY LOG STATUS
MariaDB 10.5+ uses SHOW BINLOG STATUS
Older or unspecified versions default to SHOW MASTER STATUS

@osheroff
Copy link
Collaborator

please undo all the whitespace changes your editor put in, the code changes look fine and mergable, thanks

@CoreyWinkelmannPP CoreyWinkelmannPP force-pushed the get_show_binlog_sql_mariadb branch from 3408f3a to 2742e7d Compare November 14, 2024 15:58
@CoreyWinkelmannPP
Copy link
Author

Sorry, going to need to hold off on this. I need to better handle how the String productName = md.getDatabaseProductName(); returns mysql whether mariadb or not. I have to use something similar to what the isMaria method is doing. But need to test if I can also verify mysql or if I need to do that differently as well.

@CoreyWinkelmannPP CoreyWinkelmannPP force-pushed the get_show_binlog_sql_mariadb branch from 2742e7d to 3926660 Compare November 15, 2024 23:31
@CoreyWinkelmannPP
Copy link
Author

CoreyWinkelmannPP commented Nov 15, 2024

Alright, I am using a similar technic as the isMaria function. And then for now just creating a helper isMySQL variable to handle the opposite of the mariadb check more for clarity. I tested it out and it was working for mysql and mariadb locally.

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.

2 participants