diff --git a/dbms/src/Storages/StorageReplicatedMergeTree.cpp b/dbms/src/Storages/StorageReplicatedMergeTree.cpp index ddb5d20599e..27651b03a5c 100644 --- a/dbms/src/Storages/StorageReplicatedMergeTree.cpp +++ b/dbms/src/Storages/StorageReplicatedMergeTree.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -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(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);