diff --git a/dbms/src/Storages/StorageReplicatedMergeTree.cpp b/dbms/src/Storages/StorageReplicatedMergeTree.cpp index 90c0d3418e6..336fef069d0 100644 --- a/dbms/src/Storages/StorageReplicatedMergeTree.cpp +++ b/dbms/src/Storages/StorageReplicatedMergeTree.cpp @@ -3336,7 +3336,7 @@ void StorageReplicatedMergeTree::alter( } else if (rc == Coordination::ZBADVERSION) { - if (dynamic_cast(*results[0]).error) + if (results[0]->error) throw Exception("Metadata on replica is not up to date with common metadata in Zookeeper. Cannot alter", ErrorCodes::CANNOT_ASSIGN_ALTER); continue;