From 0f08ba0d7088508ba76ae55f8bd7a25bb81c2c94 Mon Sep 17 00:00:00 2001 From: Miro Stauder Date: Wed, 25 Jan 2023 14:06:34 +0000 Subject: [PATCH] fix compilation on GCC 4.8 --- lib/MySQL_Monitor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index 0acbbf5a1..92b97bf4a 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -3425,9 +3425,9 @@ srv_mmsd_t init_mmsd_with_conn(const gr_host_def_t srv_def, uint32_t writer_hg, ); // Update 'mmsd' error message to report connection creating failure - cfmt_t conn_err_msg { - cstr_format("timeout or error in creating new connection: %s", mmsd->mysql_error_msg) - }; + cfmt_t conn_err_msg = cstr_format( + "timeout or error in creating new connection: %s", mmsd->mysql_error_msg + ); mmsd->mysql_error_msg = strdup(conn_err_msg.str.c_str()); } } @@ -3533,7 +3533,7 @@ const char MYSQL_8_GR_QUERY[] { }; void gr_fetch_srv_status(srv_mmsd_t& ini_mmsd) { - unique_ptr& mmsd { ini_mmsd.mmsd }; + unique_ptr& mmsd = ini_mmsd.mmsd; if (ini_mmsd.mmsd->mysql == nullptr) { proxy_warning( @@ -3658,7 +3658,7 @@ gr_node_info_t gr_update_hosts_map( // Consider 'time_now' to be 'now - fetch_duration' unsigned long long time_now=realtime_time(); time_now=time_now-(mmsd->t2 - start_time); - cfmt_t fmt_srv_addr { cstr_format("%s:%d", mmsd->hostname, mmsd->port) }; + cfmt_t fmt_srv_addr = cstr_format("%s:%d", mmsd->hostname, mmsd->port); pthread_mutex_lock(&GloMyMon->group_replication_mutex);