cql3: select_statement: remove wrong but harmless std::move() in prepare_restrictions

std::move(_where_clause) is wrong, because _where_clause is used later
(when analyzing GROUP BY), but also harmless (because the
statement_restrictions constructor accepts it by const reference).

To avoid confusion in the next patch where we'll pass _where_clause
to a different function, remove the bad std::move() in advance here.
This commit is contained in:
Avi Kivity
2022-07-21 19:45:04 +03:00
parent 8085b9f57a
commit 4aa0a03b7e

View File

@@ -1719,7 +1719,7 @@ select_statement::prepare_restrictions(data_dictionary::database db,
bool allow_filtering)
{
try {
return ::make_shared<restrictions::statement_restrictions>(db, schema, statement_type::SELECT, std::move(_where_clause), ctx,
return ::make_shared<restrictions::statement_restrictions>(db, schema, statement_type::SELECT, _where_clause, ctx,
selection->contains_only_static_columns(), for_view, allow_filtering);
} catch (const exceptions::unrecognized_entity_exception& e) {
if (contains_alias(e.entity)) {