New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: LIKE with escape doesn't work [CORE4158] #4485
Comments
Commented by: @mrotteveel Test is org.firebirdsql.jdbc.escape.TestLikeEscape.testEscapedLike_underscore() and testEscapedLike_percent() in Jaybird trunk |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 2 [ 10560 ] |
Commented by: @mrotteveel Interestingly enough, if I add additional testdata with values 'abc&%ef' and 'abc&_ef' it doesn't match those either, so the escape seems to be working partially |
Commented by: @asfernandes > Interestingly enough, if I add additional testdata with values 'abc&%ef' and 'abc&_ef' it doesn't match those either, so the escape seems to be working partially Do you mean before or after my fix? |
Commented by: @mrotteveel Adriano, this was still with the Alpha 1 build. |
Modified by: Sean Leyne (seanleyne)summary: LIKE with escape doesn't work => Regression: LIKE with escape doesn't work |
Submitted by: @mrotteveel
The LIKE escape does not work as it should, the escape clause is ignored.
Testsetup:
CREATE TABLE TAB1 (
ID INT CONSTRAINT PK_TAB1 PRIMARY KEY,
VAL VARCHAR(30)
);
INSERT INTO TAB1 (ID, VAL) VALUES (1, 'abcdef');
INSERT INTO TAB1 (ID, VAL) VALUES (2, 'abc_ef');
INSERT INTO TAB1 (ID, VAL) VALUES (3, 'abc%ef');
Tests:
SELECT VAL FROM TAB1 WHERE VAL LIKE 'abc&%ef' ESCAPE '&'
Expected result: 1 row, with value abc%ef
Actual result: no row
SELECT VAL FROM TAB1 WHERE VAL LIKE 'abc&_ef' ESCAPE '&'
Expected result: 1 row, with value abc_ef
Actual result: no row
Firebird 2.5 and earlier do produce the expected result.
Commits: 9e12865 FirebirdSQL/fbt-repository@a74dfe6
The text was updated successfully, but these errors were encountered: