From b1961042a7c7b3d5a8dcd880e1d64dd090427c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 2 Dec 2019 09:08:00 +0200 Subject: [PATCH] MXS-2776: Fix unwanted regex checks on COMMIT The default database check would be done even on transaction management commands which would cause them to always be skipped when a match was defined. --- .../filter/binlogfilter/binlogfiltersession.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/modules/filter/binlogfilter/binlogfiltersession.cc b/server/modules/filter/binlogfilter/binlogfiltersession.cc index 912e27a50..31ebfaee2 100644 --- a/server/modules/filter/binlogfilter/binlogfiltersession.cc +++ b/server/modules/filter/binlogfilter/binlogfiltersession.cc @@ -403,13 +403,13 @@ static bool should_skip_query(const BinlogConfig& config, const std::string& sql } qc_free_table_names(names, n); - } - // Also check for the default database in case the query has no tables in it. The dot at the end is - // required to distinct database names from table names. - if (n == 0) - { - rval = should_skip(config, db + '.'); + // Also check for the default database in case the query has no tables in it. The dot at the end is + // required to distinct database names from table names. + if (n == 0) + { + rval = should_skip(config, db + '.'); + } } gwbuf_free(buf);