Fix test_cluster_sync-t failure by skipping non-existent global variable

The test was failing with 'Unknown global variable: admin-checksum_proxysql_servers'
at line 840, causing the TAP test to abort prematurely and execute fewer tests
than planned (386 vs 399).

Changes:
- Added a conditional check in 'check_module_checksums_sync' to skip setting
  'admin-checksum_proxysql_servers' for the 'proxysql_servers' module.
- Added a Doxygen inline comment explaining that 'proxysql_servers' is an
  exception because it lacks an associated 'admin-checksum_*' global variable.
- This ensures the test suite is resilient and completes all planned tests.
pull/5404/head
Rene Cannao 3 months ago
parent fafe114cf3
commit 8073b19e0e

@ -837,7 +837,15 @@ int check_module_checksums_sync(
diag("Enabling sync for module '%s'", module.c_str());
// NOTE: Redundant, but left as DOC since this should be the value
MYSQL_QUERY_T(r_admin, ("SET " + module_sync.checksum_variable + "=true").c_str());
/**
* @brief Re-enable synchronization for the module.
*
* Module 'proxysql_servers' is an exception as it lacks an associated 'admin-checksum_*'
* global variable. Attempting to set it would result in an 'Unknown global variable' error.
*/
if (module != "proxysql_servers") {
MYSQL_QUERY_T(r_admin, ("SET " + module_sync.checksum_variable + "=true").c_str());
}
MYSQL_QUERY_T(r_admin, string {"SET " + module_sync.sync_variable + "=" + std::to_string(3)}.c_str());
MYSQL_QUERY_T(r_admin, "LOAD ADMIN VARIABLES TO RUNTIME");

Loading…
Cancel
Save