From f57e7a1e909297cba8680f2c606a9b602fef623e Mon Sep 17 00:00:00 2001 From: sfc-gh-ext-simba-hx Date: Wed, 18 Dec 2024 16:28:46 -0800 Subject: [PATCH] fix build/test failures --- lib/client.c | 7 +------ tests/test_bind_params.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/client.c b/lib/client.c index bf00f7a072..33d090cc77 100644 --- a/lib/client.c +++ b/lib/client.c @@ -1990,7 +1990,6 @@ cJSON* STDCALL _snowflake_get_binding_json(SF_STMT* sfstmt, int64 index) const char* type; char name_buf[SF_PARAM_NAME_BUF_LEN]; char* name = NULL; - char* value = NULL; cJSON* bindings = NULL; if (_snowflake_get_current_param_style(sfstmt) == INVALID_PARAM_TYPE) @@ -2602,10 +2601,9 @@ SF_STATUS STDCALL snowflake_execute_with_capture(SF_STMT *sfstmt, SF_QUERY_RESUL static SF_STATUS _snowflake_execute_with_binds_ex(SF_STMT* sfstmt, sf_bool is_put_get_command, - sf_bool is_native_put_get, SF_QUERY_RESULT_CAPTURE* result_capture, sf_bool is_describe_only, - cJSON* bind_stage, + char* bind_stage, cJSON* bindings) { SF_STATUS ret = SF_STATUS_ERROR_GENERAL; @@ -2886,7 +2884,6 @@ static SF_STATUS _batch_dml_execute(SF_STMT* sfstmt, { bindings = _snowflake_get_binding_json(sfstmt, i); ret = _snowflake_execute_with_binds_ex(sfstmt, - SF_BOOLEAN_FALSE, SF_BOOLEAN_FALSE, result_capture, SF_BOOLEAN_FALSE, @@ -2943,7 +2940,6 @@ SF_STATUS STDCALL _snowflake_execute_ex(SF_STMT *sfstmt, { ret = _snowflake_execute_with_binds_ex(sfstmt, is_put_get_command, - is_native_put_get, result_capture, SF_BOOLEAN_TRUE, NULL, NULL); @@ -2976,7 +2972,6 @@ SF_STATUS STDCALL _snowflake_execute_ex(SF_STMT *sfstmt, return _snowflake_execute_with_binds_ex(sfstmt, is_put_get_command, - is_native_put_get, result_capture, is_describe_only, bind_stage, diff --git a/tests/test_bind_params.c b/tests/test_bind_params.c index 61b9739204..6c03d7ece6 100644 --- a/tests/test_bind_params.c +++ b/tests/test_bind_params.c @@ -394,16 +394,20 @@ void test_array_binding_supported_false(void** unused) { dump_error(&(stmt->error)); } assert_int_equal(status, SF_STATUS_SUCCESS); - const char* result = NULL; + char* result = NULL; + size_t value_len = 0; + size_t max_value_size = 0; - snowflake_column_as_const_str(stmt, 1, &result); + snowflake_column_as_str(stmt, 1, &result, &value_len, &max_value_size); assert_string_equal(result, bind_data_a[i]); - snowflake_column_as_const_str(stmt, 2, &result); + snowflake_column_as_str(stmt, 2, &result, &value_len, &max_value_size); assert_string_equal(result, bind_data_b[i]); - snowflake_column_as_const_str(stmt, 3, &result); + snowflake_column_as_str(stmt, 3, &result, &value_len, &max_value_size); assert_string_equal(result, bind_data_c[i]); - snowflake_column_as_const_str(stmt, 4, &result); + snowflake_column_as_str(stmt, 4, &result, &value_len, &max_value_size); assert_string_equal(result, bind_data_d[i]); + + free(result); } snowflake_stmt_term(stmt);