From ffd3d2519eb51117f6c143122b2b13f32d1b2b8d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 16 Oct 2020 03:13:17 +0300 Subject: [PATCH] Avoid stack overflow in materialized views, part 1 --- src/Storages/StorageMaterializedView.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Storages/StorageMaterializedView.cpp b/src/Storages/StorageMaterializedView.cpp index 3e1df80ff42..8c7c6c7c9f1 100644 --- a/src/Storages/StorageMaterializedView.cpp +++ b/src/Storages/StorageMaterializedView.cpp @@ -21,6 +21,7 @@ #include #include +#include #include @@ -319,11 +320,13 @@ void StorageMaterializedView::shutdown() StoragePtr StorageMaterializedView::getTargetTable() const { + checkStackSize(); return DatabaseCatalog::instance().getTable(target_table_id, global_context); } StoragePtr StorageMaterializedView::tryGetTargetTable() const { + checkStackSize(); return DatabaseCatalog::instance().tryGetTable(target_table_id, global_context); }