Fix flush_mcp_variables___database_to_runtime to populate runtime_global_variables

The MCP module's flush_mcp_variables___database_to_runtime() was missing
the logic to populate runtime_global_variables table. This caused the
table to remain empty even though global_variables was correctly populated.

Following the same pattern as admin variables (line 268), this commit adds:
1. Call to flush_mcp_variables___runtime_to_database(admindb, ..., true)
   to populate runtime_global_variables
2. Checksum generation for cluster sync

After this fix, both global_variables and runtime_global_variables will
contain MCP variables after ProxySQL startup.
pull/5310/head
Rene Cannao 3 months ago
parent ef07831780
commit 2874c9ad54

@ -1228,6 +1228,14 @@ void ProxySQL_Admin::flush_mcp_variables___database_to_runtime(SQLite3DB* db, bo
GloMCPH->wrunlock();
delete resultset;
}
// Also populate runtime_global_variables (same pattern as admin variables)
{
pthread_mutex_lock(&GloVars.checksum_mutex);
flush_mcp_variables___runtime_to_database(admindb, false, false, false, true);
flush_GENERIC_variables__checksum__database_to_runtime("mcp", checksum, epoch);
pthread_mutex_unlock(&GloVars.checksum_mutex);
}
}
void ProxySQL_Admin::flush_mcp_variables___runtime_to_database(SQLite3DB* db, bool replace, bool del, bool onlyifempty, bool runtime, bool use_lock) {

Loading…
Cancel
Save