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

a join causes SIGSEGV after creation of Unique Key #3363

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

a join causes SIGSEGV after creation of Unique Key #3363

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

Comments

@monetdb-team
Copy link

Date: 2013-09-13 18:02:12 +0200
From: milan <<milan.martak>>
To: SQL devs <>
Version: 11.15.3 (Feb2013-SP1)
CC: milan.martak, @njnes

Last updated: 2013-09-27 13:47:17 +0200

Comment 19157

Date: 2013-09-13 18:02:12 +0200
From: milan <<milan.martak>>

User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
Build Identifier:

Lets have 2 (almost) identical tables, the only difference is size of the a1 attribute. See the table definition in steps to reproduce.

Executing the SELECT with JOIN these 2 tables over all columns works fine

SELECT p.a1, p.a2, p.a3, v.a3
FROM mmtest10 v JOIN mmtest20 p ON ( p.a1 = v.a1 AND p.a2 = v.a2 AND p.a3 = v.a3 AND p.a4 = v.a4 );

However, after creating UK on all columns for one of the tables as here

ALTER TABLE mmtest20 ADD CONSTRAINT mmtest20_uk1 UNIQUE (a1,a2,a3,a4);

and then running the same SQL again - the server would crash (SIGSEGV).

Also note that

  • when you remove any of the 4 conditions in the JOIN, it works fine (this is i guess because the optimizer would not choose the UK)
  • when the a1 column definitions are the same size, everything works fine
  • the behavior is always the same no matter if there is some data or not

Reproducible: Always

Steps to Reproduce:

CREATE TABLE mmtest10
( a1 varchar(4) NOT NULL,
a2 bigint NOT NULL,
a3 bigint NOT NULL,
a4 bigint NOT NULL );
2.
CREATE TABLE mmtest20
( a1 varchar(9) NOT NULL,
a2 bigint NOT NULL,
a3 bigint NOT NULL,
a4 bigint NOT NULL );
3.
ALTER TABLE mmtest20 ADD CONSTRAINT mmtest20_uk1 UNIQUE (a1,a2,a3,a4);
4.
SELECT p.a1, p.a2, p.a3, v.a3
FROM mmtest10 v JOIN mmtest20 p
ON ( p.a1 = v.a1
AND p.a2 = v.a2
AND p.a3 = v.a3
AND p.a4 = v.a4
);

Actual Results:

database 'xxx' (10048) was killed by signal SIGSEGV

Expected Results:

SELECT executed successfully (empty resultset)

Comment 19158

Date: 2013-09-15 17:35:01 +0200
From: MonetDB Mercurial Repository <>

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

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

Changeset description:

fixed bug #3363 (ie make sure push_func down optimizer adds a relation name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants