How to reproduce:

```sql
VM-16-2-centos :) create table mem_test(a Int64, b Int64) engine = Memory

CREATE TABLE mem_test
(
    `a` Int64,
    `b` Int64
)
ENGINE = Memory

Query id: fb8d3ab7-6e69-410d-b5e3-9891c8604a9c

Ok.

0 rows in set. Elapsed: 0.004 sec. 
VM-16-2-centos :) set max_block_size = 3

SET max_block_size = 3

Query id: 6803f260-4893-4f0b-91cf-fc5d5670ce7c

Ok.

0 rows in set. Elapsed: 0.001 sec.

VM-16-2-centos :) insert into mem_test select number, number from numbers(100)

INSERT INTO mem_test SELECT
    number,
    number
FROM numbers(100)

Query id: 19f11e21-4b76-4015-ac05-99732facee6a

Ok.

0 rows in set. Elapsed: 0.002 sec.
VM-16-2-centos :) alter table mem_test update  a = 0 where b = 99

ALTER TABLE mem_test
    UPDATE a = 0 WHERE b = 99

Query id: a9d72960-7c86-4195-b739-7148fea99c10

Ok.

0 rows in set. Elapsed: 0.001 sec. 

VM-16-2-centos :) select * from mem_test format Null

SELECT *
FROM mem_test
FORMAT Null

Query id: 413f4d7e-cca9-4523-aedb-f9673bc515cb


0 rows in set. Elapsed: 0.011 sec. 

Received exception from server (version 21.6.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Invalid number of rows in Chunk column Int64 position 1: expected 1, got 3: While executing Memory. 


```
{
    using InitializerFunc = std::function<void(std::shared_ptr<const Blocks> &)>;
public:
    MemorySource(
        Names column_names_,
        const StorageMemory & storage,
        const StorageMetadataPtr & metadata_snapshot,
        std::shared_ptr<const Blocks> data_,
        std::shared_ptr<std::atomic<size_t>> parallel_execution_index_,
        InitializerFunc initializer_func_ = {})
        : SourceWithProgress(metadata_snapshot->getSampleBlockForColumns(column_names_, storage.getVirtuals(), storage.getStorageID()))
        , column_names_and_types(metadata_snapshot->getColumns().getAllWithSubcolumns().addTypes(std::move(column_names_)))
        , data(data_)
        , parallel_execution_index(parallel_execution_index_)
        , initializer_func(std::move(initializer_func_))
    {
    }
    String getName() const override { return "Memory"; }