diff --git a/src/Storages/StorageTableFunction.h b/src/Storages/StorageTableFunction.h index d44133a1a89..4f9ca5d5858 100644 --- a/src/Storages/StorageTableFunction.h +++ b/src/Storages/StorageTableFunction.h @@ -142,6 +142,7 @@ public: StoragePolicyPtr getStoragePolicy() const override { + std::lock_guard lock{nested_mutex}; if (nested) return StorageProxy::getStoragePolicy(); return IStorage::getStoragePolicy();