Closed cockroach-teamcity closed 2 months ago
Here's a minimized reproduction:
statement ok
CREATE TABLE t (
a STRING NOT NULL,
b STRING NOT NULL,
c STRING AS (b) VIRTUAL,
PRIMARY KEY (a, b),
INVERTED INDEX (a, c gin_trgm_ops)
)
statement ok
SELECT 1
FROM (SELECT 'foo' FROM t) AS tmp (f)
JOIN t ON tmp.f = t.a AND tmp.f = t.c
sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on master @ 7fb362dd5aa6e85d65c4c89f208c5bed51ab9692:
Random syntax error:
rsg_test.go:952: Crash detected: server panic: statement exec timeout
Query:
WITH
with_64728 ("co|l_375902")
AS (
SELECT
ARRAY[(-26427):::INT8,12958:::INT8,(-27141):::INT8,(-11045):::INT8] AS "co|l_375902"
FROM
defaultdb.public.seed@seed__int8__float8__date_idx AS tab_158205
JOIN defaultdb.public.seed@seed__int8__float8__date_idx AS tab_158206 ON
(tab_158205.crdb_internal_mvcc_timestamp) = (tab_158206.crdb_internal_mvcc_timestamp),
defaultdb.public.seed AS tab_158209
JOIN defaultdb.public.seed AS tab_158210 ON
(tab_158209._int8) = (tab_158210._int8)
AND (tab_158209._date) = (tab_158210._date)
AND (tab_158209._float8) = (tab_158210._float8)
WHERE
bool(tab_158205._bool::BOOL)::BOOL
)
SELECT
NULL AS "co͜l͆\v_375903",
cte_ref_18503."co|l_375902" AS col_375904,
ARRAY[2441:::INT8,28876:::INT8,(-19336):::INT8,(-5173):::INT8] AS col_375905,
NULL AS col_375906
FROM
with_64728 AS cte_ref_18501,
with_64728 AS "cte😴_""ref�_18502",
with_64728 AS cte_ref_18503,
with_64728 AS "c😧tE_ref_18504";
Schema:
rsg_test.go:753: To reproduce, use schema:
rsg_test.go:755: SET sql_safe_updates = false;;
rsg_test.go:755: SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;;
rsg_test.go:755: SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;;
rsg_test.go:755: CREATE TABLE "ta�ble_1" (col1_0 STRING NOT NULL, col1_1 GEOMETRY NULL, col1̹_2 TIMESTAMPTZ[] NOT NULL, col1_3 JSONB NOT NULL, "col 1_4" GEOGRAPHY NULL, col1_5 FLOAT8 NOT NULL, "c'ol1_6" BYTES NOT NULL, col1_7 GEOMETRY NULL, UNIQUE (abs(col1_5) ASC, col1_0) STORING (col1_1, col1_3, "c'ol1_6", col1_7) WHERE (("ta�ble_1".col1_5 != 0.0:::FLOAT8) AND ("ta�ble_1".col1_0 > e'\x00':::STRING)) AND ("ta�ble_1"."c'ol1_6" != '\x00':::BYTES), INDEX (col1_5 DESC) WHERE (("ta�ble_1"."c'ol1_6" != '\xff':::BYTES) OR ("ta�ble_1".col1_0 = e'\'':::STRING)) OR ("ta�ble_1".col1_5 >= '+Inf':::FLOAT8), INVERTED INDEX (col1_1 ASC) WHERE (("ta�ble_1".col1_0 > 'X':::STRING) AND ("ta�ble_1"."c'ol1_6" >= '\xe29883':::BYTES)) AND ("ta�ble_1".col1_5 < '-Inf':::FLOAT8), FAMILY (col1_7, "c'ol1_6", col1_0), FAMILY (col1̹_2), FAMILY (col1_3), FAMILY ("col 1_4"), FAMILY (col1_1), FAMILY (col1_5));
rsg_test.go:755: ALTER TABLE "ta�ble_1" INJECT STATISTICS e'[{"avg_size": 0, "columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"avg_size": 0, "columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"avg_size": 0, "columns": ["col1\u0339_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"avg_size": 0, "columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"avg_size": 0, "columns": ["\\"col 1_4\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"avg_size": 0, "columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"avg_size": 0, "columns": ["\\"c\'ol1_6\\""], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"avg_size": 0, "columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}]':::JSONB;
rsg_test.go:755: CREATE TYPE rand_typ_0 AS (mm REFCURSOR);
rsg_test.go:755: CREATE TYPE rand_typ_1 AS ENUM ('msgc');
rsg_test.go:755: CREATE TYPE rand_typ_2 AS (lov JSONB, lontp GEOMETRY, kx TIMETZ, qslw FLOAT8);
rsg_test.go:755: CREATE TYPE rand_typ_3 AS ENUM ('ds');
rsg_test.go:755: SET sql_safe_updates = false;;
rsg_test.go:755:
BEGIN; CREATE TYPE greeting AS ENUM ('hello', 'howdy', 'hi', 'good day', 'morning'); COMMIT;
BEGIN;
CREATE TABLE IF NOT EXISTS seed AS
SELECT
g::INT2 AS _int2,
g::INT4 AS _int4,
g::INT8 AS _int8,
g::FLOAT4 AS _float4,
g::FLOAT8 AS _float8,
'2001-01-01'::DATE + g AS _date,
'2001-01-01'::TIMESTAMP + g * '1 day'::INTERVAL AS _timestamp,
'2001-01-01'::TIMESTAMPTZ + g * '1 day'::INTERVAL AS _timestamptz,
g * '1 day'::INTERVAL AS _interval,
g % 2 = 1 AS _bool,
g::DECIMAL AS _decimal,
g::STRING AS _string,
g::STRING::BYTES AS _bytes,
substring('00000000-0000-0000-0000-' || g::STRING || '00000000000', 1, 36)::UUID AS _uuid,
'0.0.0.0'::INET + g AS _inet,
g::STRING::JSONB AS _jsonb,
enum_range('hello'::greeting)[g] as _enum
FROM
generate_series(1, 5) AS g;
COMMIT;
INSERT INTO seed DEFAULT VALUES;
CREATE INDEX on seed (_int8, _float8, _date);
CREATE INVERTED INDEX on seed (_jsonb);
;
rsg_test.go:755: ALTER TABLE seed SPLIT AT VALUES (8162776472863659324);
rsg_test.go:755: ALTER TABLE seed SPLIT AT VALUES (6647188035526504104);
rsg_test.go:755: ALTER TABLE seed SPLIT AT VALUES (849476241254827536);
rsg_test.go:755: ALTER TABLE seed SPLIT AT VALUES (7860953394020777893);
rsg_test.go:755: ALTER TABLE seed SPLIT AT VALUES (208897581305014813);
rsg_test.go:755: ALTER TABLE seed SPLIT AT VALUES (4599670244376290705);
rsg_test.go:755: ALTER TABLE seed SPLIT AT VALUES (6023726758831508232);
rsg_test.go:755: ALTER TABLE seed SPLIT AT VALUES (4457614899688989660);
rsg_test.go:755: ALTER TABLE seed SPLIT AT VALUES (3101709732201359305);
rsg_test.go:755: ALTER TABLE seed SCATTER;
rsg_test.go:757:
rsg_test.go:758: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/d437d2c847dfedbc4972f231c3331c8e/logTestRandomSyntaxSQLSmith3638415726
--- FAIL: TestRandomSyntaxSQLSmith (301.98s)
See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)
- #120970 sql/tests: TestRandomSyntaxSQLSmith failed [SIGSEGV in geos.LineMerge] [A-spatial C-bug C-test-failure O-robot P-3 T-sql-queries branch-release-23.1.18-rc]
Based on the specified backports for linked PR #127407, I applied the following new label(s) to this issue: branch-release-23.2, branch-release-24.1, branch-release-24.2. Please adjust the labels as needed to match the branches actually affected by this issue, including adding any known older branches.
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on master @ c4ab095c4f65b9140661ed57adddc690b1e3ce3f:
Random syntax error:
Query:
Schema:
Help
See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)
Same failure on other branches
- #120970 sql/tests: TestRandomSyntaxSQLSmith failed [SIGSEGV in geos.LineMerge] [A-spatial C-bug C-test-failure O-robot P-3 T-sql-queries branch-release-23.1.18-rc]
/cc @cockroachdb/sql-foundations
This test on roachdash | Improve this report!
Jira issue: CRDB-38036