Skip to content

GR monitor fails on MySQL 9.1.0 (mysql_num_fields=3) #4954

Open
@Neaj-Morshad-101

Description

@Neaj-Morshad-101

ProxySQL 3.0.1-debian’s Group Replication monitor errors out against MySQL 9.1.0 because it expects a 4-column result but gets only 3:

2025-05-19 14:21:33 MySQL_Monitor.cpp:4105:gr_report_fetching_errs(): [ERROR] Got error. mmsd 0x7d8069638000 , MYSQL 0x7d8066604600 , FD 54 : Invalid or malformed resultset
2025-05-19 14:21:33 MySQL_Monitor.cpp:3855:extract_gr_srv_st(): [ERROR] Invalid resultset for GR monitoring query from server mysql9-1.mysql9-pods.demo.svc:3306. Either 'mysql_fetch_fields=NULL' or unexpected 'mysql_num_fields=3'. Please report this incident

All replicas are marked ONLINE in runtime_mysql_servers, and regular queries routed through ProxySQL succeed.

ProxySQLAdmin> select * from mysql_group_replication_hostgroups;
+------------------+-------------------------+------------------+-------------------+--------+-------------+-----------------------+-------------------------+---------+
| writer_hostgroup | backup_writer_hostgroup | reader_hostgroup | offline_hostgroup | active | max_writers | writer_is_also_reader | max_transactions_behind | comment |
+------------------+-------------------------+------------------+-------------------+--------+-------------+-----------------------+-------------------------+---------+
| 2                | 4                       | 3                | 1                 | 1      | 1           | 1                     | 0                       |         |
+------------------+-------------------------+------------------+-------------------+--------+-------------+-----------------------+-------------------------+---------+
1 row in set (0.000 sec)

ProxySQLAdmin> select * from runtime_mysql_servers;
+--------------+-------------------------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname                      | port | gtid_port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+-------------------------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| 2            | mysql9-0.mysql9-pods.demo.svc | 3306 | 0         | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
| 3            | mysql9-0.mysql9-pods.demo.svc | 3306 | 0         | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
| 3            | mysql9-1.mysql9-pods.demo.svc | 3306 | 0         | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
| 3            | mysql9-2.mysql9-pods.demo.svc | 3306 | 0         | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
+--------------+-------------------------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
4 rows in set (0.001 sec)

ProxySQLAdmin> SELECT * FROM stats.stats_mysql_connection_pool;
+-----------+-------------------------------+----------+--------+----------+----------+--------+---------+-------------+---------+-------------------+-----------------+-----------------+------------+
| hostgroup | srv_host                      | srv_port | status | ConnUsed | ConnFree | ConnOK | ConnERR | MaxConnUsed | Queries | Queries_GTID_sync | Bytes_data_sent | Bytes_data_recv | Latency_us |
+-----------+-------------------------------+----------+--------+----------+----------+--------+---------+-------------+---------+-------------------+-----------------+-----------------+------------+
| 2         | mysql9-0.mysql9-pods.demo.svc | 3306     | ONLINE | 0        | 0        | 0      | 0       | 0           | 0       | 0                 | 0               | 0               | 57         |
| 3         | mysql9-0.mysql9-pods.demo.svc | 3306     | ONLINE | 0        | 1        | 1      | 0       | 1           | 983     | 0                 | 19660           | 29490           | 57         |
| 3         | mysql9-1.mysql9-pods.demo.svc | 3306     | ONLINE | 0        | 1        | 1      | 0       | 1           | 1020    | 0                 | 20400           | 30600           | 55         |
| 3         | mysql9-2.mysql9-pods.demo.svc | 3306     | ONLINE | 0        | 1        | 1      | 0       | 1           | 997     | 0                 | 19940           | 29910           | 63         |
+-----------+-------------------------------+----------+--------+----------+----------+--------+---------+-------------+---------+-------------------+-----------------+-----------------+------------+
4 rows in set (0.000 sec)

Environment:
ProxySQL: 3.0.1-debian
Backends: MySQL 9.1.0 (Group Replication), MySQL 8.4.3 works without errors
Stats show queries are being executed.

Reproduction:
Configure a GR hostgroup for MySQL 9.1.0 replicas.
Run ProxySQL.
Observe log errors

Monitor logs “mysql_num_fields=3” and flags malformed resultset, despite traffic still flowing correctly.

If MySQL 9 is supported, how should I fix this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions