client: do not try to fuzz USE queries

This commit is contained in:
Azat Khuzhin 2021-10-02 11:15:34 +03:00
parent a419fe6633
commit 4d5ca0f409

View File

@ -711,6 +711,13 @@ bool Client::processWithFuzzing(const String & full_query)
throw;
}
// `USE db` should not be executed
// since this will break every query after `DROP db`
if (orig_ast->as<ASTUseQuery>())
{
return true;
}
if (!orig_ast)
{
// Can't continue after a parsing error