mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 01:30:51 +00:00
Fix DROP MV with max_table_size_to_drop. [#CLICKHOUSE-3]
Resolves #1863
This commit is contained in:
parent
56add902d4
commit
d5fd8b9b5f
@ -190,6 +190,12 @@ StoragePtr StorageMaterializedView::getTargetTable() const
|
||||
return global_context.getTable(target_database_name, target_table_name);
|
||||
}
|
||||
|
||||
bool StorageMaterializedView::checkTableCanBeDropped() const
|
||||
{
|
||||
/// Don't drop the target table if it was created manually via 'TO inner_table' statement
|
||||
return has_inner_table ? getTargetTable()->checkTableCanBeDropped() : true;
|
||||
}
|
||||
|
||||
|
||||
void registerStorageMaterializedView(StorageFactory & factory)
|
||||
{
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
void drop() override;
|
||||
bool optimize(const ASTPtr & query, const ASTPtr & partition, bool final, bool deduplicate, const Context & context) override;
|
||||
void shutdown() override;
|
||||
bool checkTableCanBeDropped() const override;
|
||||
|
||||
BlockInputStreams read(
|
||||
const Names & column_names,
|
||||
|
Loading…
Reference in New Issue
Block a user