From 2b235f1b1abf70bda2a563ea2c7977c4c9fa1188 Mon Sep 17 00:00:00 2001 From: alesapin Date: Tue, 31 Mar 2020 22:33:37 +0300 Subject: [PATCH] Remove dynamic cast from check --- dbms/src/Storages/StorageReplicatedMergeTree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;