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

JOIN with references on both sides crashes mserver #3980

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

JOIN with references on both sides crashes mserver #3980

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

Comments

@monetdb-team
Copy link

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

Date: 2016-04-12 17:16:17 +0200
From: @yzchang
To: SQL devs <>
Version: 11.21.19 (Jul2015-SP4)
CC: @yzchang

Last updated: 2016-06-23 10:24:37 +0200

Comment 22031

Date: 2016-04-12 17:16:17 +0200
From: @yzchang

Just for the record: before changeset:6b5eafd51c81 (https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6b5eafd51c81), the UPDATE query below will crash mserver. This is because (some) JOINs with references in both sides are not correctly handled in rel_apply_*.

The crash was fixed by changeset:6b5eafd51c81, however, this fix is not included in Jul2015-SP4, because this bug was discovered after the Jul2015-SP4 RC was created.

CREATE TABLE foo (barid INT, name VARCHAR(25), result BOOLEAN);
CREATE TABLE bar (id INT, version VARCHAR(25));
UPDATE foo SET result =
(
SELECT TRUE
FROM (
SELECT DISTINCT B.version
FROM foo AS F
INNER JOIN bar AS B ON (F.barid = B.id)
) AS X
WHERE X.version =
(
SELECT
version
FROM bar
WHERE barid = foo.barid
)
AND foo.name='0000'
);

Comment 22032

Date: 2016-04-12 17:37:35 +0200
From: MonetDB Mercurial Repository <>

Changeset 7ef51571b68c made by Jennie Zhang y.zhang@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

Added test for bug #3980
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