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

Sqlitelogictest select query with not between cause with wrong results #6569

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed
Labels
bug Something isn't working minor SQL

Comments

@monetdb-team
Copy link

Date: 2018-04-04 16:48:13 +0200
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2018-06-20 11:02:19 +0200

Comment 26339

Date: 2018-04-04 16:48:13 +0200
From: @PedroTadim

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Build Identifier:

The query select query bellow returns NULL instead of 78

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
  2. INSERT INTO tab1 VALUES(51,14,96), (85,5,59), (91,47,68);
  3. SELECT ALL + MIN ( ALL + ( + col0 ) ) + - 9 * - ( + COUNT ( * ) ) AS col0 FROM tab1 AS cor0 WHERE NOT ( - col0 + col0 ) BETWEEN ( - 39 ) AND ( - 92 );
  4. DROP TABLE tab1;

Actual Results:

NULL

Expected Results:

78

Comment 26342

Date: 2018-04-04 17:16:20 +0200
From: MonetDB Mercurial Repository <>

Changeset 44290b405a9f made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=44290b405a9f

Changeset description:

Added tests for bugs 6568, 6569 and 6570

Comment 26349

Date: 2018-04-08 11:08:26 +0200
From: @njnes

the problem (if any) is in the range select handling (with the low value >= high value). If the sql is written correctly (ie use symmetric between or between -92 and - 39) the output is correct.

Comment 26372

Date: 2018-04-16 12:23:22 +0200
From: MonetDB Mercurial Repository <>

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

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=021999eef451

Changeset description:

An anti-select for an empty range should return all non-nil values.
This fixes bug #6569.
@monetdb-team monetdb-team added bug Something isn't working minor SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 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 minor SQL
Projects
None yet
Development

No branches or pull requests

2 participants