From b07a3abc4cc692661f5afd2fb654acb687884613 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 14 Aug 2017 15:44:24 +0300 Subject: [PATCH] cassandra: Fix confusing debug logging for paged query results. Even when caller supported paged queries, the debug output contained "Paged query has more results, but not supported by the caller". Clear out the error after sql_result_more() is called, so it won't be logged. --- src/lib-sql/driver-cassandra.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib-sql/driver-cassandra.c b/src/lib-sql/driver-cassandra.c index ddee701f4e..5de4753d19 100644 --- a/src/lib-sql/driver-cassandra.c +++ b/src/lib-sql/driver-cassandra.c @@ -1301,6 +1301,9 @@ driver_cassandra_result_more(struct sql_result **_result, bool async, cass_statement_set_paging_state(new_result->statement, old_result->result); old_result->paging_continues = TRUE; + /* The caller did support paging. Clear out the "...not supported by + the caller" error text, so it won't be in the debug log output. */ + i_free_and_null(old_result->error); new_result->page_num = old_result->page_num + 1; new_result->page0_start_time = old_result->page0_start_time; -- 2.47.3