Uncrustify maxscale
See script directory for method. The script to run in the top level MaxScale directory is called maxscale-uncrustify.sh, which uses another script, list-src, from the same directory (so you need to set your PATH). The uncrustify version was 0.66.
This commit is contained in:
@ -34,7 +34,7 @@ AuroraMonitor::~AuroraMonitor()
|
||||
{
|
||||
}
|
||||
|
||||
//static
|
||||
// static
|
||||
AuroraMonitor* AuroraMonitor::create(MXS_MONITOR* monitor)
|
||||
{
|
||||
return new AuroraMonitor(monitor);
|
||||
@ -42,7 +42,8 @@ AuroraMonitor* AuroraMonitor::create(MXS_MONITOR* monitor)
|
||||
|
||||
bool AuroraMonitor::has_sufficient_permissions() const
|
||||
{
|
||||
return check_monitor_permissions(m_monitor, "SELECT @@aurora_server_id, server_id FROM "
|
||||
return check_monitor_permissions(m_monitor,
|
||||
"SELECT @@aurora_server_id, server_id FROM "
|
||||
"information_schema.replica_host_status "
|
||||
"WHERE session_id = 'MASTER_SESSION_ID'");
|
||||
}
|
||||
@ -60,13 +61,14 @@ void AuroraMonitor::update_server_status(MXS_MONITORED_SERVER* monitored_server)
|
||||
{
|
||||
monitor_clear_pending_status(monitored_server, SERVER_MASTER | SERVER_SLAVE);
|
||||
|
||||
MYSQL_RES *result;
|
||||
MYSQL_RES* result;
|
||||
|
||||
/** Connection is OK, query for replica status */
|
||||
if (mxs_mysql_query(monitored_server->con, "SELECT @@aurora_server_id, server_id FROM "
|
||||
if (mxs_mysql_query(monitored_server->con,
|
||||
"SELECT @@aurora_server_id, server_id FROM "
|
||||
"information_schema.replica_host_status "
|
||||
"WHERE session_id = 'MASTER_SESSION_ID'") == 0 &&
|
||||
(result = mysql_store_result(monitored_server->con)))
|
||||
"WHERE session_id = 'MASTER_SESSION_ID'") == 0
|
||||
&& (result = mysql_store_result(monitored_server->con)))
|
||||
{
|
||||
mxb_assert(mysql_field_count(monitored_server->con) == 2);
|
||||
MYSQL_ROW row = mysql_fetch_row(result);
|
||||
@ -105,10 +107,10 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE()
|
||||
"V1.0.0",
|
||||
MXS_NO_MODULE_CAPABILITIES,
|
||||
&maxscale::MonitorApi<AuroraMonitor>::s_api,
|
||||
NULL, /* Process init. */
|
||||
NULL, /* Process finish. */
|
||||
NULL, /* Thread init. */
|
||||
NULL, /* Thread finish. */
|
||||
NULL, /* Process init. */
|
||||
NULL, /* Process finish. */
|
||||
NULL, /* Thread init. */
|
||||
NULL, /* Thread finish. */
|
||||
{
|
||||
{MXS_END_MODULE_PARAMS}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <maxscale/ccdefs.hh>
|
||||
#include <maxscale/monitor.hh>
|
||||
@ -23,7 +23,7 @@ class AuroraMonitor : public maxscale::MonitorInstanceSimple
|
||||
{
|
||||
public:
|
||||
AuroraMonitor(const AuroraMonitor&) = delete;
|
||||
AuroraMonitor& operator = (const AuroraMonitor&) = delete;
|
||||
AuroraMonitor& operator=(const AuroraMonitor&) = delete;
|
||||
|
||||
~AuroraMonitor();
|
||||
static AuroraMonitor* create(MXS_MONITOR* monitor);
|
||||
|
Reference in New Issue
Block a user