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`. 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. diff --git a/maxscale-system-test/mysqlmon_failover_rejoin_old_slave.cpp b/maxscale-system-test/mysqlmon_failover_rejoin_old_slave.cpp index c8be47839..fd7993353 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 diff --git a/server/modules/filter/binlogfilter/binlogfiltersession.cc b/server/modules/filter/binlogfilter/binlogfiltersession.cc index 8f750d65b..33c7fd650 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());