Fix binlogfilter matching
The matching always checked the default database when it should only check it if there are no tables in the statement.
This commit is contained in:
@ -405,10 +405,11 @@ static bool should_skip_query(const BinlogConfig& config, const std::string& sql
|
|||||||
qc_free_table_names(names, n);
|
qc_free_table_names(names, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also check for the default database in case the query has no tables in it
|
// Also check for the default database in case the query has no tables in it. The dot at the end is
|
||||||
if (!rval && should_skip(config, db))
|
// required to distinct database names from table names.
|
||||||
|
if (n == 0)
|
||||||
{
|
{
|
||||||
rval = true;
|
rval = should_skip(config, db + '.');
|
||||||
}
|
}
|
||||||
|
|
||||||
gwbuf_free(buf);
|
gwbuf_free(buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user