Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
10.1.3.3, 10.10.1.1
-
None
-
Normal
-
Repro attached
-
Deviation from standard, Wrong query result
Description
The LIKE clause is supposed to evaluate to NULL if the optional ESCAPE character is set to NULL. Instead, Derby treats this condition as equivalent to omitting the ESCAPE clause. This violates part 2 of the SQL Standard, section 8.5 <like predicate>, general rule 3.a.ii.
Thanks to Knut for disclosing this problem via the following script:
connect 'jdbc:derby:memory:db;create=true';
prepare ps as 'select tablename from sys.systables where tablename like ''SYSD%'' escape ?';
– should return no rows, but actually returns 2
execute ps using 'values cast( null as char(1) )';
Attachments
Issue Links
- relates to
-
DERBY-5862 There is no way to escape the special _ and % characters in DatabaseMetaData search strings
-
- Open
-