Fix SYSTEM START/STOP DISTRIBUTED SENDS w/o table name

This commit is contained in:
Azat Khuzhin 2020-06-04 20:22:29 +03:00
parent 799f9f9011
commit 0f368c804d
2 changed files with 8 additions and 1 deletions

View File

@ -75,7 +75,12 @@ bool ParserSystemQuery::parseImpl(IParser::Pos & pos, ASTPtr & node, Expected &
}
res->cluster = cluster_str;
if (!parseDatabaseAndTableName(pos, expected, res->database, res->table))
{
/// FLUSH DISTRIBUTED requires table
/// START/STOP DISTRIBUTED SENDS does not requires table
if (res->type == Type::FLUSH_DISTRIBUTED)
return false;
}
break;
}

View File

@ -10,9 +10,11 @@ create table db_01294.dist_01294 as system.one engine=Distributed(test_shard_loc
system flush distributed db_01294.dist_01294;
system flush distributed on cluster test_shard_localhost db_01294.dist_01294;
-- stop
system stop distributed sends;
system stop distributed sends db_01294.dist_01294;
system stop distributed sends on cluster test_shard_localhost db_01294.dist_01294;
-- start
system start distributed sends;
system start distributed sends db_01294.dist_01294;
system start distributed sends on cluster test_shard_localhost db_01294.dist_01294;