Open SteveLeungYL opened 2 months ago
Hi @SteveLeungYL, please add branch-* labels to identify which branch(es) this C-bug affects.
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
Hello, I am Blathers. I am here to help you get the issue triaged.
Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.
I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
Reduced reproduction:
CREATE TABLE t1 (i INT);
CREATE TABLE t2 AS (
WITH w AS MATERIALIZED (
EXPERIMENTAL SCRUB TABLE t1
)
SELECT 'abc'
);
This reproduces back to v23.1. Prior to that, I get a user error:
ERROR: relation "t1" does not exist
SQLSTATE: 42P01
The solution might be to simply disallow EXPERIMENTAL SCRUB TABLE t1
within a CTE. I don't think we ever intended that to be possible.
Describe the problem
The latest version of the CockroachDB (60313dca26 or v24.2.1) crashes when executing the following query:
To Reproduce
Expected behavior
The CREATE TABLE statement should return syntax error.
Additional data / screenshots Here is the crash stack trace from CockroachDB v24.2.1:
Environment:
Additional context
The bug could potentially be related to: https://github.com/cockroachdb/cockroach/issues/93931.
Jira issue: CRDB-42014