Conversation
…haracter between character sets' with non ASCII char
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 #8244 in v5.0-release.
ComparativeBoolNode::stringBoolean()took the text type of LIKE, CONTAINING, STARTING WITH and SIMILAR TO fromINTL_TEXT_TYPE(), which isttype_asciifor a non-text first operand. Because of that, a pattern with non-ASCII characters failed to convert (Malformed stringwith connection charset NONE,Cannot transliterate character between character setswith the others) instead of just not matching.This applies the same change that master got in c2413fb:
desc1->getTextType()returns NONE for non-text types, so the pattern converts without an error and the match returns FALSE.Tested on a debug build of v5.0-release with connection charsets NONE, UTF8 and WIN1252: LIKE, NOT LIKE, CONTAINING, STARTING WITH and SIMILAR TO on DATE, TIME, TIMESTAMP, INTEGER, NUMERIC, DOUBLE PRECISION, DECFLOAT, INT128, BOOLEAN and DB_KEY operands. Non-ASCII patterns return FALSE, and ASCII patterns give the same results as before. The commit also cherry-picks cleanly onto v4.0-release.