From: Timo Sirainen Date: Mon, 14 Aug 2017 12:44:24 +0000 (+0300) Subject: cassandra: Fix confusing debug logging for paged query results. X-Git-Tag: 2.3.0.rc1~1168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b07a3abc4cc692661f5afd2fb654acb687884613;p=thirdparty%2Fdovecot%2Fcore.git 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. --- 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;