Fixed bug found by PVS-Studio [#CLICKHOUSE-3]

This commit is contained in:
Alexey Milovidov 2018-06-04 18:01:18 +03:00
parent 1829aba596
commit de72b4adde

View File

@ -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))