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

incorrect data results for "WHERE int_col <> 0" #3552

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

incorrect data results for "WHERE int_col <> 0" #3552

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

Comments

@monetdb-team
Copy link

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

Date: 2014-08-22 18:13:44 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.17.21 (Jan2014-SP3)

Last updated: 2014-10-31 14:14:57 +0100

Comment 20083

Date: 2014-08-22 18:13:44 +0200
From: Martin van Dinther <<martin.van.dinther>>

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

The <> comparison operator does not work correctly anymore, see SQL example.

Reproducible: Always

Steps to Reproduce:

  1. start meserv5 (MonetDB v11.17.21 (Jan2014-SP3))
  2. start mclient
  3. CREATE TABLE tst (int_col integer);
    INSERT INTO tst VALUES (1);
    INSERT INTO tst VALUES (0);
    SELECT * FROM tst;
    SELECT count() FROM tst;
    SELECT count(
    ) FROM tst WHERE int_col = 0;
    SELECT count(*) FROM tst WHERE int_col <> 0;
    This last query should return 1 but instead it returns 0, which is wrong.
    Also
    DELETE FROM tst WHERE int_col <> 0;
    deletes 0 rows.

Actual Results:

Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.17.21 (Jan2014-SP3), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE tst (int_col integer);
operation successful (415.338ms)
sql>INSERT INTO tst VALUES (1);
1 affected rows (2.357ms)
sql>INSERT INTO tst VALUES (0);
1 affected rows (1.979ms)
sql>SELECT * FROM tst;
+---------+
| int_col |
+=========+
| 1 |
| 0 |
+---------+
2 tuples (1.007ms)
sql>SELECT count() FROM tst;
+------+
| L1 |
+======+
| 2 |
+------+
1 tuple (0.894ms)
sql>SELECT count(
) FROM tst WHERE int_col = 0;
+------+
| L1 |
+======+
| 1 |
+------+
1 tuple (0.844ms)
sql>SELECT count() FROM tst WHERE int_col <> 0;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (1.297ms)
sql>SELECT count(
) FROM tst WHERE int_col = 1;
+------+
| L1 |
+======+
| 1 |
+------+
1 tuple (0.420ms)
sql>DELETE FROM tst WHERE int_col <> 0;
0 affected row (1.161ms)
sql>

Expected Results:

sql>SELECT count(*) FROM tst WHERE int_col <> 0;
+------+
| L1 |
+======+
| 1 |
+------+
sql>DELETE FROM tst WHERE int_col <> 0;
1 affected row (1.161ms)

Comment 20084

Date: 2014-08-22 21:34:04 +0200
From: MonetDB Mercurial Repository <>

Changeset 529ee7d9899d 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=529ee7d9899d

Changeset description:

Fixed bug #3552 and added test.
An anti subselect on a reverse ordered bat returned incorrect values
since the code didn't properly take the location of NIL values in a
reverse sorted bat into account (they come at the end).

Comment 20085

Date: 2014-08-22 21:43:43 +0200
From: MonetDB Mercurial Repository <>

Changeset 0f8e7197777d 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=0f8e7197777d

Changeset description:

Fixed bug #3552 and added test.
An anti subselect on a reverse ordered bat returned incorrect values
since the code didn't properly take the location of NIL values in a
reverse sorted bat into account (they come at the end).
(grafted from 529ee7d9899dabac483cb033790e5ed168735e70)

Comment 20086

Date: 2014-08-23 21:12:25 +0200
From: @sjoerdmullender

Bug is fixed.

Comment 20107

Date: 2014-08-29 11:34:34 +0200
From: MonetDB Mercurial Repository <>

Changeset 752f02a41db4 made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

After fix of bug #3552 the output of vacuum.sql is now changed.

Comment 20398

Date: 2014-10-31 14:14:57 +0100
From: @sjoerdmullender

Oct2014 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