Skip to content

Commit 02622b1

Browse files
committed
don't unset paging state if null ptr passed
The code of `cass_statement_set_paging_state_token` was unsetting the paging state on a statement if a null paging state pointer was passed. This is inconsistent with the behavior of other setters, which preserve the existing state if a null pointer is passed. The code is changed to preserve the existing paging state in this case. Note: CPP Driver does not check the passed pointer for null at all.
1 parent 3450125 commit 02622b1

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

scylla-rust-wrapper/src/statement.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ pub unsafe extern "C" fn cass_statement_set_paging_state_token(
422422
};
423423

424424
if paging_state.is_null() {
425-
statement_from_raw.paging_state = PagingState::start();
426425
return CassError::CASS_ERROR_LIB_NULL_VALUE;
427426
}
428427

0 commit comments

Comments
 (0)