```
DROP TABLE IF EXISTS foo;

CREATE TABLE foo (timestamp DateTime, x UInt64)
ENGINE = MergeTree PARTITION BY toYYYYMMDD(timestamp)
ORDER BY (timestamp);

INSERT INTO foo (timestamp, x) SELECT toDateTime('2020-01-01 00:05:00'), number from system.numbers_mt LIMIT 100;

SELECT count() FROM system.mutations; -- ok

ALTER TABLE foo UPDATE x = 1 WHERE x = (SELECT x from foo WHERE x = 1);

SELECT count() FROM system.mutations; -- stuck

```
{
    const MergeTreeData * merge_tree_data = dynamic_cast<const MergeTreeData *>(storage.get());
    if (!merge_tree_data)
        return {};
    NameSet key_columns;
    for (const String & col : metadata_snapshot->getColumnsRequiredForPartitionKey())
        key_columns.insert(col);
    for (const String & col : metadata_snapshot->getColumnsRequiredForSortingKey())
        key_columns.insert(col);
    
    if (!merge_tree_data->merging_params.sign_column.empty())
        key_columns.insert(merge_tree_data->merging_params.sign_column);
    if (!merge_tree_data->merging_params.version_column.empty())
        key_columns.insert(merge_tree_data->merging_params.version_column);
    return key_columns;
}
static bool materializeTTLRecalculateOnly(const StoragePtr & storage)