Repository navigation
Fix #9222: Use oldFormat text type for ttype_dynamic text items in DsqlDmlRequest::metadataToFormat - #9223
Open
mariuz wants to merge 2 commits into
Open
Fix #9222: Use oldFormat text type for ttype_dynamic text items in DsqlDmlRequest::metadataToFormat#9223mariuz wants to merge 2 commits into
mariuz wants to merge 2 commits into
Conversation
…uest::metadataToFormat Restore the ttype_dynamic -> ttype_none reset for text items in DSQL message metadata (originally in DsqlRequest::parseMetadata before FirebirdSQL#8145) so clients that encode SQL_TEXT/SQL_VARYING with plain blr_text/blr_varying do not fail with string right truncation or malformed string on NONE/OCTETS columns over multi-byte connection charsets.
Contributor
|
I would move this code a couple lines up in order not to call |
Member
Author
Contributor
|
I wonder if my suggestion did break the case when non-text field is requested as text. May be it worth check that old format is also text and otherwise fallback to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9222
Summary
In Firebird 2.5 through 5.0,
DsqlRequest::parseMetadataresetttype_dynamic(CS_dynamic) tottype_none(CS_NONE) for text items in DSQL message metadata so that clients encodingSQL_TEXT/SQL_VARYINGusing plainblr_text/blr_varying(whichMetadataFromBlrmaps toCS_dynamic) would not fail with string truncation or validation errors onNONE/OCTETScolumns over multi-byte connection charsets.When
parseMetadataandmapInOutwere replaced byDsqlDmlRequest::metadataToFormatin #8145 (11d5d59), that reset was dropped, causing wire-protocol clients that send plainblr_text/blr_varyingto fail on Firebird 6.0 with:string right truncation (expected length N/4, actual M)when fetchingCHARACTER SET NONE/OCTETS/ASCIIcolumns (including system columns likeRDB$RELATION_CONSTRAINTS.RDB$CONSTRAINT_TYPE) overUTF8.Malformed stringwhen fetching or bindingOCTETSor non-UTF8NONEdata overUTF8.This PR restores the
ttype_dynamic→ttype_nonereset inDsqlDmlRequest::metadataToFormat.