Skip to content

Conversation

jmrenouard
Copy link
Collaborator

No description provided.

jmrenouard and others added 5 commits October 6, 2025 23:11
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.
@jmrenouard jmrenouard requested a review from Copilot October 6, 2025 21:36
Copy link
Contributor

@Copilot Copilot AI left a 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" ) {
Copy link

Copilot AI Oct 6, 2025

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.

google-labs-jules bot and others added 3 commits October 6, 2025 21:38
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]>
@jmrenouard jmrenouard merged commit 2f926c8 into major:master Oct 6, 2025
4 checks passed
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