Issue Details (XML | Word | Printable)

Key: DERBY-1386
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Knut Anders Hatlen
Reporter: A B
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Wrong results with query using LIKE and ESCAPE clause that includes "%", "\", and "_"

Created: 08/Jun/06 02:05 AM   Updated: 30/Jun/09 03:55 PM
Return to search
Component/s: SQL
Affects Version/s: 10.1.3.1, 10.2.1.6
Fix Version/s: 10.1.3.1, 10.2.1.6

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works derby-1386-v1.diff 2006-06-09 08:57 PM Knut Anders Hatlen 9 kB
Text File Licensed for inclusion in ASF works derby-1386-v1.stat 2006-06-09 08:57 PM Knut Anders Hatlen 0.2 kB
Issue Links:
Reference
 

Issue & fix info: Patch Available
Bug behavior facts: Regression
Resolution Date: 10/Jun/06 01:53 AM


 Description  « Hide
After the fix for DERBY-1262 was checked in, I'm noticing that the following query now returns different results. Prior to the fix for DERBY-1262 the query returned 2 rows; now it doesn't return any rows.

create table escTable (c1 char(10));
insert into escTable values ('%_\a');
insert into escTable values ('%_b');
insert into escTable values ('%c');
insert into escTable values ('d');
insert into escTable values ('%_\e');
select c1 from escTable where c1 like '\%\_\\%' ESCAPE '\';

Before DERBY-1262, the SELECT returned:

C1
----------
%_\a
%_\e

2 rows selected

Now it returns:

C1
----------

0 rows selected

Brief inspection of the query and data suggest to me that these new results (i.e. no rows) are wrong, and that Derby should in fact return 2 rows/.

Based on comments in DERBY-1262, I'm creating a new Jira issue for the regression since it has been checked into the 10.1 maintenance branch. I've set the priority to "Critical" since this could potentially delay a 10.1.3 release--I.e. I don't think we'd want to release 10.1.3 knowing that we have a wrong results regression. But if anyone thinks that's not the correct priority, feel free to speak up.

Other option, of course, is to back out the change for DERBY-1262 in 10.1 and then lower the priority accordingly.

Input/feedback/comments would be appreciated.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
A B made changes - 08/Jun/06 02:11 AM
Field Original Value New Value
Priority Major [ 3 ] Critical [ 2 ]
Knut Anders Hatlen made changes - 08/Jun/06 07:29 PM
Assignee Knut Anders Hatlen [ knutanders ]
Knut Anders Hatlen made changes - 09/Jun/06 08:57 PM
Attachment derby-1386-v1.stat [ 12335261 ]
Attachment derby-1386-v1.diff [ 12335260 ]
Knut Anders Hatlen made changes - 09/Jun/06 09:26 PM
Derby Info [Regression] [Patch Available, Regression]
Knut Anders Hatlen made changes - 10/Jun/06 01:53 AM
Fix Version/s 10.1.2.5 [ 12311060 ]
Fix Version/s 10.2.0.0 [ 11187 ]
Fix Version/s 10.1.3.0 [ 12310616 ]
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Kathey Marsden made changes - 01/Jul/06 07:54 AM
Component/s SQL [ 11408 ]
A B made changes - 12/Jul/06 01:03 AM
Status Resolved [ 5 ] Closed [ 6 ]
Bernt M. Johnsen made changes - 05/Dec/06 08:51 AM
Link This issue relates to DERBY-1231 [ DERBY-1231 ]
Dag H. Wanvik made changes - 30/Jun/09 03:55 PM
Bug behavior facts [Regression]