Skip to content
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

use LIKE with ESCAPE ignores OR operator #2924

monetdb-team opened this issue Nov 30, 2020 · 0 comments

use LIKE with ESCAPE ignores OR operator #2924

monetdb-team opened this issue Nov 30, 2020 · 0 comments


Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2011-11-07 08:43:23 +0100
From: taowen
To: SQL devs <>
Version: 11.5.7 (Aug2011-SP2) [obsolete]
CC: @njnes

Last updated: 2011-11-22 13:55:57 +0100

Comment 16521

Date: 2011-11-07 08:43:23 +0100
From: taowen

User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Ubuntu/10.04 Chromium/15.0.874.106 Chrome/15.0.874.106 Safari/535.2
Build Identifier:

When having two conditions, both of them is using escape. One condition is true another condition is false. But combining them with OR, the expression is evaluated as false.

Reproducible: Always

Steps to Reproduce:

select * from schemas where name like '%ys' escape '=' or name like '%y' escape '=';

Actual Results:

No row returned

Expected Results:

The row with name "sys" should be returned

Comment 16529

Date: 2011-11-08 07:55:18 +0100
From: @njnes

seems to work fine in the release candidate (Dec2011). Probably some back porting is needed.

Comment 16530

Date: 2011-11-08 08:14:49 +0100
From: @njnes

Fixed. The problem was in range merging optimization step. The like expressions
were incorrectly handled as ranges. Added test like_or.Bug-2924

Comment 16531

Date: 2011-11-08 08:21:14 +0100
From: @njnes

Changeset 0299b070e196 made by Niels Nes in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0299b070e196

Changeset description:

fixed like or bug #2924, ie don't handle like's as range

Comment 16570

Date: 2011-11-22 13:55:57 +0100
From: @grobian

Fixed in Aug2011-SP3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant