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

SELECT FROM REMOTE TABLE WHERE <> returns wrong results #6621

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

SELECT FROM REMOTE TABLE WHERE <> returns wrong results #6621

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

Comments

@monetdb-team
Copy link

Date: 2018-07-02 18:22:16 +0200
From: @yzchang
To: SQL devs <>
Version: 11.29.3 (Mar2018)
CC: @njnes

Last updated: 2018-08-31 13:23:17 +0200

Comment 26533

Date: 2018-07-02 18:22:16 +0200
From: @yzchang

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.1 Safari/605.1.15
Build Identifier:

Applying the comparison '<>' on a remote table returns incorrect results.

Reproducible: Always

Steps to Reproduce:

  1. Start two MonetDB servers:

$ mserver5 --dbpath=/tmp/mdb1 --set mapi_port=60001 --set monet_daemon=yes&
$ mserver5 --dbpath=/tmp/mdb3 --set mapi_port=60003 --set monet_daemon=yes&

  1. Connect to mdb1 to create a simple table:

$ mclient -d mdb1 -u monetdb -p 60001
...
sql>create table bug1 (i int, v varchar(10));
operation successful
sql>insert into bug1 values (48, 'foo'), (29, 'bar'), (63, 'abc');
3 affected rows

  1. Connect to mdb3 to create a remote table:

$ mclient -d mdb3 -u monetdb -p 60003
...
sql>create remote table bug1 (i int, v varchar(10)) on 'mapi:monetdb://localhost:60001/mdb1';
operation successful
sql>select * from bug1; -- sanity check
+------+------+
| i | v |
+======+======+
| 48 | foo |
| 29 | bar |
| 63 | abc |
+------+------+
3 tuples
sql>select * from bug1 where i < 50; -- correct
+------+------+
| i | v |
+======+======+
| 48 | foo |
| 29 | bar |
+------+------+
2 tuples
sql>select * from bug1 where i > 50; -- correct
+------+------+
| i | v |
+======+======+
| 63 | abc |
+------+------+
1 tuple
sql>select * from bug1 where i <> 50; -- WRONG!
+---+---+
| i | v |
+===+===+
+---+---+
0 tuples
sql>select * from bug1 where v = 'foo'; -- correct
+------+------+
| i | v |
+======+======+
| 48 | foo |
+------+------+
1 tuple
sql>select * from bug1 where v <> 'foo'; -- WRONG!
+------+------+
| i | v |
+======+======+
| 48 | foo |
+------+------+
1 tuple
sql>select * from bug1 where v <> 'bla'; -- WRONG!
+---+---+
| i | v |
+===+===+
+---+---+
0 tuples

Comment 26534

Date: 2018-07-02 18:34:33 +0200
From: MonetDB Mercurial Repository <>

Changeset 6f2a93ed55a0 made by Ying Zhang y.zhang@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

Added tests for Bug #6621

Comment 26541

Date: 2018-07-11 14:36:50 +0200
From: MonetDB Mercurial Repository <>

Changeset b3ccbde786b1 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

fix bug #6621, make sure we handle the anti when reading a relational plan
@monetdb-team monetdb-team added bug Something isn't working normal 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 normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants