Re: BUG #17067: FailedAssertion at castNodeImpl

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: cyg0810(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17067: FailedAssertion at castNodeImpl
Date: 2021-06-21 09:47:49
Message-ID: CAApHDvppyj_WrraCrSgQvDd_NGJp87S6ht6OzjytomMNqa_rxw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 21 Jun 2021 at 20:15, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> run the following sql command through client and the PostgreSQL database
> process will crash:
>
> CREATE TABLE v0 ( v1 FLOAT NOT NULL PRIMARY KEY ) ;
> WITH v1 AS ( DELETE FROM v0 WHERE v1 <= - - - 9 RETURNING * ) INSERT INTO v0
> VALUES ( - - - - - - 95 ) ;
> SELECT v1 FROM ( SELECT * FROM v0 UNION ALL SELECT * FROM v0 GROUP BY
> DISTINCT ROLLUP ( v1 , v1 ) , ROLLUP ( v1 , USER ) , GROUPING SETS ( ROW ( )
> , ( v1 ) ) , ROLLUP ( v1 < - - 61 AND v1 IN ( -2147483648 , - 94 ) , v1 ) )
> v1 ORDER BY ( v1 + - - -1 ) , ( v1 + - - v1 IN ( SELECT v1 FALSE FROM (
> SELECT FROM v0 GROUP BY v1 ) PRECISION ) ) ;

Thanks for the report. It looks like a thinko in 1d581ce71. Code
was added there which insists the initial list element is a List, but
it's an IntList. I think the code should just use linitial instead of
linitial_node.

I'm quite surprised that we don't have a test that picks this up.

David

Attachment Content-Type Size
fixbug17067.patch application/octet-stream 509 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Rowley 2021-06-21 10:09:30 Re: BUG #17067: FailedAssertion at castNodeImpl
Previous Message PG Bug reporting form 2021-06-21 03:11:16 BUG #17067: FailedAssertion at castNodeImpl