Skip to content

Commit

Permalink
Revert "Merge pull request #806 from sylwiaszunejko/prepare_query"
Browse files Browse the repository at this point in the history
This reverts commit 5d27034, reversing
changes made to 6f0dcfd.
  • Loading branch information
piodul committed Oct 6, 2023
1 parent a9241e6 commit ccde0ca
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 127 deletions.
14 changes: 0 additions & 14 deletions scylla/src/transport/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,20 +657,6 @@ impl Connection {
) -> Result<QueryResponse, QueryError> {
let serialized_values = values.serialized()?;

let values_size = serialized_values.size();
if values_size != 0 {
let prepared = self.prepare(query).await?;
return self
.execute_with_consistency(
&prepared,
values,
consistency,
serial_consistency,
paging_state,
)
.await;
}

let query_frame = query::Query {
contents: Cow::Borrowed(&query.contents),
parameters: query::QueryParameters {
Expand Down
1 change: 0 additions & 1 deletion scylla/tests/integration/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ mod lwt_optimisation;
mod new_session;
mod retries;
mod shards;
mod silent_prepare_query;
pub(crate) mod utils;
4 changes: 2 additions & 2 deletions scylla/tests/integration/retries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async fn speculative_execution_is_fired() {
q.set_is_idempotent(true); // this is to allow speculative execution to fire

let drop_frame_rule = RequestRule(
Condition::RequestOpcode(RequestOpcode::Prepare)
Condition::RequestOpcode(RequestOpcode::Query)
.and(Condition::BodyContainsCaseSensitive(Box::new(*b"t"))),
RequestReaction::drop_frame(),
);
Expand Down Expand Up @@ -121,7 +121,7 @@ async fn retries_occur() {
q.set_is_idempotent(true); // this is to allow retry to fire

let forge_error_rule = RequestRule(
Condition::RequestOpcode(RequestOpcode::Prepare)
Condition::RequestOpcode(RequestOpcode::Query)
.and(Condition::BodyContainsCaseSensitive(Box::new(*b"INTO t"))),
RequestReaction::forge().server_error(),
);
Expand Down
110 changes: 0 additions & 110 deletions scylla/tests/integration/silent_prepare_query.rs

This file was deleted.

0 comments on commit ccde0ca

Please sign in to comment.