From c8a66efb6a483cb4f595fdbbf956538eacefcebb Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 15 Apr 2018 20:36:36 +0300 Subject: [PATCH] cql: query_processor: don't call cql_statement::execute_internal() any more All cql_statement::execute_internal() overrides now either throw or call execute(). Since we shouldn't be calling the throwing overrides internally, we can safely call execute() instead. This allows us to get rid of execute_internal(). --- cql3/query_processor.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/cql3/query_processor.cc b/cql3/query_processor.cc index 6f11251922..3c2e2b1424 100644 --- a/cql3/query_processor.cc +++ b/cql3/query_processor.cc @@ -291,12 +291,7 @@ query_processor::process_authorized_statement(const ::shared_ptr statement->validate(_proxy, client_state); - auto fut = make_ready_future<::shared_ptr>(); - if (client_state.is_internal()) { - fut = statement->execute_internal(_proxy, query_state, options); - } else { - fut = statement->execute(_proxy, query_state, options); - } + auto fut = statement->execute(_proxy, query_state, options); return fut.then([statement] (auto msg) { if (msg) { @@ -522,7 +517,7 @@ future<> query_processor::for_each_cql_result( future<::shared_ptr> query_processor::execute_paged_internal(::shared_ptr state) { - return state->p->statement->execute_internal(_proxy, *_internal_state, *state->opts).then( + return state->p->statement->execute(_proxy, *_internal_state, *state->opts).then( [state, this](::shared_ptr msg) mutable { class visitor : public result_message::visitor_base { ::shared_ptr _state; @@ -563,7 +558,7 @@ query_processor::execute_internal( const std::initializer_list& values) { query_options opts = make_internal_options(p, values, db::consistency_level::ONE, infinite_timeout_config); return do_with(std::move(opts), [this, p = std::move(p)](auto& opts) { - return p->statement->execute_internal( + return p->statement->execute( _proxy, *_internal_state, opts).then([&opts, stmt = p->statement](auto msg) {