Skip to content

fix binding strings with nulls; update param type tests#147

Merged
jraymakers merged 1 commit intomainfrom
jray/c-str-length-and-param-type-tests
Feb 8, 2025
Merged

fix binding strings with nulls; update param type tests#147
jraymakers merged 1 commit intomainfrom
jray/c-str-length-and-param-type-tests

Conversation

@jraymakers
Copy link
Copy Markdown
Collaborator

Use the _length variants of C API functions that take C strings where possible, to handle embedded null characters properly. This was visible through the API in at least one case (binding VARCHARs with embedded nulls). Added a test for this case.

Also update the param_type tests now that it works in more cases. But I found a new bug in 1.2.0, where param_type returns INVALID for VARCHARs (only). I've confirmed this is a bug in DuckDB and am filing an issue there.

@jraymakers jraymakers merged commit 556c2ff into main Feb 8, 2025
5 checks passed
@jraymakers jraymakers deleted the jray/c-str-length-and-param-type-tests branch February 8, 2025 22:49
@jraymakers
Copy link
Copy Markdown
Collaborator Author

The DuckDB bug mentioned in the description is filed here: duckdb/duckdb#16137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant