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

NOT LIKE not working if the operand doesn't contains wildcards. #3811

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

NOT LIKE not working if the operand doesn't contains wildcards. #3811

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

Comments

@monetdb-team
Copy link

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

Date: 2015-09-24 15:01:38 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <>
Version: 11.19.15 (Oct2014-SP4)

Last updated: 2015-11-03 10:18:41 +0100

Comment 21282

Date: 2015-09-24 15:01:38 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:

We found that "NOT LIKE" with a pattern WITHOUT any wildcards ('%' or '_')
is behaving as "LIKE"!

Further remarks:

  • "NOT ILIKE" works ok
  • attempting to TRACE the query fails (looks like it is crashing, but
    it do not seems to trigger any assert on the way)
  • extending the query with LIMIT, GROUP BY, or prepending DISTINCT can
    make it work as expected.

Reproducible: Always

Actual Results:

sql>create table test (id int, value text);
operation successful (39.621ms)
sql>insert into test values (1, 'Alice'), (2, 'Bob'), (3, 'Carol');
3 affected rows (15.252ms)
sql>select * from test;
+------+-------+
| id | value |
+======+=======+
| 1 | Alice |
| 2 | Bob |
| 3 | Carol |
+------+-------+
3 tuples (0.411ms)
sql>select * from test where value not like 'Bob';
+------+-------+
| id | value |
+======+=======+
| 2 | Bob |
+------+-------+
1 tuple (0.892ms)
sql>select * from test where value not ilike 'Bob';
+------+-------+
| id | value |
+======+=======+
| 1 | Alice |
| 3 | Carol |
+------+-------+
2 tuples (2.356ms)

Comment 21298

Date: 2015-09-29 14:04:31 +0200
From: MonetDB Mercurial Repository <>

Changeset 0e6e5e0540bb made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

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

Changeset description:

Fix bug #3811: do not rewrite like select without wildcard if anti flag is set.

Comment 21451

Date: 2015-11-03 10:18:41 +0100
From: @sjoerdmullender

Jul2015 SP1 has been released.

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

Successfully merging a pull request may close this issue.

None yet
1 participant