MXS-3337: Fix galeramon query

The query now properly queries over both the status and the variables.
This commit is contained in:
Markus Mäkelä
2020-12-10 11:53:06 +02:00
parent 4a2831e731
commit 43068d20b4

View File

@ -137,7 +137,11 @@ void GaleraMonitor::update_server_status(MXS_MONITORED_SERVER* monitored_server)
/* Check if the the Galera FSM shows this node is joined to the cluster */
const char* cluster_member =
"SHOW STATUS WHERE Variable_name IN"
" SELECT * FROM ("
" SELECT * FROM information_schema.SESSION_STATUS"
" UNION"
" SELECT * FROM information_schema.SESSION_VARIABLES) AS t"
" WHERE Variable_name IN"
" ('wsrep_cluster_state_uuid',"
" 'wsrep_cluster_size',"
" 'wsrep_local_index',"