Skip to content

[YSQL] Crash due to multiple-table joining #27029

@bajinsheng

Description

@bajinsheng

Jira Link: DB-16502

Description

Please see this test case:

create table t0 (c0 numeric, c1 text, c2 int4);
create table t1 (c3 numeric, c4 int4, c5 timestamp, c6 int4, c7 text);
create table t2 (c11 int4, c14 text, c15 numeric);
create index i0 on t2 (c11, c15, c14);
select * from t1 a
where
  exists (
    select * from
      t2 full
      join t0 on true
      join t1 on c2 = c3
      cross join t0 b
      join t0 c on 0 = 0
      join t2 d on c5 > c5
    where
      d.c14 = (select b.c1 where a.c7 ^@ c.c1)
  ) 

The server crashes: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request..

Version:

yugabyte=# select version();
                                                                                         version                                                                                         
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 15.2-YB-2.25.1.0-b0 on x86_64-pc-linux-gnu, compiled by clang version 17.0.6 (https://github.com/yugabyte/llvm-project.git 9b881774e40024e901fc6f3d313607b071c08631), 64-bit
(1 row)

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions