Add more error messages to monitors

When the execution of a query fails, the error reported by the Connector-C
and the server where the query was executed is logged.
This commit is contained in:
Markus Mäkelä
2017-08-02 20:56:54 +03:00
parent ab82c7455c
commit f7b8744460
7 changed files with 65 additions and 10 deletions

View File

@ -492,6 +492,10 @@ static inline void monitor_mysql_db(MXS_MONITOR_SERVERS* database, MYSQL_SERVER_
mysql_free_result(result);
}
else
{
mon_report_query_error(database);
}
}
/**
@ -544,7 +548,10 @@ static MXS_MONITOR_SERVERS *build_mysql51_replication_tree(MXS_MONITOR *mon)
mysql_free_result(result);
}
else
{
mon_report_query_error(database);
}
/* Set the Slave Role */
if (ismaster)
@ -718,6 +725,10 @@ monitorDatabase(MXS_MONITOR *mon, MXS_MONITOR_SERVERS *database)
}
mysql_free_result(result);
}
else
{
mon_report_query_error(database);
}
/* Check first for MariaDB 10.x.x and get status for multi-master replication */
if (server_version >= 100000)