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

Segfault in renaming (sqlsmith) #6418

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

Segfault in renaming (sqlsmith) #6418

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


Copy link

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

Date: 2017-10-13 22:57:10 +0200
From: @mlkersten
To: SQL devs <>
Version: 11.27.5 (Jul2017-SP1)
CC: @njnes

Last updated: 2017-10-26 14:01:42 +0200

Comment 25700

Date: 2017-10-13 22:57:10 +0200
From: @mlkersten

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0
Build Identifier:

Looks like the rel-optimizer has some problems.

0x00007fc173348004 in rel_rename_exps (sql=0x7fc144126450, exps1=0x0, exps2=0x7fc14491f390)
at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:1831
1831 for (n = exps1->h, m = exps2->h; n && m; n = n->next, m = m->next, pos++) {
(gdb) where
0 0x00007fc173348004 in rel_rename_exps (sql=0x7fc144126450, exps1=0x0, exps2=0x7fc14491f390)
at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:1831
1 0x00007fc173353ea2 in rel_push_join_down_union (changes=0x7fc1589167b4, sql=0x7fc144126450, rel=0x7fc14491a960)
at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:4484
2 0x00007fc1733671cf in rewrite (sql=0x7fc144126450, rel=0x7fc14491a960, rewriter=0x7fc173353a12 <rel_push_join_down_union>,
has_changes=0x7fc1589168b8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8805
3 0x00007fc1733670ac in rewrite (sql=0x7fc144126450, rel=0x7fc14491af60, rewriter=0x7fc173353a12 <rel_push_join_down_union>,
has_changes=0x7fc1589168b8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8789
4 0x00007fc1733670ac in rewrite (sql=0x7fc144126450, rel=0x7fc14491b130, rewriter=0x7fc173353a12 <rel_push_join_down_union>,
has_changes=0x7fc1589168b8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8789
5 0x00007fc1733670ac in rewrite (sql=0x7fc144126450, rel=0x7fc14491b9e0, rewriter=0x7fc173353a12 <rel_push_join_down_union>,
has_changes=0x7fc1589168b8) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8789
6 0x00007fc173367b87 in _rel_optimizer (sql=0x7fc144126450, rel=0x7fc14491b9e0, level=0)
at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8992
7 0x00007fc173367e69 in rel_optimizer (sql=0x7fc144126450, rel=0x7fc14491b9e0)
at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:9043
8 0x00007fc173248b35 in sql_symbol2relation (c=0x7fc144126450, sym=0x7fc144918170)

Reproducible: Always

Steps to Reproduce:

ref_2.key_type_id as c0,
ref_3.ps_availqty as c1, as c2
tmp.idxs as sample_0
right join sys.sequences as sample_1
on ((true)
or (( is NULL)
or (sample_0.type is not NULL)))
inner join sys.key_types as ref_2
left join sys.partsupp as ref_3
on (ref_2.key_type_id is not NULL)
on (sample_1.schema_id is NULL)
where true
limit 116;

Comment 25709

Date: 2017-10-14 23:29:16 +0200
From: @njnes

make sure we produce a projection list in the split_outerjoin rewriter, fixes this bug

Comment 25710

Date: 2017-10-14 23:30:50 +0200
From: MonetDB Mercurial Repository <>

Changeset 239017b3bde8 made by Niels Nes in the MonetDB repo, refers to this bug.

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

Changeset description:

fixed bug #6418, ie add full projection list in unions (split outerjoin rewriter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant