Failed assertion in joininfo.c, remove_join_clause_from_rels

Started by Andreas Seltenreichabout 2 years ago4 messages
#1Andreas Seltenreich
seltenreich@gmx.de

Hi,

SQLsmith found a failing Assertion in joininfo.c on master. I can
reproduce it on an assertion-enabled build like this:

create table t1(a int primary key);
create table t2(a int);

select * from t2 right join
(t1 as t1a inner join t1 as t1b on t1a.a = t1b.a)
on t1a.a is not null and exists (select);

-- TRAP: failed Assert("list_member_ptr(rel->joininfo, restrictinfo)"), File: "joininfo.c", Line: 144, PID: 777839

regards,
Andreas

#2Alexander Korotkov
aekorotkov@gmail.com
In reply to: Andreas Seltenreich (#1)
Re: Failed assertion in joininfo.c, remove_join_clause_from_rels

On Wed, Dec 27, 2023 at 1:54 PM Andreas Seltenreich <seltenreich@gmx.de> wrote:

SQLsmith found a failing Assertion in joininfo.c on master. I can
reproduce it on an assertion-enabled build like this:

create table t1(a int primary key);
create table t2(a int);

select * from t2 right join
(t1 as t1a inner join t1 as t1b on t1a.a = t1b.a)
on t1a.a is not null and exists (select);

-- TRAP: failed Assert("list_member_ptr(rel->joininfo, restrictinfo)"), File: "joininfo.c", Line: 144, PID: 777839

Thank you for pointing this out. I'm investigating.

------
Regards,
Alexander Korotkov

#3Richard Guo
guofenglinux@gmail.com
In reply to: Alexander Korotkov (#2)
Re: Failed assertion in joininfo.c, remove_join_clause_from_rels

On Wed, Dec 27, 2023 at 8:00 PM Alexander Korotkov <aekorotkov@gmail.com>
wrote:

On Wed, Dec 27, 2023 at 1:54 PM Andreas Seltenreich <seltenreich@gmx.de>
wrote:

SQLsmith found a failing Assertion in joininfo.c on master. I can
reproduce it on an assertion-enabled build like this:

create table t1(a int primary key);
create table t2(a int);

select * from t2 right join
(t1 as t1a inner join t1 as t1b on t1a.a = t1b.a)
on t1a.a is not null and exists (select);

-- TRAP: failed Assert("list_member_ptr(rel->joininfo, restrictinfo)"),

File: "joininfo.c", Line: 144, PID: 777839

Thank you for pointing this out. I'm investigating.

This is the same issue with [1]/messages/by-id/CAMbWs4_wJthNtYBL+SsebpgF-5L2r5zFFk6xYbS0A78GKOTFHw@mail.gmail.com and has been just fixed by e0477837ce.

[1]: /messages/by-id/CAMbWs4_wJthNtYBL+SsebpgF-5L2r5zFFk6xYbS0A78GKOTFHw@mail.gmail.com
/messages/by-id/CAMbWs4_wJthNtYBL+SsebpgF-5L2r5zFFk6xYbS0A78GKOTFHw@mail.gmail.com

Thanks
Richard

#4Alexander Korotkov
aekorotkov@gmail.com
In reply to: Richard Guo (#3)
Re: Failed assertion in joininfo.c, remove_join_clause_from_rels

On Wed, Dec 27, 2023 at 2:04 PM Richard Guo <guofenglinux@gmail.com> wrote:

On Wed, Dec 27, 2023 at 8:00 PM Alexander Korotkov <aekorotkov@gmail.com> wrote:

On Wed, Dec 27, 2023 at 1:54 PM Andreas Seltenreich <seltenreich@gmx.de> wrote:

SQLsmith found a failing Assertion in joininfo.c on master. I can
reproduce it on an assertion-enabled build like this:

create table t1(a int primary key);
create table t2(a int);

select * from t2 right join
(t1 as t1a inner join t1 as t1b on t1a.a = t1b.a)
on t1a.a is not null and exists (select);

-- TRAP: failed Assert("list_member_ptr(rel->joininfo, restrictinfo)"), File: "joininfo.c", Line: 144, PID: 777839

Thank you for pointing this out. I'm investigating.

This is the same issue with [1] and has been just fixed by e0477837ce.

[1] /messages/by-id/CAMbWs4_wJthNtYBL+SsebpgF-5L2r5zFFk6xYbS0A78GKOTFHw@mail.gmail.com

I just came to the same conclusion. Thank you, Richard.

------
Regards,
Alexander Korotkov