File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ ifndef SCYLLA_TEST_FILTER
5
5
SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.* \
6
6
:BasicsTests.* \
7
7
:ConfigTests.* \
8
+ :NullStringApiArgsTest.* \
8
9
:ConsistencyTwoNodeClusterTests.* \
9
10
:ConsistencyThreeNodeClusterTests.* \
10
11
:SerialConsistencyTests.* \
@@ -31,6 +32,7 @@ ifndef CASSANDRA_TEST_FILTER
31
32
CASSANDRA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.* \
32
33
:BasicsTests.* \
33
34
:ConfigTests.* \
35
+ :NullStringApiArgsTest.* \
34
36
:ConsistencyTwoNodeClusterTests.* \
35
37
:ConsistencyThreeNodeClusterTests.* \
36
38
:SerialConsistencyTests.* \
Original file line number Diff line number Diff line change @@ -555,10 +555,12 @@ pub unsafe extern "C" fn cass_session_prepare_n(
555
555
query : * const c_char ,
556
556
query_length : size_t ,
557
557
) -> * const CassFuture {
558
- let query_str = match ptr_to_cstr_n ( query, query_length) {
559
- Some ( v) => v,
560
- None => return std:: ptr:: null ( ) ,
561
- } ;
558
+ let query_str = ptr_to_cstr_n ( query, query_length)
559
+ // Apparently nullptr denotes an empty statement string.
560
+ // It seems to be intended (for some weird reason, why not save a round-trip???)
561
+ // to receive a server error in such case (CASS_ERROR_SERVER_SYNTAX_ERROR).
562
+ // There is a test for this: `NullStringApiArgsTest.Integration_Cassandra_PrepareNullQuery`.
563
+ . unwrap_or_default ( ) ;
562
564
let query = Query :: new ( query_str. to_string ( ) ) ;
563
565
let cass_session: & CassSession = ptr_to_ref ( cass_session_raw) ;
564
566
You can’t perform that action at this time.
0 commit comments