Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql/tests: TestRandomSyntaxSQLSmith failed #64010

Closed
cockroach-teamcity opened this issue Apr 21, 2021 · 9 comments
Closed

sql/tests: TestRandomSyntaxSQLSmith failed #64010

cockroach-teamcity opened this issue Apr 21, 2021 · 9 comments
Labels
C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot.

Comments

@cockroach-teamcity
Copy link
Member

(sql/tests).TestRandomSyntaxSQLSmith failed on release-21.1@f3b14a95b781f57ac53a472b9979270b0ecbedfb:

    rsg_test.go:577: 
        SET CLUSTER SETTING sql.defaults.drop_enum_value.enabled = true;
        SET enable_drop_enum_value = true;
        
        		SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;
        		SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;
        		SET CLUSTER SETTING sql.defaults.interleaved_tables.enabled = true;
        	CREATE TABLE table1 (col1_0 INET NULL, col1_1 REGNAMESPACE NULL, col1_2 INET, col1_3 INTERVAL NOT NULL, col1_4 BIT(9) NULL, col1_5 TIMESTAMP NULL, PRIMARY KEY (col1_3 ASC), INDEX (col1_2 DESC, col1_0 ASC, col1_4 DESC, col1_1 DESC) STORING (col1_5), UNIQUE (col1_2, col1_4, col1_3 DESC, col1_1, col1_0, col1_5), UNIQUE (col1_3 DESC, col1_2 DESC, col1_1, col1_0 DESC) STORING (col1_4), FAMILY (col1_1), FAMILY (col1_0), FAMILY (col1_2, col1_5), FAMILY (col1_3), FAMILY (col1_4));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 133708, "histo_buckets": [{"distinct_range": 0, "num_eq": 8030907303303446200, "num_range": 0, "upper_bound": "174.225.23.155/20"}, {"distinct_range": 4452.754106525098, "num_eq": 50000000, "num_range": 50000, "upper_bound": "242.148.101.156/27"}, {"distinct_range": 0, "num_eq": 90, "num_range": 706597438002642956, "upper_bound": "22.87.7.159"}, {"distinct_range": 0, "num_eq": 80000000, "num_range": 500, "upper_bound": "f613:bcc2:5830:b71b:cddf:e64b:6a1c:10a0/11"}, {"distinct_range": 0, "num_eq": 3566318452192734336, "num_range": 60000000, "upper_bound": "3c4a:95a0:818f:4de1:be97:f9d5:5c35:1528/68"}, {"distinct_range": 214743691.51770866, "num_eq": 6189816509385762439, "num_range": 1000000000, "upper_bound": "5bdd:a115:af44:820f:a59c:4a8d:70fe:b51a/115"}], "histo_col_type": "INET", "name": "__auto__", "null_count": 179928, "row_count": 200000}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 124133, "histo_buckets": [{"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "-76 years -6 mons -765 days -02:15:04.67549"}, {"distinct_range": 0, "num_eq": 8420988005042448751, "num_range": 50000, "upper_bound": "-64 years -7 mons -643 days -15:03:14.102777"}, {"distinct_range": 7775206382715533000, "num_eq": 70000000, "num_range": 7775206382715533035, "upper_bound": "-33 years -8 mons -996 days -21:30:45.732858"}], "histo_col_type": "INTERVAL", "name": "__auto__", "null_count": 0, "row_count": 200000}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 146673, "histo_col_type": "", "name": "__auto__", "null_count": 20113, "row_count": 200000}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 84499, "histo_col_type": "", "name": "__auto__", "null_count": 56774, "row_count": 200000}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 86427, "histo_col_type": "", "name": "__auto__", "null_count": 102896, "row_count": 200000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 178834, "histo_col_type": "", "name": "__auto__", "null_count": 155738, "row_count": 200000}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('cyggug');
        CREATE TYPE rand_typ_1 AS ENUM ('kzxsau', 'tcd', 'rw', 'it', 'sf', 'aiqjsm');
        CREATE TYPE rand_typ_2 AS ENUM ('c', 'hpcw', 'j', 'i', 'kexz');
        CREATE TYPE rand_typ_3 AS ENUM ('hjc', 'p', 'ljtdv', 'pqdilb');
        CREATE TYPE rand_typ_4 AS ENUM ('gh');
        ;
    rsg_test.go:577: 
        SET CLUSTER SETTING sql.defaults.drop_enum_value.enabled = true;
        SET enable_drop_enum_value = true;
        
        CREATE TYPE greeting AS ENUM ('hello', 'howdy', 'hi', 'good day', 'morning');
        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;
        
        INSERT INTO seed DEFAULT VALUES;
        CREATE INDEX on seed (_int8, _float8, _date);
        CREATE INVERTED INDEX on seed (_jsonb);
        ;
    rsg_test.go:579: 
    rsg_test.go:580: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith436508436
--- FAIL: TestRandomSyntaxSQLSmith (300.55s)

More

make stressrace TESTS=TestRandomSyntaxSQLSmith PKG=./pkg/sql/tests TESTTIMEOUT=5m STRESSFLAGS='-timeout 5m' 2>&1

Related:

See this test on roachdash
powered by pkg/cmd/internal/issues

@cockroach-teamcity
Copy link
Member Author

(sql/tests).TestRandomSyntaxSQLSmith failed on release-21.1@affd857ffc05591f5898701690b8a9136859ab1b:

        	false;
    rsg_test.go:764: 358246 executions, 347769 successful
    rsg_test.go:575: To reproduce, use schema:
    rsg_test.go:577: 
        SET CLUSTER SETTING sql.defaults.drop_enum_value.enabled = true;
        SET enable_drop_enum_value = true;
        
        		SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;
        		SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;
        		SET CLUSTER SETTING sql.defaults.interleaved_tables.enabled = true;
        	CREATE TABLE table1 (col1_0 GEOGRAPHY NOT NULL, col1_1 NAME NOT NULL, col1_2 UUID NULL, col1_3 INET, col1_4 GEOGRAPHY NULL, col1_5 VARCHAR NOT NULL, col1_6 CHAR, col1_7 STRING AS (lower(col1_6)) VIRTUAL, col1_8 STRING NOT NULL AS (lower(col1_5)) VIRTUAL, col1_9 STRING NULL AS (lower(CAST(col1_3 AS STRING))) STORED);
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 14, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 17, "histo_col_type": "", "name": "__auto__", "null_count": 13, "row_count": 20}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 12, "histo_col_type": "", "name": "__auto__", "null_count": 19, "row_count": 20}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 10, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 14, "histo_col_type": "", "name": "__auto__", "null_count": 4, "row_count": 20}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 18, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 18, "histo_col_type": "", "name": "__auto__", "null_count": 12, "row_count": 20}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7, "histo_col_type": "", "name": "__auto__", "null_count": 10, "row_count": 20}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('s', 'px', 'xdorji', 'iuv');
        CREATE TYPE rand_typ_1 AS ENUM ('d');
        ;
    rsg_test.go:577: 
        SET CLUSTER SETTING sql.defaults.drop_enum_value.enabled = true;
        SET enable_drop_enum_value = true;
        
        CREATE TYPE greeting AS ENUM ('hello', 'howdy', 'hi', 'good day', 'morning');
        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;
        
        INSERT INTO seed DEFAULT VALUES;
        CREATE INDEX on seed (_int8, _float8, _date);
        CREATE INVERTED INDEX on seed (_jsonb);
        ;
    rsg_test.go:579: 
    rsg_test.go:580: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith001596277
--- FAIL: TestRandomSyntaxSQLSmith (300.50s)

More

make stressrace TESTS=TestRandomSyntaxSQLSmith PKG=./pkg/sql/tests TESTTIMEOUT=5m STRESSFLAGS='-timeout 5m' 2>&1

Related:

See this test on roachdash
powered by pkg/cmd/internal/issues

@cockroach-teamcity
Copy link
Member Author

