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:
@ -405,6 +405,12 @@ 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
|
||||||
|
if (!rval && should_skip(config, db))
|
||||||
|
{
|
||||||
|
rval = true;
|
||||||
|
}
|
||||||
|
|
||||||
gwbuf_free(buf);
|
gwbuf_free(buf);
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user