LIKE with escape doesn't work
-----------------------------

                 Key: CORE-4158
                 URL: http://tracker.firebirdsql.org/browse/CORE-4158
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 3.0 Alpha 1
         Environment: Windows 8 64 bit
WI-T3.0.0.30566 Firebird 3.0 Alpha 1 (64 bit)
Jaybird trunk on Java 7
            Reporter: Mark Rotteveel


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to