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 IS NOT NULL produces wrong result #6584

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

SELECT FROM REMOTE TABLE WHERE IS NOT NULL produces wrong result #6584

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-04-19 13:53:35 +0200
From: @joerivanruth
To: SQL devs <>
Version: 11.29.3 (Mar2018)
CC: @njnes

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

Comment 26382

Date: 2018-04-19 13:53:35 +0200
From: @joerivanruth

I've tested this on Linux and MacOS, and on 'default', 'Mar2018',
'Jul2017' and 'Dec2016'.

Here's a shell script that reproduces it. It connects to two
databases, creates a table on one and a REMOTE table on the other,
then runs some queries.

The result of the final query comes out empty while it shouldn't be.

!/bin/bash
set -e

MASTER=mapi:monetdb://localhost:50000/master
SLAVE=mapi:monetdb://localhost:50000/slave

run() {
local url="$1"
shift
echo
echo "Connecting to $url"
mclient -d "$url" -e "$@"
}

run $SLAVE <<END
DROP TABLE IF EXISTS t;
CREATE TABLE t (i INTEGER);
INSERT INTO t VALUES (1), (2), (3);

SELECT * FROM t;
SELECT * FROM t WHERE i IS NOT NULL;
END

run $MASTER <<END
DROP TABLE IF EXISTS t;
CREATE REMOTE TABLE t (i INTEGER) ON '$SLAVE';

SELECT * FROM t;
SELECT * FROM t WHERE i IS NOT NULL;
END

Comment 26393

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

Changeset 12a61dac9008 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=12a61dac9008

Changeset description:

fixes for bug #6583 and 6584

Comment 26396

Date: 2018-04-20 17:29:23 +0200
From: @njnes

fixed the relational intermediate language parsing.

@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