mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
ReplicatedMergeTree: send drop request to the leader replica
This commit is contained in:
parent
881893da56
commit
0f509b9eb5
@ -15,6 +15,7 @@
|
||||
#include <Databases/IDatabase.h>
|
||||
|
||||
#include <Parsers/formatAST.h>
|
||||
#include <Parsers/ASTDropQuery.h>
|
||||
#include <Parsers/ASTOptimizeQuery.h>
|
||||
#include <Parsers/ASTLiteral.h>
|
||||
|
||||
@ -3826,6 +3827,11 @@ void StorageReplicatedMergeTree::sendRequestToLeaderReplica(const ASTPtr & query
|
||||
optimize->database = leader_address.database;
|
||||
optimize->table = leader_address.table;
|
||||
}
|
||||
else if (auto * drop = typeid_cast<ASTDropQuery *>(new_query.get()))
|
||||
{
|
||||
drop->database = leader_address.database;
|
||||
drop->table = leader_address.table;
|
||||
}
|
||||
else
|
||||
throw Exception("Can't proxy this query. Unsupported query type", ErrorCodes::NOT_IMPLEMENTED);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user