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

Evaluation of range predicates with with query incorrect. #2732

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

Evaluation of range predicates with with query incorrect. #2732

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working MAL/M5 normal

Comments

@monetdb-team
Copy link

Date: 2010-11-25 00:14:47 +0100
From: Jan Rittinger <<jan.rittinger>>
To: MonetDB5 devs <>
Version: 11.3.7 (Apr2011-SP2) [obsolete]

Last updated: 2011-08-05 14:40:32 +0200

Comment 15227

Date: 2010-11-25 00:14:47 +0100
From: Jan Rittinger <<jan.rittinger>>

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5
Build Identifier:

Range predicates deliver too much results:

$ cat bug.sql
with t(p,s) as
(select pre, size from (VALUES (1,4),(2,1),(3,0),(4,1),(5,0)) as t(pre,size))

select t1.p as p1, t2.p as p2, t3.p as p3
from t as t1, t as t2, t as t3
where t1.p = 1
and t2.p between (t1.p + 1) and (t1.p + t1.s)
and t3.p between (t2.p + 1) and (t2.p + t2.s);

$ db2 -tf bug.sql

P1 P2 P3


       1           2           3
       1           4           5

2 record(s) selected.

$ mclient bug.sql
+------+------+------+
| p1 | p2 | p3 |
+======+======+======+
| 1 | 2 | 1 |
| 1 | 3 | 1 |
| 1 | 4 | 1 |
| 1 | 5 | 1 |
| 1 | 2 | 2 |
| 1 | 3 | 2 |
| 1 | 4 | 2 |
| 1 | 5 | 2 |
| 1 | 2 | 3 |
| 1 | 3 | 3 |
| 1 | 4 | 3 |
| 1 | 5 | 3 |
| 1 | 2 | 4 |
| 1 | 3 | 4 |
| 1 | 4 | 4 |
| 1 | 5 | 4 |
| 1 | 2 | 5 |
| 1 | 3 | 5 |
| 1 | 4 | 5 |
| 1 | 5 | 5 |
+------+------+------+
20 tuples

Reproducible: Always

Steps to Reproduce:

see above

Actual Results:

see: mclient bug.sql (above)

Expected Results:

see: db2 -tf bug.sql (above)

Comment 15403

Date: 2011-01-24 13:47:39 +0100
From: @grobian

Changeset 80bdd5051b1b made by Fabian Groffen fabian@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

Add script for bug #2732

Comment 15669

Date: 2011-03-28 17:35:55 +0200
From: @sjoerdmullender

The Mar2011 version has been released.

Comment 16025

Date: 2011-07-29 10:59:38 +0200
From: @sjoerdmullender

Apr2011-SP2 has been released.

Comment 16075

Date: 2011-08-05 14:40:32 +0200
From: @sjoerdmullender

This bug seems to already have been fixed in the Apr2011 branch before the Apr2011 release.

@monetdb-team monetdb-team added bug Something isn't working MAL/M5 normal labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MAL/M5 normal
Projects
None yet
Development

No branches or pull requests

2 participants