diff --git a/cql3/statements/create_keyspace_statement.cc b/cql3/statements/create_keyspace_statement.cc index 7153c9b316..d02a763530 100644 --- a/cql3/statements/create_keyspace_statement.cc +++ b/cql3/statements/create_keyspace_statement.cc @@ -115,8 +115,7 @@ void create_keyspace_statement::validate(query_processor&, const service::client future, std::vector>> create_keyspace_statement::prepare_schema_mutations(query_processor& qp) const { using namespace cql_transport; - auto p = qp.proxy().shared_from_this(); - const auto& tm = *p->get_token_metadata_ptr(); + const auto& tm = *qp.proxy().get_token_metadata_ptr(); ::shared_ptr ret; std::vector m;