Skip to content

Fixed #8244: 'Malformed string' or 'Cannot transliterate character between character sets' with non ASCII char - #9184

Open
madorin wants to merge 1 commit into
FirebirdSQL:v5.0-releasefrom
madorin:fix-like-non-text-5.0
Open

madorin wants to merge 1 commit into
FirebirdSQL:v5.0-releasefrom
madorin:fix-like-non-text-5.0

Conversation

@madorin

@madorin madorin commented Oct 3, 2026

Copy link
Copy Markdown

Fixes #8244 in v5.0-release.

ComparativeBoolNode::stringBoolean() took the text type of LIKE, CONTAINING, STARTING WITH and SIMILAR TO from INTL_TEXT_TYPE(), which is ttype_ascii for a non-text first operand. Because of that, a pattern with non-ASCII characters failed to convert (Malformed string with connection charset NONE, Cannot transliterate character between character sets with 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.

…haracter between character sets' with non ASCII char
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