You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workaround for #624.
Currently, when inserting empty string or null into encrypted variable-length columns, the driver sets the data length to 0 and the type to type(0) (varchar(0) for example). The workaround is to set the length to 1 and the type to type(1).
The workaround looks fine. After looking around the code, it seems like the valueLength is 0 if the user is using a callable statement and using the parameter as an output parameter. Have you considered this case / looked into what giving n/varchar(1) to the server implies?
I think it should be fine since I just tried the same scenario with output parameter, and it seems to work fine, but I wanted you to consider this scenario as well.
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
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.
Workaround for #624.
Currently, when inserting empty string or
nullinto encrypted variable-length columns, the driver sets the data length to0and the type totype(0)(varchar(0)for example). The workaround is to set the length to 1 and the type to type(1).