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

Assertion error in rel_find_exp_ (sqlsmith) #6426

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

Assertion error in rel_find_exp_ (sqlsmith) #6426

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


Copy link

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

Date: 2017-10-15 21:39:45 +0200
From: @mlkersten
To: SQL devs <>
Version: 11.27.5 (Jul2017-SP1)
CC: @njnes

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

Comment 25729

Date: 2017-10-15 21:39:45 +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:

0 0x00007f4b03e00ac7 in rel_find_exp_ (rel=0x7f4ab9487fe0, e=0x0) at /export/scratch1/home/mk/default//package/sql/server/rel_exp.c:1191
1 0x00007f4b03e00c9c in rel_find_exp (rel=0x7f4ab9487fe0, e=0x0) at /export/scratch1/home/mk/default//package/sql/server/rel_exp.c:1229
2 0x00007f4b03e005da in rel_has_exp (rel=0x7f4ab9487fe0, e=0x0) at /export/scratch1/home/mk/default//package/sql/server/rel_exp.c:1093
3 0x00007f4b03e1a487 in rel_push_semijoin_down (changes=0x7f4ad75f96d4, sql=0x7f4ab8003ec0, rel=0x7f4ab9499fe0)
at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:4337
4 0x00007f4b03e2e3d5 in rewrite (sql=0x7f4ab8003ec0, rel=0x7f4ab9499fe0, rewriter=0x7f4b03e1a0fa <rel_push_semijoin_down>,
has_changes=0x7f4ad75f9818) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8803
5 0x00007f4b03e2e25f in rewrite (sql=0x7f4ab8003ec0, rel=0x7f4ab949a110, rewriter=0x7f4b03e1a0fa <rel_push_semijoin_down>,
has_changes=0x7f4ad75f9818) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8779
6 0x00007f4b03e2e2b2 in rewrite (sql=0x7f4ab8003ec0, rel=0x7f4ab94a0e70, rewriter=0x7f4b03e1a0fa <rel_push_semijoin_down>,
has_changes=0x7f4ad75f9818) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8787
7 0x00007f4b03e2e286 in rewrite (sql=0x7f4ab8003ec0, rel=0x7f4ab948b7d0, rewriter=0x7f4b03e1a0fa <rel_push_semijoin_down>,
has_changes=0x7f4ad75f9818) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8780
8 0x00007f4b03e2e2b2 in rewrite (sql=0x7f4ab8003ec0, rel=0x7f4ab948cab0, rewriter=0x7f4b03e1a0fa <rel_push_semijoin_down>,
has_changes=0x7f4ad75f9818) at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8787
9 0x00007f4b03e2ea1f in _rel_optimizer (sql=0x7f4ab8003ec0, rel=0x7f4ab948cab0, level=1)
at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:8935
10 0x00007f4b03e2f01c in _rel_optimizer (sql=0x7f4ab8003ec0, rel=0x7f4ab948cab0, level=1)
at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:9033
11 0x00007f4b03e2f06f in rel_optimizer (sql=0x7f4ab8003ec0, rel=0x7f4ab948cab0)
at /export/scratch1/home/mk/default//package/sql/server/rel_optimizer.c:9041
12 0x00007f4b03d0fb35 in sql_symbol2relation (c=0x7f4ab8003ec0, sym=0x7f4ab9485130)
at /export/scratch1/home/mk/default//package/sql/backends/monet5/sql.c:121
13 0x00007f4b03d2e96c in SQLparser

Reproducible: Always

Steps to Reproduce:

sample_4.x as c0,
sample_0.location as c1
sys.netcdf_files as sample_0
right join tmp.idxs as sample_1
right join sys.types as sample_2
on (sample_1.table_id = )
inner join sys.s as sample_4
inner join tmp.idxs as ref_0
on (false)
on (sample_2.digits = )
on (sample_0.file_id = sample_4.x )
left join sys.netcdf_files as sample_6
inner join sys.netcdf_dims as ref_1
inner join sys.s1 as ref_2
on (false)
on (sample_6.file_id = ref_1.dim_id )
right join bam.rg as sample_7
on (ref_2.x = sample_7.pi )
left join sys.netcdf_dims as ref_3
right join tmp._columns as ref_4
on (ref_3.length is NULL)
right join sys.triggers as sample_8
on ( = )
left join sys.systemfunctions as ref_5
on (ref_3.dim_id is not NULL)
on ((false)
or (true))
on (sample_0.file_id = )
where case when true then else end
is NULL;

Comment 25733

Date: 2017-10-16 07:42:28 +0200
From: @njnes

added missing check for proper e_cmp type expression in push join down code

Comment 25737

Date: 2017-10-16 08:20:21 +0200
From: MonetDB Mercurial Repository <>

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

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

Changeset description:

fixed bugs 6424, 6425 and 6426
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