-
Notifications
You must be signed in to change notification settings - Fork 1.3k
wsrep_slave_threads deprecated in mySQL 8.0+ #819 #853
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
Conversation
As wsrep_slave_threads is not set to anything on new MySQL versions it seems to guess on a value, maybe wsrep_applier_threads should be used instead when wsrep_slave_threads is not found. Deprecated as of MySQL-wsrep 8.0.26-26.8 in favor of [wsrep_applier_threads] This commit refactors the mariadb_galera subroutine to handle both wsrep_slave_threads and wsrep_applier_threads variables. This ensures the script provides accurate recommendations for different MySQL versions. The get_wsrep_options subroutine has also been refactored to remove the logic that adds wsrep_slave_threads to the @galera_options array, as it is a server variable, not a Galera provider option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses MySQL 8.0+ compatibility by replacing the deprecated wsrep_slave_threads
variable with wsrep_applier_threads
. The change ensures MySQLTuner works correctly with newer MySQL/MariaDB versions where the old variable name is no longer supported.
- Updates Galera cluster configuration checks to use the appropriate variable name based on MySQL version
- Removes hardcoded references to
wsrep_slave_threads
in favor of dynamic variable selection - Updates README files to use a local logo image reference instead of GitHub URLs
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
mysqltuner.pl | Main logic changes to detect and use correct wsrep threads variable name, plus code formatting improvements |
README.md | Updated logo image reference from GitHub URL to local file |
README.ru.md | Updated logo image reference from GitHub URL to local file |
README.it.md | Updated logo image reference from GitHub URL to local file |
README.fr.md | Updated logo image reference from GitHub URL to local file |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
"Set $wsrep_threads_var_name to 1 in case of HA_ERR_FOUND_DUPP_KEY crash on slave"; | ||
|
||
# check options for parallel slave | ||
if ( get_wsrep_option('wsrep_slave_FK_checks') eq "OFF" ) { |
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line still references the old 'wsrep_slave_FK_checks' option name. Consider updating this to use a similar dynamic approach as done for the threads variable, or verify if this option name has also changed in newer versions.
Copilot uses AI. Check for mistakes.
The `PASSWORD()` function was removed in MySQL 8.0, causing errors when running MySQLTuner against newer versions of MySQL. This commit addresses the issue by wrapping the specific code blocks that use the `PASSWORD()` function in a version check (`if (!mysql_version_ge(8))`). This change ensures that: - The script no longer produces errors on MySQL 8.0 and later. - Security checks that do not rely on the `PASSWORD()` function are still executed on MySQL 8+, which is an improvement over the previous broader check that skipped the entire security section.
Fix PASSWORD() function error on MySQL 8+
Co-authored-by: Copilot <[email protected]>
No description provided.