db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Håvard Mork (JIRA) <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1262) Like-predicates: % does not match tab character
Date Mon, 08 May 2006 12:54:21 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1262?page=all ]

Håvard Mork updated DERBY-1262:

    Attachment: 1262.diff

Thanks Satheesh for your input. I believe you are right that correcting the lessthan/greaterthan
values is the way to go. I made a tentative patch for this issue, which pads the greaterthan
and lessthan values with null chars, up to the number of chars in the 'receiver' column (at
the left side of the LIKE statement).

As always, I'm not confident this is the most efficient approach. A different solution than
adding a new param for Like.greaterThanXX() would be to insert a method call node that adds
the padding (for preparedstatement executions).

Patch passes derbylang.

> Like-predicates: % does not match tab character
> -----------------------------------------------
>          Key: DERBY-1262
>          URL: http://issues.apache.org/jira/browse/DERBY-1262
>      Project: Derby
>         Type: Bug

>   Components: SQL
>     Versions:
>  Environment: Embedded, Solaris 10 x86
>     Reporter: Øystein Grøvlen
>  Attachments: 1262.diff
> % in like predicates does not seem to match tab character.  In the following example
all whitespace in character literals is the tab character:
> ij> create table t4(i integer primary key, j integer, c varchar(10));
> 0 rows inserted/updated/deleted
> ij> insert into t4 values (1, 1, 'abc	def');
> 1 row inserted/updated/deleted
> ij> select * from t4 where c like 'abc%';
> I          |J          |C         
> ----------------------------------
> 0 rows selected
> ij> select * from t4 where c like 'abc	%';
> I          |J          |C         
> ----------------------------------
> 1          |1          |abc    def   
> 1 row selected

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message