From c19d2efd8827cfe2c6e08036ad224326d6041343 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 16 Oct 2020 20:16:58 +0300 Subject: [PATCH] add more holders --- src/Storages/StorageBuffer.cpp | 1 + src/Storages/StorageMaterializeMySQL.cpp | 1 + src/Storages/StorageMerge.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/src/Storages/StorageBuffer.cpp b/src/Storages/StorageBuffer.cpp index 659df2026c8..c6af686a7b9 100644 --- a/src/Storages/StorageBuffer.cpp +++ b/src/Storages/StorageBuffer.cpp @@ -239,6 +239,7 @@ Pipe StorageBuffer::read( } pipe_from_dst.addTableLock(destination_lock); + pipe_from_dst.addStorageHolder(destination); } Pipe pipe_from_buffers; diff --git a/src/Storages/StorageMaterializeMySQL.cpp b/src/Storages/StorageMaterializeMySQL.cpp index c56d0f610e7..56dc47e59d5 100644 --- a/src/Storages/StorageMaterializeMySQL.cpp +++ b/src/Storages/StorageMaterializeMySQL.cpp @@ -82,6 +82,7 @@ Pipe StorageMaterializeMySQL::read( } Pipe pipe = nested_storage->read(require_columns_name, nested_metadata, query_info, context, processed_stage, max_block_size, num_streams); + pipe.addTableLock(lock); if (!expressions->children.empty() && !pipe.empty()) { diff --git a/src/Storages/StorageMerge.cpp b/src/Storages/StorageMerge.cpp index 5c68d2dd047..4bc40b4b26f 100644 --- a/src/Storages/StorageMerge.cpp +++ b/src/Storages/StorageMerge.cpp @@ -357,6 +357,7 @@ Pipe StorageMerge::createSources( convertingSourceStream(header, metadata_snapshot, *modified_context, modified_query_info.query, pipe, processed_stage); pipe.addTableLock(struct_lock); + pipe.addStorageHolder(storage); pipe.addInterpreterContext(modified_context); }