Skip to content

Conversation

@ucko
Copy link
Contributor

@ucko ucko commented May 30, 2024

  • Automatically truncate strings that would overflow their destinations, mainly for the sake of bulk insertions.
  • Fully honor *BINARY and IMAGE data buffer size limits in cs_convert.
  • Update unit tests (ctlib cs_convert, dblib t0019) accordingly.

Split from #555.

* Automatically truncate strings that would overflow their destinations,
  mainly for the sake of bulk insertions.
* Fully honor *BINARY and IMAGE data buffer size limits in cs_convert.
* Update unit tests (ctlib cs_convert, dblib t0019) accordingly.

Signed-off-by: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Comment on lines -299 to +300
CS_CHAR test2[] = "ab", CS_CHAR_TYPE, test, 3, CS_CHAR_TYPE, 2, CS_FAIL, test2, 2);
CS_CHAR test2[] = "ab", CS_CHAR_TYPE, test, 3, CS_CHAR_TYPE, 2,
CS_SUCCEED /* CS_FAIL */, test2, 2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these tests are checked against proprietary libraries. That is you are introducing a bug.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah, looks like such truncation should occur only in the context of bulk insertion (where it does happen with proprietary libraries).

@ucko
Copy link
Contributor Author

ucko commented Jun 18, 2024

Withdrawn in favor of a (planned) extension to #558.

@ucko ucko closed this Jun 18, 2024
@ucko
Copy link
Contributor Author

ucko commented Jul 3, 2024

This extension wound up with only ctlib changes; I split the dblib changes off to #595.

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.

2 participants