(sql/tests).TestRandomSyntaxSQLSmith failed on release-21.1@3447b13373c947d4b70d33dacc3eda7e5c15e753:

        		SET CLUSTER SETTING sql.defaults.interleaved_tables.enabled = true;
        	CREATE TABLE table1 (col1_0 BIT(43) NOT NULL, col1_1 GEOGRAPHY NOT NULL, FAMILY (col1_0, col1_1));
        CREATE TABLE table2 (col2_0 CHAR NOT NULL, PRIMARY KEY (col2_0 DESC), UNIQUE (col2_0) WHERE table2.col2_0 != e'\U00002603':::STRING, INDEX (col2_0 ASC));
        CREATE TABLE table3 (col3_0 VARCHAR NOT NULL, col3_1 BYTES NOT NULL, col3_2 FLOAT4 NULL, col3_3 TIMETZ NOT NULL, col3_4 FLOAT8 NOT NULL, PRIMARY KEY (col3_1 DESC, col3_3, col3_4 DESC, col3_0 ASC), col3_5 FLOAT8 NOT NULL AS (col3_4 + (-0.576674765502734):::FLOAT8) STORED, INDEX (col3_4, col3_1 ASC, col3_2, col3_5 DESC) WHERE (table3.col3_3 = '24:00:00-15:59:00':::TIMETZ) AND (table3.col3_2 > '+Inf':::FLOAT8), UNIQUE (col3_3, col3_0 ASC, col3_4, col3_5 DESC, col3_1 DESC), UNIQUE (col3_1 DESC, col3_3 ASC, col3_5 ASC, col3_2 ASC, col3_4 ASC), INDEX (col3_2 ASC, col3_5 DESC));
        CREATE TABLE table4 (col4_0 REGTYPE NOT NULL, col4_1 BIT NOT NULL, col4_2 TIMESTAMPTZ NOT NULL, col4_3 FLOAT8 NOT NULL, col4_4 INTERVAL NOT NULL, col4_5 BIT(33) NOT NULL, col4_6 BIT(7), col4_7 BOOL, col4_8 REGPROCEDURE, col4_9 BIT(14) NOT NULL, PRIMARY KEY (col4_2 ASC, col4_3 ASC, col4_4, col4_1 ASC), col4_10 STRING NULL AS (lower(CAST(col4_6 AS STRING))) STORED, col4_11 STRING NULL AS (lower(CAST(col4_8 AS STRING))) VIRTUAL, col4_12 STRING NULL AS (lower(CAST(col4_8 AS STRING))) VIRTUAL, col4_13 STRING NOT NULL AS (lower(CAST(col4_7 AS STRING))) VIRTUAL, UNIQUE (col4_1 ASC, col4_0, col4_4 ASC, col4_12 DESC, col4_6 ASC) WHERE ((((((table4.col4_13 > e'\x00':::STRING) OR table4.col4_7) AND (table4.col4_10 != e'\x00':::STRING)) OR (table4.col4_3 < 1.401298464324817e-45:::FLOAT8)) OR (table4.col4_12 != '"':::STRING)) OR (table4.col4_2 <= '0001-01-01 00:00:00+00:00':::TIMESTAMPTZ)) AND (table4.col4_11 < e'\U00002603':::STRING), INDEX (col4_1 ASC, col4_12, col4_10 ASC, col4_4 ASC, col4_13 ASC, col4_8 DESC, col4_5, col4_0 ASC, col4_2 DESC, col4_7 DESC), INDEX (col4_5, col4_12, col4_2), INDEX (col4_4, col4_11 DESC, col4_2 ASC, col4_0 DESC, col4_6, col4_5 DESC), INDEX (col4_11 ASC, col4_5 ASC, col4_8, col4_12 DESC, col4_3, col4_9 DESC, col4_0, col4_2 DESC, col4_10 ASC, col4_13, col4_4 ASC), FAMILY (col4_0), FAMILY (col4_6), FAMILY (col4_8), FAMILY (col4_1, col4_4), FAMILY (col4_3, col4_7, col4_5, col4_2, col4_9), FAMILY (col4_10));
        CREATE TABLE table5 (col5_0 FLOAT4, col5_1 BOX2D NULL, col5_2 BOX2D NOT NULL, col5_3 BOX2D, col5_4 FLOAT8 NOT NULL, col5_5 "char", col5_6 FLOAT4 NULL AS (col5_0 + col5_4) VIRTUAL, col5_7 FLOAT4 NULL AS (col5_0 + col5_4) VIRTUAL, INDEX (col5_2 DESC, col5_6 ASC, col5_7, col5_0, col5_3, col5_4 ASC), UNIQUE (col5_4 ASC, col5_1, col5_7, col5_5 DESC, col5_6 DESC, col5_0 DESC, col5_2 DESC) STORING (col5_3), INDEX (col5_5 DESC, col5_3, col5_1 DESC) WHERE ((((table5.col5_6 < 1.401298464324817e-45:::FLOAT8) AND (table5.col5_5 <= '"':::STRING)) AND (table5.col5_7 >= 1.401298464324817e-45:::FLOAT8)) OR (table5.col5_4 = 3.4028234663852886e+38:::FLOAT8)) AND (table5.col5_0 != 1.401298464324817e-45:::FLOAT8), INDEX (col5_7 ASC) STORING (col5_0, col5_1, col5_3, col5_4), UNIQUE (col5_5, col5_3 ASC, col5_0, col5_6 ASC, col5_2 DESC, col5_1, col5_4 DESC), INDEX (col5_4 DESC, col5_7 DESC, col5_5 DESC) STORING (col5_1, col5_3) WHERE ((((table5.col5_6 > (-1.0):::FLOAT8) AND (table5.col5_7 > 0.0:::FLOAT8)) OR (table5.col5_0 >= 1.401298464324817e-45:::FLOAT8)) AND (table5.col5_5 < '"':::STRING)) OR (table5.col5_4 < 1.7976931348623157e+308:::FLOAT8), UNIQUE (col5_1 ASC) STORING (col5_2, col5_4) WHERE ((((table5.col5_7 > 0.0:::FLOAT8) OR (table5.col5_0 != 0.0:::FLOAT8)) AND (table5.col5_6 < '-Inf':::FLOAT8)) OR (table5.col5_5 = e'\x00':::STRING)) AND (table5.col5_4 >= 1.7976931348623157e+308:::FLOAT8));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 614, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 964, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1000}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 837, "histo_buckets": [{"distinct_range": 0, "num_eq": 6671652960913778131, "num_range": 0, "upper_bound": "\\u0018"}, {"distinct_range": 0, "num_eq": 200000000, "num_range": 4000000000, "upper_bound": "\\u001b"}, {"distinct_range": 4926547.999709703, "num_eq": 8717768008225550142, "num_range": 5000000, "upper_bound": "/"}, {"distinct_range": 0, "num_eq": 6349901074270201181, "num_range": 20000000000, "upper_bound": "p"}], "histo_col_type": "CHAR", "name": "__auto__", "null_count": 0, "row_count": 4000}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS e'[{"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4253435836999941064, "histo_col_type": "", "name": "__auto__", "null_count": 3349037224523494820, "row_count": 4616341692593248069}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1007710316737572913, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4616341692593248069}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 631495056423284191, "histo_buckets": [{"distinct_range": 0, "num_eq": 5153186057445307227, "num_range": 0, "upper_bound": "-0.6847019141497126"}, {"distinct_range": 671892814835570000, "num_eq": 5282793978610670848, "num_range": 3498086155229254500, "upper_bound": "-0.5459624187275454"}, {"distinct_range": 4379366724773036500, "num_eq": 2453965930877231285, "num_range": 7658754826568322622, "upper_bound": "-0.0770372252954708"}], "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 0, "row_count": 4616341692593248069}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 205950329769913335, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4616341692593248069}, {"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 112838877896851156, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4616341692593248069}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 401202648897392700, "histo_buckets": [{"distinct_range": 0, "num_eq": 2000000000, "num_range": 0, "upper_bound": "\\\\x"}, {"distinct_range": 0, "num_eq": 1000000000, "num_range": 30000000, "upper_bound": "\\\\x0b"}, {"distinct_range": 0, "num_eq": 6888803092257645784, "num_range": 8581208741850523334, "upper_bound": "\\\\x45285f1e21db5e"}, {"distinct_range": 0, "num_eq": 2000000, "num_range": 70000000000, "upper_bound": "\\\\x58"}, {"distinct_range": 681638346809551600, "num_eq": 7735230630737192070, "num_range": 2110825899805331415, "upper_bound": "\\\\x69dda20a"}, {"distinct_range": 54330369.22977598, "num_eq": 182718921848264398, "num_range": 70000000, "upper_bound": "\\\\x9e78bf11"}, {"distinct_range": 3635466097796276000, "num_eq": 70, "num_range": 3635466097796276155, "upper_bound": "\\\\xbf81f475"}, {"distinct_range": 259085918733476130, "num_eq": 4253200393589275578, "num_range": 2549122107873249926, "upper_bound": "\\\\xd6bfb74f1607eb"}, {"distinct_range": 5949497197593489000, "num_eq": 2178057555384024072, "num_range": 5949497197593489138, "upper_bound": "\\\\xefbcad"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 4616341692593248069}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS '[{"columns": ["col4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 819193584, "histo_col_type": "", "name": "__auto__", "null_count": 2893167636, "row_count": 4000000000}, {"columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 223041239, "histo_buckets": [{"distinct_range": 0, "num_eq": 1000000, "num_range": 0, "upper_bound": "X"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 925955337, "row_count": 4000000000}, {"columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 246664773, "histo_col_type": "", "name": "__auto__", "null_count": 1171011556, "row_count": 4000000000}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1774326136, "histo_buckets": [{"distinct_range": 0, "num_eq": 2047593654303965060, "num_range": 0, "upper_bound": "1"}], "histo_col_type": "BIT", "name": "__auto__", "null_count": 0, "row_count": 4000000000}, {"columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 194210575, "histo_col_type": "", "name": "__auto__", "null_count": 1444777370, "row_count": 4000000000}, {"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 801456527, "histo_col_type": "", "name": "__auto__", "null_count": 1631693899, "row_count": 4000000000}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3292412584, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000000}, {"columns": ["col4_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2034364704, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000000}, {"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 109263722, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000000}, {"columns": ["col4_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2852898213, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000000}, {"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 562115982, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000000}, {"columns": ["col4_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2599115518, "histo_col_type": "", "name": "__auto__", "null_count": 460203953, "row_count": 4000000000}, {"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3944046815, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000000}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1283274161, "histo_buckets": [{"distinct_range": 0, "num_eq": 4385287478508533102, "num_range": 0, "upper_bound": "12 years 8 mons 471 days 16:53:24.391989"}, {"distinct_range": 0, "num_eq": 100000000000, "num_range": 410106551984555249, "upper_bound": "23 years 498 days 20:26:14.585266"}, {"distinct_range": 17228527450.275875, "num_eq": 10000, "num_range": 20000000000, "upper_bound": "27 years 3 mons 836 days 06:25:16.605841"}, {"distinct_range": 142726780.26004598, "num_eq": 7001175729703904625, "num_range": 1000000000, "upper_bound": "37 years 3 mons 577 days 07:36:16.351987"}, {"distinct_range": 0, "num_eq": 9000, "num_range": 1000000, "upper_bound": "290 years"}], "histo_col_type": "INTERVAL", "name": "__auto__", "null_count": 0, "row_count": 4000000000}]':::JSONB;
        ALTER TABLE table5 INJECT STATISTICS '[{"columns": ["col5_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 224066395, "histo_col_type": "", "name": "__auto__", "null_count": 221235186, "row_count": 300000000}, {"columns": ["col5_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 88615456, "histo_col_type": "", "name": "__auto__", "null_count": 70966337, "row_count": 300000000}, {"columns": ["col5_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 45401031, "histo_buckets": [{"distinct_range": 0, "num_eq": 1000, "num_range": 0, "upper_bound": "-0.6352668404579163"}, {"distinct_range": 0, "num_eq": 1620592848763593414, "num_range": 9069564617079200988, "upper_bound": "-0.3441695272922516"}, {"distinct_range": 7000000, "num_eq": 2028605183777724067, "num_range": 7000000, "upper_bound": "-0.26116397976875305"}, {"distinct_range": 0, "num_eq": 8253069445211944744, "num_range": 350013857163118316, "upper_bound": "-0.25562605261802673"}, {"distinct_range": 1105751095233298600, "num_eq": 0, "num_range": 3322586442468207300, "upper_bound": "-0.07118234783411026"}, {"distinct_range": 0, "num_eq": 634992280022820800, "num_range": 0, "upper_bound": "0.043076712638139725"}, {"distinct_range": 2813565657662776000, "num_eq": 60, "num_range": 3530509902161052006, "upper_bound": "0.5405223965644836"}, {"distinct_range": 800000, "num_eq": 40000, "num_range": 800000, "upper_bound": "1.356321930885315"}], "histo_col_type": "FLOAT4", "name": "__auto__", "null_count": 299102261, "row_count": 300000000}, {"columns": ["col5_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 273701236, "histo_col_type": "", "name": "__auto__", "null_count": 200024221, "row_count": 300000000}, {"columns": ["col5_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 280537963, "histo_buckets": [{"distinct_range": 0, "num_eq": 80000000000, "num_range": 0, "upper_bound": "BOX(-1.65410629954523 -0.1450627885884861,0.7785549486245813 0.9620045313665495)"}, {"distinct_range": 0, "num_eq": 100000000, "num_range": 500000, "upper_bound": "BOX(-0.8440019570492016 -0.5542056274218388,0.024599928635592738 0.5608966961557882)"}, {"distinct_range": 0, "num_eq": 8395845545330430916, "num_range": 7310460701403935016, "upper_bound": "BOX(-0.7534934782826913 -1.6155221594067015,-0.7176162694858634 -0.1329176440727412)"}, {"distinct_range": 720520793198017300, "num_eq": 0, "num_range": 720520793198017320, "upper_bound": "BOX(-0.6809850955491095 -0.12414611525626232,0.27341488709339457 -0.06968873277261323)"}, {"distinct_range": 50000000000, "num_eq": 70, "num_range": 50000000000, "upper_bound": "BOX(-0.6164697023774093 -0.655296672979805,-0.045324039949724004 -0.11189901137417646)"}, {"distinct_range": 0, "num_eq": 0, "num_range": 300, "upper_bound": "BOX(-0.2234090819844371 -0.6472703893705614,0.5968382692441688 0.8083395205758448)"}], "histo_col_type": "BOX2D", "name": "__auto__", "null_count": 19375250, "row_count": 300000000}, {"columns": ["col5_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 256590241, "histo_buckets": [{"distinct_range": 0, "num_eq": 8000000, "num_range": 0, "upper_bound": "BOX(-10 -10,10 10)"}, {"distinct_range": 2698449197419927000, "num_eq": 70000, "num_range": 8564262169694034120, "upper_bound": "BOX(-0.8252077093409688 -1.1605779444872204,1.6528976671392575 0.29268228884309144)"}, {"distinct_range": 0, "num_eq": 40000, "num_range": 0, "upper_bound": "BOX(-0.5065525803188811 -1.0144727952396064,0.6386970030823522 -0.9645223662194374)"}, {"distinct_range": 44872609.18151983, "num_eq": 5000000000, "num_range": 80000000, "upper_bound": "BOX(-0.23034114182531895 0.7645671088791892,0.3497249424129374 1.0723106495498103)"}, {"distinct_range": 100, "num_eq": 3007853313394806251, "num_range": 100, "upper_bound": "BOX(0.06933207771104233 -1.5362684620803428,0.2137366863958743 1.513694549492086)"}], "histo_col_type": "BOX2D", "name": "__auto__", "null_count": 0, "row_count": 300000000}, {"columns": ["col5_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 22657510, "histo_col_type": "", "name": "__auto__", "null_count": 225326239, "row_count": 300000000}, {"columns": ["col5_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 111445736, "histo_buckets": [{"distinct_range": 0, "num_eq": 6766726406280661331, "num_range": 0, "upper_bound": "-0.8119214336690304"}, {"distinct_range": 2954762.046217732, "num_eq": 6687623291169745857, "num_range": 3000000, "upper_bound": "1.0"}], "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 0, "row_count": 300000000}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('adtopo', 'bvtwm');
        CREATE TYPE rand_typ_1 AS ENUM ('j', 'qkkxrv', 'yp', 'f', 'glhen', 'kyqznd');
        CREATE TYPE rand_typ_2 AS ENUM ('bkjwo', 'kve');
        ;
    rsg_test.go:577: 
        SET CLUSTER SETTING sql.defaults.drop_enum_value.enabled = true;
        SET enable_drop_enum_value = true;
        
        CREATE TYPE greeting AS ENUM ('hello', 'howdy', 'hi', 'good day', 'morning');
        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;
        
        INSERT INTO seed DEFAULT VALUES;
        CREATE INDEX on seed (_int8, _float8, _date);
        CREATE INVERTED INDEX on seed (_jsonb);
        ;
    rsg_test.go:579: 
    rsg_test.go:580: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith237024210
--- FAIL: TestRandomSyntaxSQLSmith (300.65s)

More

make stressrace TESTS=TestRandomSyntaxSQLSmith PKG=./pkg/sql/tests TESTTIMEOUT=5m STRESSFLAGS='-timeout 5m' 2>&1

Related:

See this test on roachdash
powered by pkg/cmd/internal/issues

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 44a4b10cabb511842a9fe30285b9f7d1041870a1:

        		SET CLUSTER SETTING sql.defaults.interleaved_tables.enabled = true;
        	CREATE TABLE table1 (col1_0 REGCLASS, col1_1 OID, col1_2 INET NOT NULL, col1_3 JSONB NULL, col1_4 BOX2D NULL, col1_5 TIMESTAMP NULL, col1_6 OID, col1_7 "char" NOT NULL, col1_8 GEOMETRY, col1_9 STRING NULL AS (lower(CAST(col1_0 AS STRING))) VIRTUAL, col1_10 STRING NULL AS (lower(CAST(col1_5 AS STRING))) VIRTUAL, col1_11 STRING NULL AS (lower(col1_7)) VIRTUAL, col1_12 STRING AS (lower(CAST(col1_3 AS STRING))) VIRTUAL, UNIQUE (col1_10 DESC) STORING (col1_1, col1_2, col1_4, col1_6, col1_8) WHERE (((((table1.col1_5 = '-2000-01-01 00:00:00':::TIMESTAMP) OR (table1.col1_10 > e'\x00':::STRING)) AND (table1.col1_11 > '':::STRING)) AND (table1.col1_9 != e'\'':::STRING)) OR (table1.col1_7 > '':::STRING)) OR (table1.col1_12 <= e'\'':::STRING), UNIQUE (col1_4 DESC, col1_5, col1_10 ASC, col1_11 DESC, col1_2 ASC, col1_0, col1_1, col1_9, col1_7 DESC, col1_12 DESC));
        CREATE TABLE table2 (col2_0 CHAR, col2_1 CHAR NOT NULL, col2_2 DECIMAL NOT NULL, col2_3 OID, PRIMARY KEY (col2_1 ASC, col2_2 DESC), col2_4 DECIMAL AS (col2_2 + 88025965209136704.14:::DECIMAL) VIRTUAL, col2_5 DECIMAL NULL AS (col2_2 + 3.587778346862931587E+24:::DECIMAL) STORED, INDEX (col2_0 DESC, col2_4, col2_1 ASC, col2_5, col2_3 ASC) WHERE table2.col2_0 >= e'\x00':::STRING, UNIQUE (col2_1 ASC, col2_0 ASC, col2_2, col2_5 ASC) WHERE table2.col2_1 >= '':::STRING, UNIQUE (col2_2 DESC, col2_5, col2_3 ASC) WHERE table2.col2_5 < 0:::DECIMAL);
        CREATE TABLE table3 (col3_0 TIMETZ NULL, INDEX (col3_0), UNIQUE (col3_0) WHERE table3.col3_0 = '00:00:00+15:59:00':::TIMETZ, UNIQUE (col3_0 DESC), INDEX (col3_0 ASC) WHERE table3.col3_0 > '00:00:00+15:59:00':::TIMETZ, UNIQUE (col3_0 ASC) WHERE table3.col3_0 <= '00:00:00+15:59:00':::TIMETZ, UNIQUE (col3_0 DESC) WHERE table3.col3_0 != '00:00:00+15:59:00':::TIMETZ, INDEX (col3_0 DESC));
        CREATE TABLE table4 (col4_0 TIMESTAMPTZ NOT NULL, PRIMARY KEY (col4_0), UNIQUE (col4_0) WHERE table4.col4_0 > '294276-12-31 23:59:59.999999+00:00':::TIMESTAMPTZ);
        CREATE TABLE table5 (col5_0 INET NOT NULL, col5_1 UUID, col5_2 GEOGRAPHY NOT NULL, INVERTED INDEX (col5_0 ASC, col5_1 DESC, col5_2 DESC), INDEX (col5_1, col5_0 DESC), INVERTED INDEX (col5_1 DESC, col5_0 DESC, col5_2 ASC), INVERTED INDEX (col5_0 DESC, col5_1, col5_2 ASC), FAMILY (col5_0), FAMILY (col5_1), FAMILY (col5_2));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 46992890, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 28528197, "histo_col_type": "", "name": "__auto__", "null_count": 16952125, "row_count": 90000000}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 27185033, "histo_col_type": "", "name": "__auto__", "null_count": 47960351, "row_count": 90000000}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 48796137, "histo_col_type": "", "name": "__auto__", "null_count": 9176435, "row_count": 90000000}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 33149416, "histo_col_type": "", "name": "__auto__", "null_count": 38703768, "row_count": 90000000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 16896962, "histo_col_type": "", "name": "__auto__", "null_count": 39007454, "row_count": 90000000}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6799930, "histo_buckets": [{"distinct_range": 0, "num_eq": 100, "num_range": 0, "upper_bound": "BOX(-1.9741257222811281 -0.014133219481969661,-1.4991141296870347 1.8878397449008517)"}, {"distinct_range": 21599891997.344185, "num_eq": 70, "num_range": 100000000000, "upper_bound": "BOX(-0.07611279378088706 -1.280201014825184,1.3046379255249798 0.11494680018384895)"}], "histo_col_type": "BOX2D", "name": "__auto__", "null_count": 56585844, "row_count": 90000000}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 33390030, "histo_col_type": "", "name": "__auto__", "null_count": 28011106, "row_count": 90000000}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 86204625, "histo_col_type": "", "name": "__auto__", "null_count": 56645464, "row_count": 90000000}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 21979818, "histo_col_type": "", "name": "__auto__", "null_count": 82808822, "row_count": 90000000}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 69160281, "histo_col_type": "", "name": "__auto__", "null_count": 78020116, "row_count": 90000000}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 61581703, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 56787459, "histo_col_type": "", "name": "__auto__", "null_count": 59925579, "row_count": 90000000}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8, "histo_buckets": [{"distinct_range": 0, "num_eq": 90, "num_range": 0, "upper_bound": "\\u000f"}, {"distinct_range": 4466560317.703843, "num_eq": 9127652582447498626, "num_range": 10000000000, "upper_bound": "1"}, {"distinct_range": 0, "num_eq": 50, "num_range": 1753344980198892998, "upper_bound": "D"}, {"distinct_range": 0, "num_eq": 1663650936002568243, "num_range": 2548480540334696024, "upper_bound": "H"}], "histo_col_type": "CHAR", "name": "__auto__", "null_count": 3, "row_count": 10}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 9, "histo_buckets": [{"distinct_range": 0, "num_eq": 4000, "num_range": 0, "upper_bound": "\\r"}, {"distinct_range": 0, "num_eq": 10000, "num_range": 0, "upper_bound": "\\u0017"}, {"distinct_range": 7799249.703632624, "num_eq": 50000, "num_range": 80000000, "upper_bound": "d"}, {"distinct_range": 653577883.6039021, "num_eq": 300000000, "num_range": 1000000000, "upper_bound": "n"}], "histo_col_type": "CHAR", "name": "__auto__", "null_count": 0, "row_count": 10}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 9, "row_count": 10}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS '[{"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4269439933495982741, "histo_buckets": [{"distinct_range": 0, "num_eq": 80, "num_range": 0, "upper_bound": "10:07:26.290236+14:50:00"}, {"distinct_range": 6036993841580052000, "num_eq": 4000000000, "num_range": 7340548977567134355, "upper_bound": "13:50:19.994784+08:42:00"}, {"distinct_range": 3249570443448318000, "num_eq": 1655610840690190649, "num_range": 4695389831874879244, "upper_bound": "01:29:59.094036-05:53:00"}, {"distinct_range": 0, "num_eq": 8000000000, "num_range": 700000000, "upper_bound": "02:17:45.482719-05:34:00"}, {"distinct_range": 2457188178395280400, "num_eq": 100000, "num_range": 2620519222363111297, "upper_bound": "09:44:53.066211+01:39:00"}, {"distinct_range": 0, "num_eq": 3000, "num_range": 0, "upper_bound": "21:50:35.850621+11:12:00"}, {"distinct_range": 3376904616923189000, "num_eq": 300, "num_range": 3376904616923189095, "upper_bound": "07:10:41.557569-04:33:00"}, {"distinct_range": 1171271607628048000, "num_eq": 400000, "num_range": 1171271607628047884, "upper_bound": "08:12:46.863516-08:29:00"}, {"distinct_range": 7250658259103288000, "num_eq": 200, "num_range": 7250658259103288407, "upper_bound": "18:07:45.904801-13:15:00"}], "histo_col_type": "TIMETZ", "name": "__auto__", "null_count": 4284677388797348564, "row_count": 5445768415768392738}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS '[{"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "TIMESTAMPTZ", "name": "__auto__", "null_count": 0, "row_count": 0}]':::JSONB;
        ALTER TABLE table5 INJECT STATISTICS '[{"columns": ["col5_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7018579214169191581, "histo_buckets": [{"distinct_range": 0, "num_eq": 900, "num_range": 0, "upper_bound": "09c18e1c-43ff-45e1-af2e-387e984c7779"}], "histo_col_type": "UUID", "name": "__auto__", "null_count": 6666195081304560000, "row_count": 9192205926911510947}, {"columns": ["col5_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5565666701573876389, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 9192205926911510947}, {"columns": ["col5_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3706676077048784611, "histo_buckets": [{"distinct_range": 0, "num_eq": 6645475866910809271, "num_range": 0, "upper_bound": "214.163.67.91/1"}, {"distinct_range": 76155134459693730, "num_eq": 2520896556688534826, "num_range": 412175604594497414, "upper_bound": "183.230.152.38/12"}, {"distinct_range": 0, "num_eq": 5186703655860237598, "num_range": 0, "upper_bound": "137.191.179.64/14"}, {"distinct_range": 2927157507433286700, "num_eq": 6459152343096120537, "num_range": 7333034279476995697, "upper_bound": "742c:f3a2:7244:a43f:14aa:7d45:1337:f520/117"}], "histo_col_type": "INET", "name": "__auto__", "null_count": 0, "row_count": 9192205926911510947}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('hj', 'ghlkdg');
        CREATE TYPE rand_typ_1 AS ENUM ('gh', 'uuc', 'xu', 'ihfvg');
        CREATE TYPE rand_typ_2 AS ENUM ('m', 'raxnu', 'ro', 'mvwywv', 'tlgy');
        ;
    rsg_test.go:577: 
        SET CLUSTER SETTING sql.defaults.drop_enum_value.enabled = true;
        SET enable_drop_enum_value = true;
        
        CREATE TYPE greeting AS ENUM ('hello', 'howdy', 'hi', 'good day', 'morning');
        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;
        
        INSERT INTO seed DEFAULT VALUES;
        CREATE INDEX on seed (_int8, _float8, _date);
        CREATE INVERTED INDEX on seed (_jsonb);
        ;
    rsg_test.go:579: 
    rsg_test.go:580: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith845998435
--- FAIL: TestRandomSyntaxSQLSmith (300.63s)
Reproduce

To reproduce, try:

make stressrace TESTS=TestRandomSyntaxSQLSmith PKG=./pkg/sql/tests TESTTIMEOUT=5m STRESSFLAGS='-timeout 5m' 2>&1

Same failure on other branches

Internal log

mjibson marked as alumn{us/a}; resolving to rafiss instead

/cc @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 5c5bcf11bbc69161a9159eed027a00ced33f4c6e:

        CREATE TABLE table2 (col2_0 REGTYPE NULL, col2_1 TIMESTAMPTZ NOT NULL, col2_2 INT4, col2_3 GEOGRAPHY[], col2_4 TIMESTAMPTZ, col2_5 GEOMETRY NULL, col2_6 INT2, col2_7 TIME NULL, col2_8 TIMESTAMP NULL, col2_9 BOX2D, col2_10 REGTYPE, col2_11 STRING AS (lower(CAST(col2_9 AS STRING))) STORED, col2_12 INT2 NULL AS (col2_6 + col2_2) VIRTUAL, col2_13 INT2 AS (col2_6 + col2_2) VIRTUAL, col2_14 STRING NULL AS (CASE WHEN col2_4 IS NULL THEN e'{\x0e[':::STRING ELSE NULL END) VIRTUAL, col2_15 INT4 NOT NULL AS (col2_2 + col2_6) STORED, UNIQUE (col2_8, col2_14, col2_2, col2_11 DESC, col2_4) STORING (col2_0, col2_6, col2_9, col2_10, col2_15));
        CREATE TABLE table3 (col3_0 BOOL NULL, col3_1 FLOAT8 NOT NULL, col3_2 REGNAMESPACE NOT NULL, col3_3 BOX2D, col3_4 DECIMAL NOT NULL, col3_5 INT4 NOT NULL, col3_6 FLOAT8 NOT NULL, col3_7 GEOMETRY NOT NULL, col3_8 CHAR NULL, col3_9 BOOL NOT NULL, col3_10 REGNAMESPACE NOT NULL, col3_11 REGPROC NOT NULL, col3_12 TIMETZ, PRIMARY KEY (col3_2 ASC, col3_9 DESC, col3_5, col3_10 ASC), col3_13 STRING AS (lower(CAST(col3_9 AS STRING))) VIRTUAL, col3_14 INT4 NULL AS (col3_5 + (-1721950693):::INT8) VIRTUAL, col3_15 STRING AS (lower(CAST(col3_10 AS STRING))) STORED, col3_16 FLOAT8 NOT NULL AS (col3_6 + (-1.1632167818399708):::FLOAT8) STORED, col3_17 DECIMAL NOT NULL AS (col3_4 + 4856912152344181.651:::DECIMAL) VIRTUAL);
        CREATE TABLE table4 (col4_0 JSONB NULL, col4_1 BIT(29) NULL, INVERTED INDEX (col4_0), INVERTED INDEX (col4_1 DESC, col4_0), FAMILY (col4_1, col4_0));
        CREATE TABLE table5 (col5_0 REGNAMESPACE NOT NULL, col5_1 CHAR NOT NULL, col5_2 INT8 NOT NULL, col5_3 INTERVAL NOT NULL, col5_4 DATE, col5_5 TIMESTAMP NOT NULL, col5_6 "char" NULL, col5_7 UUID NOT NULL, PRIMARY KEY (col5_3 DESC, col5_2 DESC, col5_1, col5_5 ASC, col5_7 DESC), col5_8 STRING AS (lower(CAST(col5_4 AS STRING))) STORED, INDEX (col5_7 DESC, col5_4 DESC, col5_3 ASC, col5_1 DESC), INDEX (col5_0 ASC, col5_7 DESC, col5_4 ASC, col5_3 ASC, col5_6 DESC, col5_5, col5_8 ASC, col5_1 ASC, col5_2 ASC), UNIQUE (col5_5 ASC, col5_0 DESC, col5_6 ASC, col5_8, col5_1 DESC, col5_7, col5_4) WHERE (((((table5.col5_2 > 9223372036854775807:::INT8) OR (table5.col5_4 >= 'infinity':::DATE)) AND (table5.col5_8 != '':::STRING)) AND (table5.col5_6 < e'\'':::STRING)) OR (table5.col5_1 >= '':::STRING)) OR (table5.col5_5 != '-4713-11-24 00:00:00':::TIMESTAMP), INDEX (col5_8, col5_4, col5_3 DESC, col5_0, col5_6) WHERE ((((table5.col5_1 >= '"':::STRING) AND (table5.col5_4 <= '-infinity':::DATE)) OR (table5.col5_6 >= '"':::STRING)) OR (table5.col5_2 < 2147483647:::INT8)) AND (table5.col5_8 >= e'\'':::STRING));
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 932, "histo_col_type": "", "name": "__auto__", "null_count": 761, "row_count": 7000}, {"columns": ["col1_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1020, "histo_col_type": "", "name": "__auto__", "null_count": 3337, "row_count": 7000}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6215, "histo_buckets": [{"distinct_range": 0, "num_eq": 6863393619661141786, "num_range": 0, "upper_bound": "1971-01-06"}, {"distinct_range": 33626723.0208577, "num_eq": 700000, "num_range": 90000000, "upper_bound": "1971-04-18"}, {"distinct_range": 6357509666383018000, "num_eq": 4662910342326155427, "num_range": 6357509666383018115, "upper_bound": "1973-11-14"}, {"distinct_range": 0, "num_eq": 10000000, "num_range": 60, "upper_bound": "1986-10-25"}, {"distinct_range": 100000, "num_eq": 3000000000, "num_range": 100000, "upper_bound": "1993-08-10"}, {"distinct_range": 0, "num_eq": 30000000000, "num_range": 3121641079283908658, "upper_bound": "1993-10-25"}], "histo_col_type": "DATE", "name": "__auto__", "null_count": 6261, "row_count": 7000}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4230, "histo_buckets": [{"distinct_range": 0, "num_eq": 5898642106835609802, "num_range": 0, "upper_bound": "788894351"}, {"distinct_range": 0, "num_eq": 700, "num_range": 0, "upper_bound": "1771553689"}, {"distinct_range": 0, "num_eq": 7656969368981183138, "num_range": 3811382315555255855, "upper_bound": "2263871065"}], "histo_col_type": "OID", "name": "__auto__", "null_count": 6272, "row_count": 7000}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2548, "histo_col_type": "", "name": "__auto__", "null_count": 6828, "row_count": 7000}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4162, "histo_col_type": "", "name": "__auto__", "null_count": 4202, "row_count": 7000}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2049, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7000}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4239, "histo_col_type": "", "name": "__auto__", "null_count": 1507, "row_count": 7000}, {"columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3819, "histo_col_type": "", "name": "__auto__", "null_count": 2524, "row_count": 7000}, {"columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2101, "histo_col_type": "", "name": "__auto__", "null_count": 5827, "row_count": 7000}, {"columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5502, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7000}, {"columns": ["col1_18"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2889, "histo_buckets": [{"distinct_range": 0, "num_eq": 3437445579431875654, "num_range": 0, "upper_bound": "2\\u0019\\r7\\u001aB2"}, {"distinct_range": 0, "num_eq": 60000, "num_range": 3858947788699506379, "upper_bound": "a\\u000f%\\\\<U\\r:j"}, {"distinct_range": 120666.82609309065, "num_eq": 7337898405221803999, "num_range": 400000, "upper_bound": "q"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 7000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3944, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7000}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 570, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7000}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4042, "histo_col_type": "", "name": "__auto__", "null_count": 4537, "row_count": 7000}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5150, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7000}, {"columns": ["col1_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3273, "histo_col_type": "", "name": "__auto__", "null_count": 6914, "row_count": 7000}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2659, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7000}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5663, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7000}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6112840808183354273, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6778953083316358784}, {"columns": ["col2_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5212539639633499914, "histo_col_type": "", "name": "__auto__", "null_count": 2395974190201445919, "row_count": 6778953083316358784}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 41563435147537350, "histo_col_type": "", "name": "__auto__", "null_count": 3426221597319092620, "row_count": 6778953083316358784}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5951502855389194989, "histo_buckets": [{"distinct_range": 0, "num_eq": 2000000, "num_range": 0, "upper_bound": "1974-01-12 02:09:52.000625"}, {"distinct_range": 0, "num_eq": 2061894464989052258, "num_range": 8964369843982122798, "upper_bound": "1975-09-29 07:27:09.000805"}, {"distinct_range": 0, "num_eq": 4000000, "num_range": 8312255476291873521, "upper_bound": "1979-09-17 15:47:05.000815"}, {"distinct_range": 8.676331746549435, "num_eq": 6000000000, "num_range": 60, "upper_bound": "1997-02-04 21:49:28.00081"}, {"distinct_range": 0, "num_eq": 7687776457057643579, "num_range": 0, "upper_bound": "1999-05-16 13:09:25.000832"}, {"distinct_range": 0, "num_eq": 2000, "num_range": 3041345445876820407, "upper_bound": "2031-02-22 03:39:34.000094"}, {"distinct_range": 0, "num_eq": 3460471194636833734, "num_range": 1000, "upper_bound": "294276-12-31 23:59:59.999999"}], "histo_col_type": "TIMESTAMP", "name": "__auto__", "null_count": 4341532250576908582, "row_count": 6778953083316358784}, {"columns": ["col2_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4011120578555718600, "histo_col_type": "", "name": "__auto__", "null_count": 1116647851489707536, "row_count": 6778953083316358784}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5075268215437333401, "histo_col_type": "", "name": "__auto__", "null_count": 1553357430279488355, "row_count": 6778953083316358784}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4188914301860576770, "histo_col_type": "", "name": "__auto__", "null_count": 3629537217612513176, "row_count": 6778953083316358784}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3816956699791427234, "histo_col_type": "", "name": "__auto__", "null_count": 2290107035746077841, "row_count": 6778953083316358784}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5768979795904659910, "histo_col_type": "", "name": "__auto__", "null_count": 5156120410333860068, "row_count": 6778953083316358784}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5713545412564798109, "histo_col_type": "", "name": "__auto__", "null_count": 1635239079728499808, "row_count": 6778953083316358784}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1336277183297910573, "histo_col_type": "", "name": "__auto__", "null_count": 3279543164207659008, "row_count": 6778953083316358784}, {"columns": ["col2_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5960244237786507648, "histo_col_type": "", "name": "__auto__", "null_count": 1407272015471298665, "row_count": 6778953083316358784}, {"columns": ["col2_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2541162691491722266, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6778953083316358784}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3909319020266900656, "histo_col_type": "", "name": "__auto__", "null_count": 856051494617008340, "row_count": 6778953083316358784}, {"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2089443534478936752, "histo_col_type": "", "name": "__auto__", "null_count": 6075411400634681504, "row_count": 6778953083316358784}, {"columns": ["col2_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3948145506335909873, "histo_col_type": "", "name": "__auto__", "null_count": 5474207415673300519, "row_count": 6778953083316358784}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS '[{"columns": ["col3_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 67, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 104, "histo_col_type": "", "name": "__auto__", "null_count": 134, "row_count": 200}, {"columns": ["col3_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5, "histo_col_type": "", "name": "__auto__", "null_count": 178, "row_count": 200}, {"columns": ["col3_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 14, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 158, "histo_col_type": "", "name": "__auto__", "null_count": 60, "row_count": 200}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 46, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 107, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 47, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 108, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 193, "histo_col_type": "", "name": "__auto__", "null_count": 41, "row_count": 200}, {"columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 35, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 164, "histo_col_type": "", "name": "__auto__", "null_count": 85, "row_count": 200}, {"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 178, "histo_col_type": "REGNAMESPACE", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 102, "histo_col_type": "", "name": "__auto__", "null_count": 184, "row_count": 200}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 148, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 47, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}, {"columns": ["col3_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 113, "histo_col_type": "", "name": "__auto__", "null_count": 74, "row_count": 200}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 96, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 200}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS e'[{"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 471957326437980607, "histo_buckets": [{"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "\\\\x3700010b"}, {"distinct_range": 748953695705791900, "num_eq": 202718389210263739, "num_range": 5282748665325303999, "upper_bound": "\\\\x37000300010a"}, {"distinct_range": 1000000000, "num_eq": 3785927603654961999, "num_range": 1000000000, "upper_bound": "\\\\x37000300010b"}, {"distinct_range": 40000, "num_eq": 0, "num_range": 40000, "upper_bound": "\\\\x37000300011262617a0001"}, {"distinct_range": 4475440281490777600, "num_eq": 859018256042835730, "num_range": 6436611602849087053, "upper_bound": "\\\\x3700030001126a697a0001"}, {"distinct_range": 7631060943099228000, "num_eq": 2000000000, "num_range": 7631060943099227840, "upper_bound": "\\\\x370003000138"}, {"distinct_range": 0, "num_eq": 50, "num_range": 5360795661992244705, "upper_bound": "\\\\x370003000139"}, {"distinct_range": 4695742742109496000, "num_eq": 2063330014186769115, "num_range": 4695742742109495923, "upper_bound": "\\\\x370003000300010b"}, {"distinct_range": 10000000000, "num_eq": 8406587535399881452, "num_range": 10000000000, "upper_bound": "\\\\x3700030003000112595e516a29524d3c75440001"}, {"distinct_range": 2371285046706803700, "num_eq": 9000000000, "num_range": 6616135868373524591, "upper_bound": "\\\\x370003000300012a05133b2d09918d0c00"}, {"distinct_range": 200000, "num_eq": 1373055048602952476, "num_range": 200000, "upper_bound": "\\\\x3700030003000138"}, {"distinct_range": 13938358359033184, "num_eq": 800, "num_range": 951090129443126559, "upper_bound": "\\\\x3700030003000139"}, {"distinct_range": 8104597516000396000, "num_eq": 8840833386334909322, "num_range": 8104597516000396743, "upper_bound": "\\\\x37000300030003000138"}, {"distinct_range": 2470872207362217500, "num_eq": 3000000, "num_range": 2470872207362217672, "upper_bound": "\\\\x37000300030003000139"}, {"distinct_range": 3943892278818782700, "num_eq": 5431202686658779237, "num_range": 6449875721060038254, "upper_bound": "\\\\x3700030003000300030001126261720001"}, {"distinct_range": 246359361358901340, "num_eq": 5990862181440194745, "num_range": 841374751103983787, "upper_bound": "\\\\x370003000300030003000139"}, {"distinct_range": 1001356989058948000, "num_eq": 8052484044237344304, "num_range": 1001356989058947994, "upper_bound": "\\\\x3700030003213662277300024a6a5a6d2a224b74232720240002715678000139"}, {"distinct_range": 2000000000, "num_eq": 6000000, "num_range": 2000000000, "upper_bound": "\\\\x3700030003434c52344d000139"}, {"distinct_range": 0, "num_eq": 718921368190035316, "num_range": 9000000000, "upper_bound": "\\\\x3700030003514b4333000262617200012887fe4f592bb77dbfafa800"}, {"distinct_range": 1917848971808777500, "num_eq": 300000, "num_range": 5793327224325822636, "upper_bound": "\\\\x37000300036261720001127931700001"}, {"distinct_range": 32624817.788257744, "num_eq": 0, "num_range": 40000000, "upper_bound": "\\\\x3700030003626172000139"}, {"distinct_range": 1216505016115236600, "num_eq": 30, "num_range": 3600103176590718141, "upper_bound": "\\\\x370003000362617a000139"}, {"distinct_range": 45412855095530584, "num_eq": 392556500158412366, "num_range": 2299716163872319827, "upper_bound": "\\\\x37000300036300020003000100"}, {"distinct_range": 0, "num_eq": 2731811375678599260, "num_range": 60000000, "upper_bound": "\\\\x3700030003666f6f626172000139"}, {"distinct_range": 0, "num_eq": 191622640613600582, "num_range": 4671864472477670512, "upper_bound": "\\\\x370003666f6f000138"}, {"distinct_range": 0, "num_eq": 2661013053120509738, "num_range": 500000000, "upper_bound": "\\\\x3700036724613c575f6643205060000139"}, {"distinct_range": 0, "num_eq": 50000000000, "num_range": 4661718090102048940, "upper_bound": "\\\\x370003776f4e4c706c00022a4f6e5230230001295d7d7f3d9163c10e00"}, {"distinct_range": 3339649768319902000, "num_eq": 4568958426302377218, "num_range": 5840326850178185409, "upper_bound": "\\\\x37212d202f2a000200030003000138"}, {"distinct_range": 51885.38737709355, "num_eq": 6613818390998771445, "num_range": 70000, "upper_bound": "\\\\x372f373651436c327b564900010b"}, {"distinct_range": 0, "num_eq": 1000000000, "num_range": 7673619665191453315, "upper_bound": "\\\\x3762617200010b"}, {"distinct_range": 200000000, "num_eq": 20000, "num_range": 200000000, "upper_bound": "\\\\x37626172000138"}, {"distinct_range": 0, "num_eq": 7000, "num_range": 0, "upper_bound": "\\\\x3762617a0002000300010b"}, {"distinct_range": 2296107552639297800, "num_eq": 600000, "num_range": 2296107552639297688, "upper_bound": "\\\\x3762617a00020003000139"}, {"distinct_range": 0, "num_eq": 300000, "num_range": 4972394149850956701, "upper_bound": "\\\\x3762617a000200030003000100"}, {"distinct_range": 0, "num_eq": 1650771697687021516, "num_range": 90000, "upper_bound": "\\\\x3762617a000200030003000139"}, {"distinct_range": 0, "num_eq": 6000000, "num_range": 5926488650957217495, "upper_bound": "\\\\x3763000139"}, {"distinct_range": 7000, "num_eq": 100, "num_range": 7000, "upper_bound": "\\\\x37666f6f626172000138"}, {"distinct_range": 500000, "num_eq": 60000000, "num_range": 500000, "upper_bound": "\\\\x37666f6f626172000262000139"}, {"distinct_range": 397304773132411840, "num_eq": 3403627167174024189, "num_range": 884443053887559471, "upper_bound": "\\\\x37666f6f626172000262617a00010a"}, {"distinct_range": 0, "num_eq": 20, "num_range": 2000000000, "upper_bound": "\\\\x37666f6f62617200026f764b215d510002375474713b442b7055356c000100"}, {"distinct_range": 1574308535704942800, "num_eq": 6426439133563049389, "num_range": 4623011280921181519, "upper_bound": "\\\\x37666f6f62617200026f764b215d5100024d4c75000262617a000139"}, {"distinct_range": 139702771147797260, "num_eq": 1000000, "num_range": 139702771147797264, "upper_bound": "\\\\x37666f6f62617200026f764b215d5100024d4c7500027c51695a2963413b6872000139"}, {"distinct_range": 0, "num_eq": 1097024290240645737, "num_range": 1000, "upper_bound": "\\\\x37666f6f62617200026f764b215d510002620001292ba97d13217b655f7800"}, {"distinct_range": 1116344290683374800, "num_eq": 6929848600246892650, "num_range": 7390336006464434380, "upper_bound": "\\\\x3772404e00010a"}, {"distinct_range": 6250484318273010000, "num_eq": 4036289864341889407, "num_range": 6250484318273009727, "upper_bound": "\\\\x377d7c4b326a4751452d6077000262617a0002222e6f000100"}, {"distinct_range": 5218.955675966379, "num_eq": 9020302801073673340, "num_range": 6000, "upper_bound": "\\\\x377d7c4b326a4751452d60770002630002610002426f47357523000139"}, {"distinct_range": 800, "num_eq": 60000000000, "num_range": 800, "upper_bound": "\\\\x377d7c4b326a4751452d6077000263000261000262000138"}, {"distinct_range": 150605416351481280, "num_eq": 30000, "num_range": 5675413113135728254, "upper_bound": "\\\\x377d7c4b326a4751452d60770002666f6f00020003000139"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 854784298775499228, "row_count": 3930464602629068170}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3415507210940007805, "histo_col_type": "", "name": "__auto__", "null_count": 3686446968941095504, "row_count": 3930464602629068170}]':::JSONB;
        ALTER TABLE table5 INJECT STATISTICS '[{"columns": ["col5_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3066614286112566605, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5818324904520525160}, {"columns": ["col5_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5019242224512794363, "histo_col_type": "", "name": "__auto__", "null_count": 1976945954525571835, "row_count": 5818324904520525160}, {"columns": ["col5_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 205593335447484781, "histo_buckets": [{"distinct_range": 0, "num_eq": 70, "num_range": 0, "upper_bound": "edcdbb20-b42d-4fb8-b5e0-681964c66306"}], "histo_col_type": "UUID", "name": "__auto__", "null_count": 0, "row_count": 5818324904520525160}, {"columns": ["col5_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1130210807018677148, "histo_col_type": "", "name": "__auto__", "null_count": 5408390033663795637, "row_count": 5818324904520525160}, {"columns": ["col5_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3462228628101159989, "histo_col_type": "TIMESTAMP", "name": "__auto__", "null_count": 0, "row_count": 5818324904520525160}, {"columns": ["col5_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 697464890202659884, "histo_buckets": [{"distinct_range": 0, "num_eq": 30, "num_range": 0, "upper_bound": "512710824"}, {"distinct_range": 219389.045473049, "num_eq": 10000000, "num_range": 5000000, "upper_bound": "556988777"}, {"distinct_range": 0, "num_eq": 60000000000, "num_range": 10000000000, "upper_bound": "645543628"}, {"distinct_range": 8363220536896891000, "num_eq": 8000000000, "num_range": 8363220536896890579, "upper_bound": "1244915770"}, {"distinct_range": 2471419892848807400, "num_eq": 5000000, "num_range": 2471419892848807542, "upper_bound": "1611120016"}, {"distinct_range": 0, "num_eq": 90000000000, "num_range": 40000000, "upper_bound": "1713612757"}, {"distinct_range": 3624628391976304000, "num_eq": 7070364868569150066, "num_range": 3624628391976304249, "upper_bound": "2247693178"}, {"distinct_range": 812682659927945100, "num_eq": 2587444601997538998, "num_range": 4311563291427571070, "upper_bound": "3100787989"}, {"distinct_range": 20000000000, "num_eq": 747583079031309275, "num_range": 20000000000, "upper_bound": "3313235984"}], "histo_col_type": "REGNAMESPACE", "name": "__auto__", "null_count": 0, "row_count": 5818324904520525160}, {"columns": ["col5_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5176617721566539467, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5818324904520525160}, {"columns": ["col5_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4822962382271049246, "histo_buckets": [{"distinct_range": 0, "num_eq": 80000, "num_range": 0, "upper_bound": "-61 years -10 mons -618 days -16:02:44.627018"}, {"distinct_range": 0, "num_eq": 10000000000, "num_range": 0, "upper_bound": "-49 years -1 mons -935 days -13:05:05.232487"}, {"distinct_range": 1806314009654413800, "num_eq": 2684448260522284212, "num_range": 1806314009654413911, "upper_bound": "00:00:00"}, {"distinct_range": 0, "num_eq": 0, "num_range": 600000000, "upper_bound": "1 day"}, {"distinct_range": 0, "num_eq": 0, "num_range": 30000000000, "upper_bound": "11 years 8 mons 625 days 05:07:32.881854"}, {"distinct_range": 0, "num_eq": 100000000000, "num_range": 0, "upper_bound": "20 years 2 mons 251 days 09:03:19.13327"}, {"distinct_range": 0, "num_eq": 100000, "num_range": 70, "upper_bound": "41 years 6 mons 883 days 23:15:09.786384"}, {"distinct_range": 90000000000, "num_eq": 3820142337568298114, "num_range": 90000000000, "upper_bound": "55 years 9 mons 745 days 16:01:51.451747"}, {"distinct_range": 0, "num_eq": 7000000000, "num_range": 30000000000, "upper_bound": "79 years 2 mons 183 days 21:16:41.5531"}], "histo_col_type": "INTERVAL", "name": "__auto__", "null_count": 0, "row_count": 5818324904520525160}, {"columns": ["col5_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2692072252111082272, "histo_col_type": "", "name": "__auto__", "null_count": 3682641659177408244, "row_count": 5818324904520525160}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('yjlo', 'ny', 'mf', 'expsak');
        CREATE TYPE rand_typ_1 AS ENUM ('oxew', 'khpxy', 'fx', 'wj');
        CREATE TYPE rand_typ_2 AS ENUM ('zdt', 'gwbv', 'fba');
        CREATE TYPE rand_typ_3 AS ENUM ('hd', 'mftnpg', 'd');
        CREATE TYPE rand_typ_4 AS ENUM ('qo', 'idh', 'ddoems', 'o', 'l');
        ;
    rsg_test.go:577: 
        SET CLUSTER SETTING sql.defaults.drop_enum_value.enabled = true;
        SET enable_drop_enum_value = true;
        
        CREATE TYPE greeting AS ENUM ('hello', 'howdy', 'hi', 'good day', 'morning');
        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;
        
        INSERT INTO seed DEFAULT VALUES;
        CREATE INDEX on seed (_int8, _float8, _date);
        CREATE INVERTED INDEX on seed (_jsonb);
        ;
    rsg_test.go:579: 
    rsg_test.go:580: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith350265276
--- FAIL: TestRandomSyntaxSQLSmith (300.69s)
Reproduce

To reproduce, try:

make stressrace TESTS=TestRandomSyntaxSQLSmith PKG=./pkg/sql/tests TESTTIMEOUT=5m STRESSFLAGS='-timeout 5m' 2>&1

Same failure on other branches

Internal log

mjibson marked as alumn{us/a}; resolving to rafiss instead

/cc @rafiss

This test on roachdash | Improve this report!

@rafiss rafiss assigned rafiss and unassigned tbg and rafiss Apr 29, 2021
@rafiss
Copy link
Collaborator

rafiss commented Apr 29, 2021

maybe the same as #63794 which @mgartner is backporting a fix (#64348)

@mgartner
Copy link
Collaborator

I see some failures related to #63794 like:

        caused by: server panic: pq: internal error: ordering column group (1,5) contains non-equivalent columns (op values)

But I also see unrelated failures:

    rsg_test.go:186: SELECT 1 executed successfully: probably a slow statement
    rsg_test.go:755: Crash detected: 
        ALTER TABLE ident.ident ADD COLUMN ident VARBIT ( 3 ) ARRAY [ 249 ]
        
        Stack trace:
        timeout: "ALTER TABLE ident.ident ADD COLUMN ident VARBIT ( 3 ) ARRAY [ 249 ]". currently executing: map[ALTER TABLE ident.ident ADD COLUMN ident VARBIT ( 3 ) ARRAY [ 249 ]:1 ALTER TABLE ident.ident ALTER CHARACTERISTICS DROP NOT NULL:1 ALTER TABLE ident.ident ALTER COLUMN INT DROP NOT NULL:1 ALTER TABLE ident.ident ALTER ident DROP NOT NULL:1 ALTER TABLE ident.ident ALTER ident SET NOT NULL:1 ALTER TABLE ident.ident DROP COLUMN INTEGER RESTRICT:1 ALTER TABLE ident.ident DROP DECLARE:1 ALTER TABLE ident.ident DROP ident CASCADE:1]

But I'm guessing that "probably a slow statement" means that this didn't cause the report. Is that correct?

@rafiss
Copy link
Collaborator

rafiss commented Apr 30, 2021

@mgartner that's right -- actually that log is from a different test (#63944) but all the logs end up in full_output.txt

@mgartner
Copy link
Collaborator

Ok. Closing this as a duplicate of #63794.

@rafiss
Copy link
Collaborator

rafiss commented Apr 30, 2021

Thanks! I think another issue might get auto-created since these tests run nightly and I see that those backports won't go in until after 21.1.0 is created.

@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot.
Projects
Archived in project
Development

No branches or pull requests

4 participants