Skip to content

Commit

Permalink
cassandra: Fix confusing debug logging for paged query results.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sirainen authored and villesavolainen committed Aug 16, 2017
1 parent 06cdb86 commit 9cd764c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib-sql/driver-cassandra.c
Expand Up @@ -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;
Expand Down

0 comments on commit 9cd764c

Please sign in to comment.