changeset 22811:d880c3334a2f

cassandra: Make sure timestamp is always logged (if set) with debug_queries=y It wasn't logged in some code paths.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 07 Feb 2018 15:28:45 +0200
parents 41c67443c1c5
children ae87a7535b2a
files src/lib-sql/driver-cassandra.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-sql/driver-cassandra.c	Wed Feb 07 15:27:07 2018 +0200
+++ b/src/lib-sql/driver-cassandra.c	Wed Feb 07 15:28:45 2018 +0200
@@ -1372,6 +1372,7 @@
 	   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;
@@ -1573,6 +1574,7 @@
 			/* 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);
 		}
@@ -1984,6 +1986,7 @@
 						   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;