Match against default database of queries

If a query doesn't define a table, the default database wouldn't get
checked. To prevent this, it must be explicitly checked.
This commit is contained in:
Markus Mäkelä 2019-03-22 18:28:17 +02:00
parent 74c888316e
commit e88b7f56f9
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -405,6 +405,12 @@ 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
if (!rval && should_skip(config, db))
{
rval = true;
}
gwbuf_free(buf);
return rval;
}