From 6977828f2d57a45192c5936ce7c83b722ef81d39 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Thu, 10 Jan 2019 10:04:20 +0200 Subject: [PATCH 1/5] Update maintenance version in 2.2 minor branch --- VERSION22.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION22.cmake b/VERSION22.cmake index 6ba5b4cc3..b218f991e 100644 --- a/VERSION22.cmake +++ b/VERSION22.cmake @@ -5,7 +5,7 @@ set(MAXSCALE_VERSION_MAJOR "2" CACHE STRING "Major version") set(MAXSCALE_VERSION_MINOR "2" CACHE STRING "Minor version") -set(MAXSCALE_VERSION_PATCH "19" CACHE STRING "Patch version") +set(MAXSCALE_VERSION_PATCH "20" CACHE STRING "Patch version") # This should only be incremented if a package is rebuilt set(MAXSCALE_BUILD_NUMBER 1 CACHE STRING "Release number") From 4c61b646a4b3177071084bcc4f427aec983df9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 10 Jan 2019 10:01:21 +0200 Subject: [PATCH 2/5] Wait two intervals in mysqlmon_failover_rejoin_old_slave The failover process takes at least two intervals to happen. With only a single wait, it was down to luck whether the test would succeed. --- maxscale-system-test/mysqlmon_failover_rejoin_old_slave.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maxscale-system-test/mysqlmon_failover_rejoin_old_slave.cpp b/maxscale-system-test/mysqlmon_failover_rejoin_old_slave.cpp index 26ecf601f..5ee18dbc8 100644 --- a/maxscale-system-test/mysqlmon_failover_rejoin_old_slave.cpp +++ b/maxscale-system-test/mysqlmon_failover_rejoin_old_slave.cpp @@ -152,7 +152,7 @@ void run(TestConnections& test) cout << "\nStopping master." << endl; test.repl->stop_node(0); - test.maxscales->wait_for_monitor(); + test.maxscales->wait_for_monitor(2); // server1 (previous master) was taken down, so its state should be /Down/. // server2 should have been made into master, and server4 should still be down. @@ -164,7 +164,7 @@ void run(TestConnections& test) cout << "\nBringing up slave " << N - 1 << endl; test.repl->start_node(N - 1, (char*)""); - test.maxscales->wait_for_monitor(); + test.maxscales->wait_for_monitor(2); // server1 should still be down, server2 still master, and server3 still // a slave. server4 was brought up, so it should have been rejoined and From 8ac786110eaa2ed75fc613330961df084c75ade9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 10 Jan 2019 22:24:35 +0200 Subject: [PATCH 3/5] MXS-2255: Fix COMMIT matching The code used a rather questionable method for parsing SQL statements instead of using the query classifier for detecting transaction start and stop events. --- .../binlogfilter/binlogfiltersession.cc | 41 ++++++++----------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/server/modules/filter/binlogfilter/binlogfiltersession.cc b/server/modules/filter/binlogfilter/binlogfiltersession.cc index eeadc51ca..508404828 100644 --- a/server/modules/filter/binlogfilter/binlogfiltersession.cc +++ b/server/modules/filter/binlogfilter/binlogfiltersession.cc @@ -51,6 +51,7 @@ #include #include #include +#include #include "binlogfilter.hh" #include "binlogfiltersession.hh" @@ -380,33 +381,30 @@ static bool should_skip(const BinlogConfig& config, const std::string& str) static bool should_skip_query(const BinlogConfig& config, const std::string& sql, const std::string& db = "") { - uint32_t pktlen = sql.size() + 1; // Payload and command byte - GWBUF* buf = gwbuf_alloc(MYSQL_HEADER_LEN + pktlen); - uint8_t* data = GWBUF_DATA(buf); - - data[0] = pktlen; - data[1] = pktlen >> 8; - data[2] = pktlen >> 16; - data[3] = 0; - data[4] = (uint8_t)MXS_COM_QUERY; - strcpy((char*)&data[5], sql.c_str()); - + GWBUF* buf = modutil_create_query(sql.c_str()); bool rval = false; int n = 0; - char** names = qc_get_table_names(buf, &n, true); - for (int i = 0; i < n; i++) + if (qc_get_trx_type_mask(buf) == 0) { - std::string name = strchr(names[i], '.') ? names[i] : db + "." + names[i]; + // Not a transaction management related command - if (should_skip(config, name)) + char** names = qc_get_table_names(buf, &n, true); + + for (int i = 0; i < n; i++) { - rval = true; - break; + std::string name = strchr(names[i], '.') ? names[i] : db + "." + names[i]; + + if (should_skip(config, name)) + { + rval = true; + break; + } } + + qc_free_table_names(names, n); } - qc_free_table_names(names, n); gwbuf_free(buf); return rval; } @@ -796,13 +794,6 @@ bool BinlogFilterSession::checkStatement(const uint8_t* event, const uint32_t ev std::string db((char*)event + static_size + var_block_len, db_name_len); std::string sql((char*)event + static_size + var_block_len + db_name_len + 1, statement_len); - std::string lower_sql; - std::transform(sql.begin(), sql.end(), std::back_inserter(lower_sql), tolower); - - if (lower_sql.find("commit") != std::string::npos) - { - return false; - } m_skip = should_skip_query(m_filter.getConfig(), sql, db); MXS_INFO("[%s] (%s) %s", m_skip ? "SKIP" : " ", db.c_str(), sql.c_str()); From 6eeb02d55d0082f23f30f8fc20afc907da50e727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 10 Jan 2019 23:51:13 +0200 Subject: [PATCH 4/5] Fix writeq_low_water documentation The throttling is removed once the buffer size falls under writeq_low_water, not writeq_high_water. --- Documentation/Getting-Started/Configuration-Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index 49f5894bd..a8628b84c 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -854,7 +854,7 @@ throtting is enabled. By default, traffic throttling is disabled. #### `writeq_low_water` Low water mark for network write buffer. Once the traffic throttling is enabled, -it will only be disabled when the write queue is below `writeq_high_water`. The +it will only be disabled when the write queue is below `writeq_low_water`. The parameter accepts size type values. The minimum allowed size is 512 bytes. `writeq_high_water` must always be greater than `writeq_low_water`. From 18c57dc6ccad2cbd29b5902fda2f298b51944e48 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Fri, 11 Jan 2019 12:58:33 +0200 Subject: [PATCH 5/5] Update 2.2.19 release date --- Documentation/Release-Notes/MaxScale-2.2.19-Release-Notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Release-Notes/MaxScale-2.2.19-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.2.19-Release-Notes.md index 498339da5..8ff6492e8 100644 --- a/Documentation/Release-Notes/MaxScale-2.2.19-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.2.19-Release-Notes.md @@ -1,4 +1,4 @@ -# MariaDB MaxScale 2.2.19 Release Notes +# MariaDB MaxScale 2.2.19 Release Notes -- 2019-01-11 Release 2.2.19 is a GA release.