]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
cassandra: Fix confusing debug logging for paged query results.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 14 Aug 2017 12:44:24 +0000 (15:44 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 16 Aug 2017 06:30:51 +0000 (09:30 +0300)
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

index 57b4e6ee04029b163ec798e624e82543e7eaadda..fa6a8330e52d12d8ab0224a605f7557274721d6f 100644 (file)
@@ -1296,6 +1296,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;