From de72b4addefde9d03cf3438c7d0e4a4aaab22f27 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 4 Jun 2018 18:01:18 +0300 Subject: [PATCH] Fixed bug found by PVS-Studio [#CLICKHOUSE-3] --- dbms/src/Storages/MergeTree/MergeTreeData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Storages/MergeTree/MergeTreeData.cpp b/dbms/src/Storages/MergeTree/MergeTreeData.cpp index 1cf5df81ed3..59bb542c271 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeData.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeData.cpp @@ -2340,7 +2340,7 @@ MergeTreeData * MergeTreeData::checkStructureAndGetMergeTreeData(const StoragePt return ast ? queryToString(ast) : ""; }; - if (query_to_string(secondary_sort_expr_ast) != query_to_string(secondary_sort_expr_ast)) + if (query_to_string(secondary_sort_expr_ast) != query_to_string(src_data->secondary_sort_expr_ast)) throw Exception("Tables have different ordering", ErrorCodes::BAD_ARGUMENTS); if (query_to_string(partition_expr_ast) != query_to_string(src_data->partition_expr_ast))