From 75d50c341181651b7338e870f6103dcb02c21235 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 15 May 2019 09:19:09 +0300 Subject: [PATCH 1/3] Update 2.3 maintenance version number --- VERSION23.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION23.cmake b/VERSION23.cmake index 3bceeb242..eae567a0c 100644 --- a/VERSION23.cmake +++ b/VERSION23.cmake @@ -5,7 +5,7 @@ set(MAXSCALE_VERSION_MAJOR "2" CACHE STRING "Major version") set(MAXSCALE_VERSION_MINOR "3" CACHE STRING "Minor version") -set(MAXSCALE_VERSION_PATCH "7" CACHE STRING "Patch version") +set(MAXSCALE_VERSION_PATCH "8" CACHE STRING "Patch version") # This should only be incremented if a package is rebuilt set(MAXSCALE_BUILD_NUMBER 1 CACHE STRING "Release number") From 8a67c702b8af0df93f3bd2abc561c12c22b3c62e Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 15 May 2019 14:55:21 +0300 Subject: [PATCH 2/3] MXS-2475 Final fix for mxs1980_blr_galera_server_ids In this context wsrep_gtid_domain_id and gtid_domain_id need to be the same to ensure that all gtids will be the same. --- maxscale-system-test/mxs1980_blr_galera_server_ids.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maxscale-system-test/mxs1980_blr_galera_server_ids.cpp b/maxscale-system-test/mxs1980_blr_galera_server_ids.cpp index 81d6d8b9f..27a04f134 100644 --- a/maxscale-system-test/mxs1980_blr_galera_server_ids.cpp +++ b/maxscale-system-test/mxs1980_blr_galera_server_ids.cpp @@ -287,7 +287,7 @@ void setup_galera(TestConnections& test) gc.stash_server_settings(i); // https://mariadb.com/kb/en/library/using-mariadb-gtids-with-mariadb-galera-cluster/#wsrep-gtid-mode gc.add_server_setting(i, "wsrep_gtid_mode=ON"); - gc.add_server_setting(i, "wsrep_gtid_domain_id=13"); + gc.add_server_setting(i, "wsrep_gtid_domain_id=0"); gc.add_server_setting(i, "gtid_domain_id=0"); gc.add_server_setting(i, "log_slave_updates=1"); gc.add_server_setting(i, "log_bin=galera-cluster"); From 0f85baabe18f97b53e7addcdbffe2f3e635dfd63 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 15 May 2019 13:43:53 +0300 Subject: [PATCH 3/3] MXS-2491 Remove global destructor inter-dependency log.cc:this_unit.slogger depends upon logger.cc:this_unit.ident. Depending on which one is destructed first, there will be a crash or then not. It seems that the destruction order when returning from main() is not necessarily the same as that when calling exit() in main, as this bug is triggered with compilers versions and not with other. --- maxutils/maxbase/src/logger.cc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/maxutils/maxbase/src/logger.cc b/maxutils/maxbase/src/logger.cc index f76bc8154..8dd519257 100644 --- a/maxutils/maxbase/src/logger.cc +++ b/maxutils/maxbase/src/logger.cc @@ -70,17 +70,20 @@ bool should_log_error() struct this_unit { - std::string ident; + static const int MAX_IDENT_LEN = 256; + + // Don't change to std::string. Order of destruction issue with logger.cc:this_unit. + char ident[MAX_IDENT_LEN + 1]; } this_unit; std::string get_ident() { - if (this_unit.ident.empty()) + if (!this_unit.ident[0]) { #ifdef __GNUC__ - this_unit.ident = program_invocation_short_name; + return program_invocation_short_name; #else - this_unit.ident = "The Program"; + return "The Program"; #endif } @@ -98,7 +101,15 @@ namespace maxbase // static void Logger::set_ident(const std::string& ident) { - this_unit.ident = ident; + int len = ident.length(); + + if (len > this_unit.MAX_IDENT_LEN) + { + len = this_unit.MAX_IDENT_LEN; + } + + this_unit.ident[len] = 0; + memcpy(this_unit.ident, ident.c_str(), len); } std::unique_ptr FileLogger::create(const std::string& filename)