Skip to content

Commit

Permalink
cassandra: Make sure timestamp is always logged (if set) with debug_q…
Browse files Browse the repository at this point in the history
…ueries=y

It wasn't logged in some code paths.
  • Loading branch information
sirainen authored and villesavolainen committed Feb 9, 2018
1 parent bd21369 commit c690a8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib-sql/driver-cassandra.c
Expand Up @@ -1372,6 +1372,7 @@ driver_cassandra_result_more(struct sql_result **_result, bool async,
the caller" error text, so it won't be in the debug log output. */
i_free_and_null(old_result->error);

new_result->timestamp = old_result->timestamp;
new_result->consistency = old_result->consistency;
new_result->page_num = old_result->page_num + 1;
new_result->page0_start_time = old_result->page0_start_time;
Expand Down Expand Up @@ -1573,6 +1574,7 @@ driver_cassandra_transaction_commit(struct sql_transaction_context *_ctx,
/* wait for prepare to finish */
} else {
ctx->stmt->result->statement = ctx->stmt->cass_stmt;
ctx->stmt->result->timestamp = ctx->stmt->timestamp;
(void)driver_cassandra_send_query(ctx->stmt->result);
pool_unref(&ctx->stmt->stmt.pool);
}
Expand Down Expand Up @@ -1984,6 +1986,7 @@ driver_cassandra_statement_query(struct sql_statement *_stmt,
callback, context);
if (stmt->cass_stmt != NULL) {
stmt->result->statement = stmt->cass_stmt;
stmt->result->timestamp = stmt->timestamp;
} else if (stmt->prep != NULL) {
/* wait for prepare to finish */
return;
Expand Down

0 comments on commit c690a8c

Please sign in to comment.