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 #64592

Closed
cockroach-teamcity opened this issue May 3, 2021 · 24 comments
Closed

sql/tests: TestRandomSyntaxSQLSmith failed #64592

cockroach-teamcity opened this issue May 3, 2021 · 24 comments
Assignees
Labels
C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

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

    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 FLOAT8 NOT NULL, col1_1 BIT(24) NOT NULL, col1_2 REGNAMESPACE, PRIMARY KEY (col1_1 ASC, col1_0 ASC), col1_3 FLOAT8 NOT NULL AS (col1_0 + (-0.8447994200332785):::FLOAT8) VIRTUAL, INDEX (col1_3 ASC, col1_2, col1_1 DESC), FAMILY (col1_2, col1_0, col1_1));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 346, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 92, "histo_col_type": "", "name": "__auto__", "null_count": 172, "row_count": 500}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 68, "histo_buckets": [{"distinct_range": 0, "num_eq": 90000000, "num_range": 0, "upper_bound": "-0.30958886325040097"}, {"distinct_range": 63827489081.63343, "num_eq": 10, "num_range": 90000000000, "upper_bound": "-0.12023346864720708"}, {"distinct_range": 0, "num_eq": 0, "num_range": 90000000, "upper_bound": "-0.0033372841521017715"}, {"distinct_range": 10000000000, "num_eq": 7665243218565992837, "num_range": 10000000000, "upper_bound": "0.18460061949766904"}, {"distinct_range": 507334214608154300, "num_eq": 400000, "num_range": 507334214608154281, "upper_bound": "0.48217359015935757"}, {"distinct_range": 0, "num_eq": 8809704081348370070, "num_range": 1959486150583998733, "upper_bound": "0.5175615306009307"}, {"distinct_range": 0, "num_eq": 0, "num_range": 4340610631061397674, "upper_bound": "1.2573587523732055"}, {"distinct_range": 152.03810695254742, "num_eq": 30000, "num_range": 1000, "upper_bound": "3.4028234663852886e+38"}], "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 0, "row_count": 500}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 271, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('rovo', 'mfell');
        CREATE TYPE rand_typ_1 AS ENUM ('gqb', 'u', 'op');
        CREATE TYPE rand_typ_2 AS ENUM ('xll', 'bw', 'cqmcvu', 'he', 'bacg');
        CREATE TYPE rand_typ_3 AS ENUM ('wa', 'jabkji', 'h', 'kakmfq');
        ;
    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/logTestRandomSyntaxSQLSmith287696541
--- FAIL: TestRandomSyntaxSQLSmith (302.16s)
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 cockroach-teamcity added branch-release-21.1 C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. labels May 3, 2021
@cockroach-teamcity cockroach-teamcity added this to the 21.1 milestone May 3, 2021
@cockroach-teamcity
Copy link
Member Author

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

        
        		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 STRING NOT NULL, col1_1 DECIMAL NOT NULL, col1_2 BIT(32), col1_3 BYTES NOT NULL, col1_4 GEOMETRY NOT NULL, col1_5 VARCHAR NOT NULL, col1_6 FLOAT4 NOT NULL, col1_7 STRING NOT NULL, col1_8 TIMESTAMPTZ NOT NULL, col1_9 STRING AS (lower(col1_5)) VIRTUAL, INDEX (col1_1, col1_8 DESC, col1_3, col1_6) WHERE ((((((table1.col1_7 != e'\'':::STRING) OR (table1.col1_3 = '\x27':::BYTES)) AND (table1.col1_9 != 'X':::STRING)) OR (table1.col1_0 <= '':::STRING)) AND (table1.col1_1 >= (-1):::DECIMAL)) OR (table1.col1_6 <= '-Inf':::FLOAT8)) OR (table1.col1_8 < '-4713-11-24 00:00:00+00:00':::TIMESTAMPTZ), UNIQUE (col1_7 ASC, col1_9 DESC) STORING (col1_0, col1_4, col1_5), FAMILY (col1_5), FAMILY (col1_2, col1_7, col1_1, col1_0), FAMILY (col1_3), FAMILY (col1_4), FAMILY (col1_8, col1_6));
        CREATE TABLE table2 (col2_0 BOOL, col2_1 DATE NULL, col2_2 REGTYPE NOT NULL, col2_3 GEOGRAPHY NULL, col2_4 BOX2D NOT NULL, col2_5 INT4 NULL, col2_6 TIMETZ, col2_7 STRING NULL AS (lower(CAST(col2_2 AS STRING))) VIRTUAL, col2_8 STRING AS (lower(CAST(col2_3 AS STRING))) VIRTUAL, col2_9 STRING AS (lower(CAST(col2_3 AS STRING))) VIRTUAL, UNIQUE (col2_5 ASC, col2_0 ASC, col2_6 ASC, col2_2 ASC, col2_4 ASC, col2_9 ASC) STORING (col2_3) WHERE ((((((table2.col2_8 <= '':::STRING) AND (table2.col2_9 = 'X':::STRING)) AND (table2.col2_1 < 'infinity':::DATE)) AND (table2.col2_5 <= (-1):::INT8)) OR (table2.col2_7 > e'\'':::STRING)) AND table2.col2_0) AND (table2.col2_6 <= '00:00:00+15:59:00':::TIMETZ));
        CREATE TABLE table3 (col3_0 INT4 NULL, col3_1 BYTES NOT NULL, col3_2 GEOMETRY, col3_3 STRING NULL, col3_4 FLOAT8 NOT NULL, col3_5 FLOAT4 NOT NULL, col3_6 VARCHAR, col3_7 "char" NULL, col3_8 TIMESTAMPTZ NOT NULL, col3_9 TIME NOT NULL, col3_10 INT8 NOT NULL, col3_11 BOOL NOT NULL, col3_12 INT8 NOT NULL AS (col3_10 + col3_0) VIRTUAL, col3_13 INT4 NOT NULL AS (col3_0 + col3_10) STORED, col3_14 FLOAT8 NULL AS (col3_4 + col3_5) VIRTUAL, col3_15 INT4 AS (col3_0 + col3_10) VIRTUAL, col3_16 INT4 NULL AS (col3_0 + col3_10) STORED, col3_17 FLOAT8 AS (col3_4 + col3_5) VIRTUAL, col3_18 INT8 AS (col3_10 + (-8415071541052565352):::INT8) VIRTUAL, INDEX (col3_11 ASC, col3_12 DESC, col3_18, col3_15 ASC, col3_17, col3_0) WHERE (((((((((((((((((table3.col3_6 > e'\U00002603':::STRING) OR (table3.col3_14 >= 'NaN':::FLOAT8)) AND (table3.col3_0 <= 2147483647:::INT8)) OR (table3.col3_7 != '':::STRING)) AND (table3.col3_10 <= (-32768):::INT8)) OR (table3.col3_17 >= 5e-324:::FLOAT8)) OR table3.col3_11) AND (table3.col3_13 < 0:::INT8)) AND (table3.col3_12 >= 32767:::INT8)) OR (table3.col3_16 > (-2147483648):::INT8)) OR (table3.col3_3 != '"':::STRING)) OR (table3.col3_4 != '-Inf':::FLOAT8)) AND (table3.col3_8 != '-4713-11-24 00:00:00+00:00':::TIMESTAMPTZ)) OR (table3.col3_5 > '+Inf':::FLOAT8)) OR (table3.col3_1 >= '\xe29883':::BYTES)) AND (table3.col3_18 >= 32767:::INT8)) AND (table3.col3_9 <= '00:00:00':::TIME)) AND (table3.col3_15 > 2147483647:::INT8), INDEX (col3_1 ASC, col3_9 DESC, col3_4 DESC, col3_10 DESC), INDEX (col3_15 ASC, col3_13, col3_12 ASC, col3_14, col3_4 DESC, col3_7 ASC, col3_16 DESC, col3_5, col3_8 ASC, col3_9, col3_0 DESC, col3_1 ASC, col3_10 ASC, col3_18 ASC, col3_3, col3_11 DESC) STORING (col3_2), INDEX (col3_4, col3_15, col3_10), FAMILY (col3_8, col3_0, col3_1), FAMILY (col3_10), FAMILY (col3_4, col3_16, col3_9, col3_7, col3_5), FAMILY (col3_13, col3_6, col3_2), FAMILY (col3_11), FAMILY (col3_3));
        CREATE TABLE table4 (col4_0 INET NULL, col4_1 REGCLASS, col4_2 DECIMAL NULL, col4_3 INT2 NOT NULL, col4_4 REGCLASS, col4_5 INT8, col4_6 TIMESTAMP NULL, col4_7 REGPROCEDURE, col4_8 UUID NOT NULL, col4_9 REGNAMESPACE NULL, col4_10 GEOGRAPHY, col4_11 REGTYPE NULL, col4_12 STRING AS (lower(CAST(col4_11 AS STRING))) VIRTUAL, UNIQUE (col4_5), UNIQUE (col4_7 ASC, col4_8, col4_5) WHERE ((((table4.col4_3 <= 127:::INT8) AND (table4.col4_12 >= '"':::STRING)) OR (table4.col4_5 <= (-1):::INT8)) OR (table4.col4_6 > '-4713-11-24 00:00:00':::TIMESTAMP)) OR (table4.col4_2 < '-Infinity':::DECIMAL), INDEX (col4_3 DESC, col4_8 DESC, col4_2 DESC, col4_7 ASC, col4_5), INDEX (col4_1 DESC, col4_6 DESC, col4_5 DESC, col4_12 DESC, col4_9 DESC, col4_2 ASC, col4_3 ASC) WHERE ((((table4.col4_2 > (-1.234E+401):::DECIMAL) AND (table4.col4_3 < (-1):::INT8)) OR (table4.col4_12 < e'\x00':::STRING)) OR (table4.col4_5 >= (-32768):::INT8)) OR (table4.col4_6 <= '-2000-01-01 00:00:00':::TIMESTAMP), FAMILY (col4_4), FAMILY (col4_10), FAMILY (col4_0), FAMILY (col4_1), FAMILY (col4_9), FAMILY (col4_8), FAMILY (col4_2, col4_3), FAMILY (col4_11), FAMILY (col4_7, col4_6, col4_5));
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5274, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5123, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7795, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2196, "histo_buckets": [{"distinct_range": 0, "num_eq": 1000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 0, "num_eq": 6372326397117828356, "num_range": 5000, "upper_bound": "\\u0012\\u0004LH"}, {"distinct_range": 8000, "num_eq": 7355699373976612445, "num_range": 8000, "upper_bound": "I\\u00052}X u\\u0007+"}, {"distinct_range": 617672615850223000, "num_eq": 0, "num_range": 2530690853872337896, "upper_bound": "sC\\u0010\\u001b\'|\\u001d["}, {"distinct_range": 0, "num_eq": 700, "num_range": 60000, "upper_bound": "u,\\r2\\u000ci^4L"}, {"distinct_range": 4291343161889455000, "num_eq": 90, "num_range": 4291343161889454878, "upper_bound": "~\\"\\u0019,"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4374, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2023, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6178, "histo_buckets": [{"distinct_range": 0, "num_eq": 50000000000, "num_range": 0, "upper_bound": "-4.944181146807383673E+33"}, {"distinct_range": 0, "num_eq": 810456799369835354, "num_range": 500, "upper_bound": "-1.975937174749330891E+24"}, {"distinct_range": 40000, "num_eq": 800, "num_range": 40000, "upper_bound": "-8.07082093229885096E+21"}, {"distinct_range": 5658346092399462000, "num_eq": 1000000000, "num_range": 5658346092399462199, "upper_bound": "-2386742937156722337"}, {"distinct_range": 1464347184.2460895, "num_eq": 4148729644244318745, "num_range": 4000000000, "upper_bound": "102224586224.9950334"}, {"distinct_range": 400000000, "num_eq": 500000, "num_range": 400000000, "upper_bound": "4.609333692726926132E+20"}, {"distinct_range": 4350246011722958300, "num_eq": 5879783685539358738, "num_range": 4350246011722958233, "upper_bound": "5.435183526879477602E+25"}, {"distinct_range": 29324545847.169136, "num_eq": 60000, "num_range": 30000000000, "upper_bound": "6.086576797080463297E+28"}, {"distinct_range": 50000, "num_eq": 1000000000, "num_range": 50000, "upper_bound": "8.068575216314610901E+29"}], "histo_col_type": "DECIMAL", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4843, "histo_col_type": "", "name": "__auto__", "null_count": 5863, "row_count": 8000}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5300, "histo_col_type": "", "name": "__auto__", "null_count": 3213, "row_count": 8000}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5484, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8000}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1237634984694133309, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7372518804261605997}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2055100835967495642, "histo_col_type": "", "name": "__auto__", "null_count": 6575208230051627201, "row_count": 7372518804261605997}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6317166713914625199, "histo_col_type": "", "name": "__auto__", "null_count": 460303504057832870, "row_count": 7372518804261605997}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1896240394982874454, "histo_col_type": "", "name": "__auto__", "null_count": 6452645246534727405, "row_count": 7372518804261605997}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5304830740973540749, "histo_col_type": "", "name": "__auto__", "null_count": 600233473413439463, "row_count": 7372518804261605997}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 561774766286382898, "histo_col_type": "", "name": "__auto__", "null_count": 1746276918372769604, "row_count": 7372518804261605997}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4069199559784646319, "histo_col_type": "", "name": "__auto__", "null_count": 6829221641170362471, "row_count": 7372518804261605997}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1780918133239378305, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7372518804261605997}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 226783541891155362, "histo_buckets": [{"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "-1561120586"}, {"distinct_range": 0, "num_eq": 40000000000, "num_range": 1941869620071909278, "upper_bound": "-19002381"}, {"distinct_range": 2986.8359527071757, "num_eq": 3000000, "num_range": 3000, "upper_bound": "819874621"}], "histo_col_type": "INT4", "name": "__auto__", "null_count": 6533019471584021823, "row_count": 7372518804261605997}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2989958187459248561, "histo_col_type": "", "name": "__auto__", "null_count": 4596045685373275296, "row_count": 7372518804261605997}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS e'[{"columns": ["col3_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 9, "histo_col_type": "", "name": "__auto__", "null_count": 4, "row_count": 10}, {"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8, "histo_col_type": "", "name": "__auto__", "null_count": 2, "row_count": 10}, {"columns": ["col3_5"], "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": ["col3_10"], "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": ["col3_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2, "histo_buckets": [{"distinct_range": 0, "num_eq": 2191692936482050865, "num_range": 0, "upper_bound": "false"}, {"distinct_range": 0, "num_eq": 3537161008806296816, "num_range": 1562708513518886981, "upper_bound": "true"}], "histo_col_type": "BOOL", "name": "__auto__", "null_count": 0, "row_count": 10}, {"columns": ["col3_18"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 9, "histo_col_type": "", "name": "__auto__", "null_count": 2, "row_count": 10}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6, "histo_buckets": [{"distinct_range": 0, "num_eq": 7000, "num_range": 0, "upper_bound": "\\\\x6e3d8f38de03"}, {"distinct_range": 0, "num_eq": 4772720205630828127, "num_range": 2000000000, "upper_bound": "\\\\x82e904be8e"}, {"distinct_range": 3202343061.5724883, "num_eq": 90000, "num_range": 5000000000, "upper_bound": "\\\\xb6a0b9"}, {"distinct_range": 6704738736830848000, "num_eq": 50000000, "num_range": 6704738736830847756, "upper_bound": "\\\\xba389062db86"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 10}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2, "histo_col_type": "", "name": "__auto__", "null_count": 8, "row_count": 10}, {"columns": ["col3_13"], "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": ["col3_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1, "histo_col_type": "", "name": "__auto__", "null_count": 9, "row_count": 10}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8, "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 0, "row_count": 10}, {"columns": ["col3_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10}, {"columns": ["col3_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3, "histo_col_type": "", "name": "__auto__", "null_count": 7, "row_count": 10}, {"columns": ["col3_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 9, "histo_buckets": [{"distinct_range": 0, "num_eq": 600000000, "num_range": 0, "upper_bound": "-1475193986"}, {"distinct_range": 8036873997732281000, "num_eq": 7093523346653956204, "num_range": 8036873997732281451, "upper_bound": "-178590276"}, {"distinct_range": 0, "num_eq": 3655718348242559001, "num_range": 6000000, "upper_bound": "-174649980"}, {"distinct_range": 709.5040738630049, "num_eq": 8623786052770090528, "num_range": 900, "upper_bound": "-32768"}, {"distinct_range": 40.522482367714446, "num_eq": 1636234740964363508, "num_range": 80, "upper_bound": "218391660"}, {"distinct_range": 3710101.9922145545, "num_eq": 7612548877377928023, "num_range": 30000000, "upper_bound": "1326666330"}], "histo_col_type": "INT4", "name": "__auto__", "null_count": 2, "row_count": 10}, {"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5, "histo_col_type": "", "name": "__auto__", "null_count": 6, "row_count": 10}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3, "histo_col_type": "", "name": "__auto__", "null_count": 4, "row_count": 10}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS '[{"columns": ["col4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1231620379367848232, "histo_buckets": [{"distinct_range": 0, "num_eq": 60000000000, "num_range": 0, "upper_bound": "335075952"}, {"distinct_range": 0, "num_eq": 7707623912434523254, "num_range": 10000000, "upper_bound": "1486955444"}, {"distinct_range": 2037389342230115600, "num_eq": 4000000000, "num_range": 4311677720857543727, "upper_bound": "2707241736"}], "histo_col_type": "REGPROCEDURE", "name": "__auto__", "null_count": 2560494271979108394, "row_count": 2767267656001687035}, {"columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 726505508543425775, "histo_col_type": "", "name": "__auto__", "null_count": 1455466114352914170, "row_count": 2767267656001687035}, {"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2661025033452171495, "histo_col_type": "", "name": "__auto__", "null_count": 1860545611041084869, "row_count": 2767267656001687035}, {"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1038416781625895996, "histo_col_type": "", "name": "__auto__", "null_count": 1015193582383888757, "row_count": 2767267656001687035}, {"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4742244834262845, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2767267656001687035}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 248620640118357703, "histo_col_type": "", "name": "__auto__", "null_count": 1622224862561966491, "row_count": 2767267656001687035}, {"columns": ["col4_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1263966773035725534, "histo_buckets": [{"distinct_range": 0, "num_eq": 300, "num_range": 0, "upper_bound": "-6712673250001161489"}, {"distinct_range": 30, "num_eq": 70, "num_range": 30, "upper_bound": "-6701268577914243994"}, {"distinct_range": 238681210.2716823, "num_eq": 4059736827647950420, "num_range": 300000000, "upper_bound": "-6341683738105850950"}, {"distinct_range": 7499091783203240000, "num_eq": 900, "num_range": 7499091783203240196, "upper_bound": "-3401154650863060645"}, {"distinct_range": 6068597612353404000, "num_eq": 531031674463430354, "num_range": 7376631089392114628, "upper_bound": "-1827847070178816357"}, {"distinct_range": 78844.11821111146, "num_eq": 300, "num_range": 80000, "upper_bound": "4193470093081739281"}, {"distinct_range": 1.4018562408173545, "num_eq": 70000, "num_range": 70, "upper_bound": "4379386705561413032"}, {"distinct_range": 536571007.25268024, "num_eq": 70000000000, "num_range": 600000000, "upper_bound": "7723134447233571690"}], "histo_col_type": "INT8", "name": "__auto__", "null_count": 1691977826169501610, "row_count": 2767267656001687035}, {"columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1546423336293460509, "histo_col_type": "", "name": "__auto__", "null_count": 1607867812795520685, "row_count": 2767267656001687035}, {"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 566216018113712385, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2767267656001687035}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 433104394984475933, "histo_col_type": "", "name": "__auto__", "null_count": 1678535417243568306, "row_count": 2767267656001687035}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1325753124649564895, "histo_buckets": [{"distinct_range": 0, "num_eq": 20000000000, "num_range": 0, "upper_bound": "1331600422"}], "histo_col_type": "REGCLASS", "name": "__auto__", "null_count": 1894075385289127938, "row_count": 2767267656001687035}, {"columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1829048327073907965, "histo_col_type": "", "name": "__auto__", "null_count": 726431685578295945, "row_count": 2767267656001687035}, {"columns": ["col4_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 666109587288634241, "histo_col_type": "", "name": "__auto__", "null_count": 757144349589933867, "row_count": 2767267656001687035}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('ftzw', 'wpp');
        CREATE TYPE rand_typ_1 AS ENUM ('pq', 'ehb', 'a', 'pruvh', 'b', 'gcjvy');
        ;
    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/logTestRandomSyntaxSQLSmith011786452
--- FAIL: TestRandomSyntaxSQLSmith (300.70s)
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 @ aedf03967e1d9179943f403567433c9c1c6d6f23:

        							)
        						),
        						(e'\x18!':::STRING)
        				)
        					AS tab_667714 (col_1438916)
        			INTERSECT
        				SELECT
        					*
        				FROM
        					(
        						VALUES
        							(e'\n}&0&dT':::STRING),
        							(e'9";\t':::STRING),
        							(NULL),
        							(e'\x05P)F\x12NM':::STRING),
        							(e'{z)%S|\x1b\x10':::STRING),
        							(']':::STRING)
        					)
        						AS tab_667715 (col_1438917)
        		)
        SELECT
        	1073093907:::OID AS col_1438918,
        	3375417371:::OID AS col_1438919,
        	tab_667719.crdb_internal_mvcc_timestamp AS col_1438920
        FROM
        	with_272552 AS cte_ref_79472,
        	defaultdb.public.table1@[0] AS tab_667716
        	JOIN defaultdb.public.table1@[0] AS tab_667717
        		JOIN defaultdb.public.table1@table1_col1_0_key AS tab_667718 ON
        				(tab_667717.tableoid) = (tab_667718.tableoid) AND (tab_667717.col1_0) = (tab_667718.col1_0)
        		JOIN defaultdb.public.table1@primary AS tab_667719 ON
        				(tab_667717.tableoid) = (tab_667719.tableoid)
        				AND (tab_667718.col1_1) = (tab_667719.col1_1)
        				AND (tab_667718.tableoid) = (tab_667719.col1_1)
        				AND (tab_667717.tableoid) = (tab_667719.col1_1)
        				AND (tab_667718.tableoid) = (tab_667719.tableoid) ON
        			(tab_667716.crdb_internal_mvcc_timestamp) = (tab_667719.crdb_internal_mvcc_timestamp)
        WHERE
        	(tab_667716.col1_0 OR tab_667717.col1_0)
        ORDER BY
        	tab_667717.tableoid ASC
        LIMIT
        	5:::INT8;
    rsg_test.go:731: 5m2s of 5m0s: 319884 executions, 281670 successful
    rsg_test.go:731: 5m7s of 5m0s: 319884 executions, 281670 successful
    rsg_test.go:731: 5m12s of 5m0s: 319884 executions, 281670 successful
    rsg_test.go:731: 5m17s of 5m0s: 319884 executions, 281670 successful
    rsg_test.go:731: 5m22s of 5m0s: 319884 executions, 281670 successful
    rsg_test.go:731: 5m27s of 5m0s: 319884 executions, 281670 successful
    rsg_test.go:731: 5m32s of 5m0s: 319884 executions, 281670 successful
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 @ 3bf34abe95cf99091c7ddea2eb767cdf0a297bd8:

    rsg_test.go:764: 337263 executions, 328843 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, INVERTED INDEX (col1_0 DESC), INVERTED INDEX (col1_0 DESC), INVERTED INDEX (col1_0 ASC), INVERTED INDEX (col1_0), INVERTED INDEX (col1_0 DESC), INVERTED INDEX (col1_0 DESC));
        CREATE TABLE table2 (col2_0 CHAR NULL, col2_1 BIT(39) NOT NULL, col2_2 "char" NOT NULL, col2_3 STRING NULL, col2_4 VARCHAR NOT NULL, PRIMARY KEY (col2_2, col2_1 DESC, col2_4), col2_5 STRING NULL AS (lower(CAST(col2_1 AS STRING))) VIRTUAL, col2_6 STRING AS (lower(col2_4)) VIRTUAL, INDEX (col2_4, col2_1 DESC, col2_6, col2_3), FAMILY (col2_3, col2_1, col2_2), FAMILY (col2_0), FAMILY (col2_4));
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4698553737889645958, "histo_buckets": [{"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "\\\\x42fd0c0000000000000000bfea73907b36dff83fc594ace0aebe083fc98eb67838bfc53fdf10f8519ff0a6"}, {"distinct_range": 4371256079446760000, "num_eq": 0, "num_range": 7710390551016849464, "upper_bound": "\\\\x42fd100000000000000000c005b5117f2b26b0bff8714e4894bd9d3ffe87afaf541c563ff7e856edeea0c4"}, {"distinct_range": 10000000000, "num_eq": 1692877890815146976, "num_range": 10000000000, "upper_bound": "\\\\x42fd100000000000000000c008dbac4cf04785bff8763e8c4a77804008224e7c8aeed03ff81720d2a111d0"}, {"distinct_range": 36946711.554181576, "num_eq": 0, "num_range": 80000000, "upper_bound": "\\\\x42fd100000000000000000c00921fb54442d18bff80def9b417bf7400921fb54442d183ff8e02b1c1f2377"}, {"distinct_range": 8897211433459525000, "num_eq": 8000000, "num_range": 8897211433459524182, "upper_bound": "\\\\x42fd100000000000000000c00921fb54442d18bff871f8d554e774400921fb54442d183ff90dce50972887"}, {"distinct_range": 300000, "num_eq": 7000000000, "num_range": 300000, "upper_bound": "\\\\x42fd100000000000000000c00921fb54442d18bff912d2dbe6695b400921fb54442d183ff8e787856e836e"}, {"distinct_range": 0, "num_eq": 500, "num_range": 427188659163810011, "upper_bound": "\\\\x42fd124000000000000000bfea73907b36dff83fc594ace0aebe083fc98eb67838bfc53fdf10f8519ff0a6"}, {"distinct_range": 0, "num_eq": 6773564339981791379, "num_range": 3747619800960094653, "upper_bound": "\\\\x42fd13cb00000000000000bfea73907b36dff83fc594ace0aebe083fc98eb67838bfc53fdf10f8519ff0a6"}, {"distinct_range": 0, "num_eq": 0, "num_range": 400000, "upper_bound": "\\\\x42fd3000000000000000003fd8dab6086d39fdbff61dd13cec6249bffb01140dacdf6c3ff67b201ad827e9"}, {"distinct_range": 0, "num_eq": 237936415650946128, "num_range": 0, "upper_bound": "\\\\x42fd300000000000000000c005b5117f2b26b0bff8714e4894bd9d3ffe87afaf541c563ff7e856edeea0c4"}, {"distinct_range": 5673651838006029000, "num_eq": 800, "num_range": 5673651838006029336, "upper_bound": "\\\\x42fd300000000000000000c008dbac4cf04785bff8763e8c4a77804008224e7c8aeed03ff81720d2a111d0"}, {"distinct_range": 8000000, "num_eq": 4000, "num_range": 8000000, "upper_bound": "\\\\x42fd300000000000000000c00921fb54442d18bff80def9b417bf7400921fb54442d183ff8e02b1c1f2377"}, {"distinct_range": 174262391548403330, "num_eq": 8236117762368550610, "num_range": 2126713541712029951, "upper_bound": "\\\\x42fd300000000000000000c00921fb54442d18bff871f8d554e774400921fb54442d183ff90dce50972887"}, {"distinct_range": 4013473397413269000, "num_eq": 500, "num_range": 7310809444108429050, "upper_bound": "\\\\x42fd300000000000000000c00921fb54442d18bff912d2dbe6695b400921fb54442d183ff8e787856e836e"}, {"distinct_range": 0, "num_eq": 7219996621360699873, "num_range": 8841906853539275683, "upper_bound": "\\\\x42fd5000000000000000003fd8dab6086d39fdbff61dd13cec6249bffb01140dacdf6c3ff67b201ad827e9"}, {"distinct_range": 0, "num_eq": 800000, "num_range": 90, "upper_bound": "\\\\x42fd500000000000000000c005b5117f2b26b0bff8714e4894bd9d3ffe87afaf541c563ff7e856edeea0c4"}, {"distinct_range": 4000000, "num_eq": 795734841385758003, "num_range": 4000000, "upper_bound": "\\\\x42fd500000000000000000c008dbac4cf04785bff8763e8c4a77804008224e7c8aeed03ff81720d2a111d0"}, {"distinct_range": 544078846317355500, "num_eq": 9089480139125828667, "num_range": 754023305479699597, "upper_bound": "\\\\x42fd500000000000000000c00921fb54442d18bff80def9b417bf7400921fb54442d183ff8e02b1c1f2377"}, {"distinct_range": 0, "num_eq": 70, "num_range": 80000000, "upper_bound": "\\\\x42fd500000000000000000c00921fb54442d18bff871f8d554e774400921fb54442d183ff90dce50972887"}, {"distinct_range": 2000000000, "num_eq": 351612260041778170, "num_range": 2000000000, "upper_bound": "\\\\x42fd500000000000000000c00921fb54442d18bff912d2dbe6695b400921fb54442d183ff8e787856e836e"}, {"distinct_range": 7033282207895446000, "num_eq": 900287368781806765, "num_range": 7033282207895445183, "upper_bound": "\\\\x42fd7000000000000000003fd8dab6086d39fdbff61dd13cec6249bffb01140dacdf6c3ff67b201ad827e9"}, {"distinct_range": 1000, "num_eq": 40000, "num_range": 1000, "upper_bound": "\\\\x42fd700000000000000000c008dbac4cf04785bff8763e8c4a77804008224e7c8aeed03ff81720d2a111d0"}, {"distinct_range": 852663994917200100, "num_eq": 7521338048116622612, "num_range": 6931359398491808149, "upper_bound": "\\\\x42fd700000000000000000c00921fb54442d18bff80def9b417bf7400921fb54442d183ff8e02b1c1f2377"}, {"distinct_range": 0, "num_eq": 3348931606409743428, "num_range": 1586478965011953485, "upper_bound": "\\\\x42fd700000000000000000c00921fb54442d18bff871f8d554e774400921fb54442d183ff90dce50972887"}, {"distinct_range": 3098.951579701938, "num_eq": 1000000000, "num_range": 5000, "upper_bound": "\\\\x42fd700000000000000000c00921fb54442d18bff912d2dbe6695b400921fb54442d183ff8e787856e836e"}, {"distinct_range": 0, "num_eq": 40000000000, "num_range": 135374581040110871, "upper_bound": "\\\\x42fd8cd000000000000000bfea73907b36dff83fc594ace0aebe083fc98eb67838bfc53fdf10f8519ff0a6"}, {"distinct_range": 81160.9950271318, "num_eq": 400, "num_range": 200000, "upper_bound": "\\\\x42fd900000000000000000c005b5117f2b26b0bff8714e4894bd9d3ffe87afaf541c563ff7e856edeea0c4"}, {"distinct_range": 700000, "num_eq": 5627181682867036646, "num_range": 700000, "upper_bound": "\\\\x42fd900000000000000000c008dbac4cf04785bff8763e8c4a77804008224e7c8aeed03ff81720d2a111d0"}, {"distinct_range": 5955992628583125000, "num_eq": 2372091727541825945, "num_range": 6029845356958360117, "upper_bound": "\\\\x42fd900000000000000000c00921fb54442d18bff80def9b417bf7400921fb54442d183ff8e02b1c1f2377"}, {"distinct_range": 3002560801353319400, "num_eq": 3708911910644524232, "num_range": 3002560801353319655, "upper_bound": "\\\\x42fd900000000000000000c00921fb54442d18bff871f8d554e774400921fb54442d183ff90dce50972887"}, {"distinct_range": 100, "num_eq": 2000000, "num_range": 100, "upper_bound": "\\\\x42fd900000000000000000c00921fb54442d18bff912d2dbe6695b400921fb54442d183ff8e787856e836e"}, {"distinct_range": 600000, "num_eq": 4000000, "num_range": 600000, "upper_bound": "\\\\x42fdb000000000000000003fd8dab6086d39fdbff61dd13cec6249bffb01140dacdf6c3ff67b201ad827e9"}, {"distinct_range": 700000000, "num_eq": 6014107674188362075, "num_range": 700000000, "upper_bound": "\\\\x42fdb00000000000000000c005b5117f2b26b0bff8714e4894bd9d3ffe87afaf541c563ff7e856edeea0c4"}, {"distinct_range": 2757725386572387300, "num_eq": 7633758681198744229, "num_range": 2757725386572387163, "upper_bound": "\\\\x42fdb00000000000000000c008dbac4cf04785bff8763e8c4a77804008224e7c8aeed03ff81720d2a111d0"}, {"distinct_range": 30, "num_eq": 10000, "num_range": 30, "upper_bound": "\\\\x42fdb00000000000000000c00921fb54442d18bff80def9b417bf7400921fb54442d183ff8e02b1c1f2377"}, {"distinct_range": 484446831289083400, "num_eq": 6000, "num_range": 493474566664398005, "upper_bound": "\\\\x42fdb00000000000000000c00921fb54442d18bff871f8d554e774400921fb54442d183ff90dce50972887"}, {"distinct_range": 49591380383811880, "num_eq": 10000, "num_range": 257139708585119361, "upper_bound": "\\\\x42fdb00000000000000000c00921fb54442d18bff912d2dbe6695b400921fb54442d183ff8e787856e836e"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 6213438840600574285}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 45494392348380458, "histo_col_type": "", "name": "__auto__", "null_count": 1840856750688411408, "row_count": 1843290936840299515}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1438938874899216160, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1843290936840299515}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1646384552812224103, "histo_col_type": "", "name": "__auto__", "null_count": 534525902120679511, "row_count": 1843290936840299515}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1239101787995603687, "histo_col_type": "", "name": "__auto__", "null_count": 369012016702122272, "row_count": 1843290936840299515}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 426739952625121019, "histo_col_type": "", "name": "__auto__", "null_count": 1464204689413998359, "row_count": 1843290936840299515}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 574478348020961550, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1843290936840299515}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1295633815459493845, "histo_buckets": [{"distinct_range": 0, "num_eq": 4803965273273024948, "num_range": 0, "upper_bound": "O"}], "histo_col_type": "\\"char\\"", "name": "__auto__", "null_count": 0, "row_count": 1843290936840299515}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('alivi', 'marc', 'c', 'vxbtf');
        ;
    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/logTestRandomSyntaxSQLSmith586725983
--- FAIL: TestRandomSyntaxSQLSmith (331.16s)
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 @ c1e87bb93b8782dc71ebba12145ca0446dd6a93b:

        CREATE TABLE table3 (col1_1 NAME NOT NULL, col1_0 BYTES NOT NULL, col3_2 REGCLASS NOT NULL, col3_3 DECIMAL NULL, col3_4 VARCHAR NOT NULL, col3_5 BOX2D NOT NULL, col3_6 FLOAT4 NOT NULL, col3_7 REGPROC, col3_8 NAME NULL, col3_9 CHAR NOT NULL, col3_10 UUID NOT NULL, col3_11 BIT(12), col3_12 REGNAMESPACE NOT NULL, col3_13 INT8, col3_14 REGTYPE NULL, PRIMARY KEY (col1_1 DESC, col1_0 DESC, col3_2, col3_10, col3_5 ASC, col3_9, col3_12, col3_8), UNIQUE (col1_0, col3_9, col3_8, col3_5 ASC, col3_11, col3_6 ASC, col3_7 DESC, col3_12 ASC, col3_2 DESC, col3_3 ASC, col3_10, col3_14 ASC, col1_1, col3_13 ASC, col3_4 DESC) WHERE (((((table3.col3_13 <= (-1):::INT8) OR (table3.col3_3 != 0:::DECIMAL)) AND (table3.col1_0 < '\x22':::BYTES)) AND (table3.col3_8 >= 'X':::STRING)) AND (table3.col3_4 < '"':::STRING)) OR (table3.col3_6 <= '-Inf':::FLOAT8), UNIQUE (col3_2 DESC), UNIQUE (col1_0, col3_13 ASC, col3_9 DESC, col3_3 DESC, col1_1 DESC, col3_4, col3_6, col3_14, col3_2 ASC, col3_8 ASC, col3_12, col3_5 ASC, col3_10 DESC, col3_11 DESC, col3_7 ASC), FAMILY (col3_6), FAMILY (col3_2, col1_0), FAMILY (col3_14, col3_5), FAMILY (col3_12), FAMILY (col3_10, col3_7), FAMILY (col3_13, col3_9), FAMILY (col3_11, col3_4, col3_8, col1_1), FAMILY (col3_3), UNIQUE (col3_10), UNIQUE (col3_3, col3_13), UNIQUE (col3_2, col3_7)) INTERLEAVE IN PARENT table2 (col1_1, col1_0);
        CREATE TABLE table4 (col1_1 NAME NOT NULL, col1_0 BYTES NOT NULL, col4_2 STRING NOT NULL, PRIMARY KEY (col1_1 DESC, col1_0 DESC), UNIQUE (col4_2, col1_0) WHERE table4.col4_2 > 'X':::STRING, UNIQUE (col1_0 DESC) STORING (col4_2) WHERE (table4.col1_1 > 'X':::STRING) OR (table4.col1_0 = '\x':::BYTES), INDEX (col1_1, col4_2 DESC, col1_0), UNIQUE (col1_0, col4_2 ASC, col1_1 ASC), UNIQUE (col4_2) WHERE table4.col4_2 >= e'\x00':::STRING, INDEX (col1_1 DESC, col4_2 DESC, col1_0 ASC), UNIQUE (col4_2, col1_0 DESC, col1_1 ASC), INDEX (col1_0, col4_2 DESC, col1_1) WHERE (table4.col1_0 > '\x22':::BYTES) OR (table4.col4_2 <= e'\'':::STRING), FAMILY (col1_0), FAMILY (col4_2), FAMILY (col1_1)) INTERLEAVE IN PARENT table2 (col1_1, col1_0);
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 314028273003814069, "histo_buckets": [{"distinct_range": 0, "num_eq": 7440432377211990505, "num_range": 0, "upper_bound": "\\\\x0a5a5e590f4031355a"}, {"distinct_range": 1000000000, "num_eq": 691382082340956694, "num_range": 1000000000, "upper_bound": "\\\\x365fd30f37d9ad9875"}, {"distinct_range": 13311403.517847273, "num_eq": 50000000000, "num_range": 20000000, "upper_bound": "\\\\x386a"}, {"distinct_range": 1449145669632799700, "num_eq": 2953167928338245204, "num_range": 1449145669632799703, "upper_bound": "\\\\x9b03ec"}, {"distinct_range": 0, "num_eq": 8308124844550359126, "num_range": 6417416785546472498, "upper_bound": "\\\\x9fbfef"}, {"distinct_range": 9772698777.008364, "num_eq": 6000000, "num_range": 10000000000, "upper_bound": "\\\\xb251"}, {"distinct_range": 0, "num_eq": 8418470739927026262, "num_range": 3000, "upper_bound": "\\\\xe0"}, {"distinct_range": 0, "num_eq": 5292923498877137195, "num_range": 3753427985288587473, "upper_bound": "\\\\xf548054f"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 4185727137499339321}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4124411087797852889, "histo_buckets": [{"distinct_range": 0, "num_eq": 8000000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 0, "num_eq": 4000000, "num_range": 460051834407475217, "upper_bound": "\\u001eg\\nw\\u001a"}, {"distinct_range": 6833871287871540000, "num_eq": 474793547224306029, "num_range": 6833871287871539866, "upper_bound": "9\\u0014k\\u0012]+\\u001f$"}, {"distinct_range": 3953514014058907600, "num_eq": 5917518647420017084, "num_range": 3953514014058907870, "upper_bound": "=:(a\\u001c\\u0010"}, {"distinct_range": 490278497583684030, "num_eq": 3067143622536560840, "num_range": 490278497583684049, "upper_bound": "X"}, {"distinct_range": 6962.641145015304, "num_eq": 9000000, "num_range": 8000, "upper_bound": "i\\u001awee"}, {"distinct_range": 3687327978530125000, "num_eq": 3904861208952346020, "num_range": 6235226398322180095, "upper_bound": "l\\u001a\\u000b\'"}, {"distinct_range": 0, "num_eq": 2259172646080818790, "num_range": 3000000000, "upper_bound": "y}\\r__9"}, {"distinct_range": 0, "num_eq": 6639975825997809469, "num_range": 943516296796424686, "upper_bound": "|eI\\u001ab"}], "histo_col_type": "NAME", "name": "__auto__", "null_count": 0, "row_count": 4185727137499339321}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31663432, "histo_col_type": "", "name": "__auto__", "null_count": 178738000, "row_count": 300000000}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 266252865, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300000000}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 192461807, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300000000}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 133530028, "histo_col_type": "", "name": "__auto__", "null_count": 294107254, "row_count": 300000000}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 265698126, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300000000}, {"columns": ["col2_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 231788893, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300000000}, {"columns": ["col2_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 125836171, "histo_col_type": "", "name": "__auto__", "null_count": 164086870, "row_count": 300000000}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 207993244, "histo_col_type": "", "name": "__auto__", "null_count": 235736136, "row_count": 300000000}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 74422439, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300000000}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 214133592, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300000000}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 181489524, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 300000000}, {"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 115936060, "histo_col_type": "", "name": "__auto__", "null_count": 298107859, "row_count": 300000000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 293692159, "histo_buckets": [{"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "\\u000b@\\u001b\\u001e"}, {"distinct_range": 60, "num_eq": 20000000000, "num_range": 60, "upper_bound": "\\u0017kM&;\\u001a(J"}, {"distinct_range": 0, "num_eq": 3000, "num_range": 800000, "upper_bound": "7\\t~o@\'u"}, {"distinct_range": 0, "num_eq": 0, "num_range": 84028499538114693, "upper_bound": "K"}], "histo_col_type": "NAME", "name": "__auto__", "null_count": 0, "row_count": 300000000}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS e'[{"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1601454175267754205, "histo_buckets": [{"distinct_range": 0, "num_eq": 457766831901348820, "num_range": 0, "upper_bound": "474828762"}], "histo_col_type": "REGCLASS", "name": "__auto__", "null_count": 0, "row_count": 4210101786256436972}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1695227154613730094, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4210101786256436972}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 989911769768258890, "histo_col_type": "", "name": "__auto__", "null_count": 1305700560452824098, "row_count": 4210101786256436972}, {"columns": ["col3_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2804528457329730355, "histo_col_type": "", "name": "__auto__", "null_count": 1881307421581492672, "row_count": 4210101786256436972}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3189197443967974589, "histo_buckets": [{"distinct_range": 0, "num_eq": 6451689800500124143, "num_range": 0, "upper_bound": "\\\\x12818053"}, {"distinct_range": 6874091308584692000, "num_eq": 4000, "num_range": 6874091308584691877, "upper_bound": "\\\\x22"}, {"distinct_range": 0, "num_eq": 7815746724815099082, "num_range": 3781364135050681913, "upper_bound": "\\\\x31c8b02d7e009861"}, {"distinct_range": 0, "num_eq": 0, "num_range": 4344692568327306190, "upper_bound": "\\\\x9cc4cf5868db"}, {"distinct_range": 4856321633180236000, "num_eq": 6645517300186188818, "num_range": 4856321633180235841, "upper_bound": "\\\\xee2cff74590101fe"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 4210101786256436972}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4031800282027659627, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4210101786256436972}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3083971935639696406, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4210101786256436972}, {"columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 156406313404470009, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4210101786256436972}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3861134815729798052, "histo_buckets": [{"distinct_range": 0, "num_eq": 500000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 135.50155937245813, "num_eq": 3000000000, "num_range": 400, "upper_bound": "\\u0000"}, {"distinct_range": 3875681270679914000, "num_eq": 6645495429414823065, "num_range": 5563213148785839479, "upper_bound": "5;"}, {"distinct_range": 1000000, "num_eq": 9000000000, "num_range": 1000000, "upper_bound": "G\\u0004\\u000c{A\\\\\\u001b"}, {"distinct_range": 0, "num_eq": 4259723031849291846, "num_range": 0, "upper_bound": "Y"}, {"distinct_range": 0, "num_eq": 50000000000, "num_range": 30000000, "upper_bound": "i\\u0001"}], "histo_col_type": "NAME", "name": "__auto__", "null_count": 0, "row_count": 4210101786256436972}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2988019637271623398, "histo_col_type": "", "name": "__auto__", "null_count": 2127228998526888546, "row_count": 4210101786256436972}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 826668650462999541, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4210101786256436972}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1106444813666091771, "histo_col_type": "", "name": "__auto__", "null_count": 3839760414107577238, "row_count": 4210101786256436972}, {"columns": ["col3_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1789220422262810357, "histo_col_type": "", "name": "__auto__", "null_count": 2559367484270171854, "row_count": 4210101786256436972}, {"columns": ["col3_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3429439207579923879, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4210101786256436972}, {"columns": ["col3_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3913776947151490839, "histo_col_type": "", "name": "__auto__", "null_count": 2455643691726773032, "row_count": 4210101786256436972}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS e'[{"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3057848201963968537, "histo_buckets": [{"distinct_range": 0, "num_eq": 100000000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 2651967011984048600, "num_eq": 2610440453399126161, "num_range": 3644079709857357935, "upper_bound": "5\\n"}, {"distinct_range": 185811.1103761487, "num_eq": 5376308529664698250, "num_range": 200000, "upper_bound": "[b\\u001dN}\\";\\u000e"}, {"distinct_range": 4996588571578969000, "num_eq": 1986585411865719101, "num_range": 4996588571578969374, "upper_bound": "z\\u001bxd\\n\\u000cS\\u000e"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 6016884711531004210}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 918504810862747177, "histo_buckets": [{"distinct_range": 0, "num_eq": 8320055038990433840, "num_range": 0, "upper_bound": ""}, {"distinct_range": 0, "num_eq": 1000000, "num_range": 0, "upper_bound": "\\""}, {"distinct_range": 2984244761367689700, "num_eq": 10000, "num_range": 5067607652107656708, "upper_bound": "-\\u000cs\\u0003"}, {"distinct_range": 5838835983065521000, "num_eq": 5000000, "num_range": 5838835983065520975, "upper_bound": "-CDIC"}, {"distinct_range": 0, "num_eq": 50, "num_range": 8127362246015408315, "upper_bound": "3\\u0004#"}, {"distinct_range": 0, "num_eq": 60, "num_range": 7871330077841314982, "upper_bound": "uI+(e"}], "histo_col_type": "NAME", "name": "__auto__", "null_count": 0, "row_count": 6016884711531004210}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 452702890651437541, "histo_buckets": [{"distinct_range": 0, "num_eq": 500000, "num_range": 0, "upper_bound": "\\\\xc24267b8"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 6016884711531004210}]':::JSONB;
        ALTER TABLE table2 ADD FOREIGN KEY (col2_12) REFERENCES table3 (col3_10);
        ALTER TABLE table1 ADD FOREIGN KEY (col1_1, col1_0) REFERENCES table2 (col1_1, col1_0) ON DELETE RESTRICT;
        ALTER TABLE table2 ADD FOREIGN KEY (col2_7, col2_10) REFERENCES table3 (col3_3, col3_13) ON DELETE RESTRICT;
        ALTER TABLE table2 ADD FOREIGN KEY (col2_3, col2_5) REFERENCES table3 (col3_2, col3_7);
        CREATE TYPE rand_typ_0 AS ENUM ('uw', 'dxnekr', 'q', 'bmuxqt');
        CREATE TYPE rand_typ_1 AS ENUM ('incdy');
        CREATE TYPE rand_typ_2 AS ENUM ('es', 'xtt');
        CREATE TYPE rand_typ_3 AS ENUM ('papgj', 'ce', 'rmdwtw', 'asl', 'jigetn');
        ;
    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/logTestRandomSyntaxSQLSmith853679431
--- FAIL: TestRandomSyntaxSQLSmith (301.21s)
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 @ 3597e1e739382a7f067d86f6fba9ec39841dbb2c:

        	10:::INT8;
    rsg_test.go:764: 351043 executions, 322147 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 REGCLASS NOT NULL, col1_1 "char" NOT NULL, col1_2 REGNAMESPACE NOT NULL, col1_3 NAME, col1_4 INT8 NOT NULL, col1_5 INT2 NOT NULL, col1_6 OID NOT NULL, col1_7 TIMETZ NOT NULL, col1_8 VARCHAR NOT NULL, col1_9 INT4, col1_10 INT2 NOT NULL, col1_11 BIT(34) NOT NULL, col1_12 TIMESTAMPTZ NOT NULL, col1_13 INTERVAL NOT NULL, col1_14 INET, col1_15 TIME NOT NULL, col1_16 "char" NOT NULL, PRIMARY KEY (col1_5 ASC, col1_6 DESC, col1_7, col1_10 DESC, col1_11, col1_15 DESC, col1_1 ASC, col1_12 ASC, col1_8 ASC, col1_4, col1_0 ASC, col1_13 ASC, col1_2, col1_16 DESC), UNIQUE (col1_9 ASC, col1_15 ASC, col1_13 DESC, col1_1 ASC, col1_6 DESC, col1_5, col1_4 ASC) WHERE ((((((((((table1.col1_10 >= (-128):::INT8) OR (table1.col1_9 > (-1):::INT8)) AND (table1.col1_7 >= '00:00:00+15:59:00':::TIMETZ)) OR (table1.col1_4 >= 32767:::INT8)) AND (table1.col1_8 >= e'\'':::STRING)) AND (table1.col1_1 != e'\x00':::STRING)) OR (table1.col1_12 != '-2000-01-01 00:00:00+00:00':::TIMESTAMPTZ)) AND (table1.col1_5 <= 1:::INT8)) OR (table1.col1_16 > '"':::STRING)) AND (table1.col1_15 = '24:00:00':::TIME)) AND (table1.col1_3 <= e'\x00':::STRING), INDEX (col1_9 ASC, col1_11 DESC, col1_4 DESC, col1_16 ASC, col1_2, col1_15 ASC, col1_7, col1_3 ASC, col1_12 DESC, col1_6 DESC), FAMILY (col1_10), FAMILY (col1_2), FAMILY (col1_13, col1_9), FAMILY (col1_5), FAMILY (col1_12), FAMILY (col1_11), FAMILY (col1_6), FAMILY (col1_3, col1_4, col1_7), FAMILY (col1_8), FAMILY (col1_15), FAMILY (col1_0), FAMILY (col1_14), FAMILY (col1_1, col1_16));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1493837693729340691, "histo_buckets": [{"distinct_range": 0, "num_eq": 10000000, "num_range": 0, "upper_bound": "-29383"}, {"distinct_range": 0, "num_eq": 50, "num_range": 373047486243221048, "upper_bound": "-28209"}, {"distinct_range": 10000000000, "num_eq": 80000000, "num_range": 10000000000, "upper_bound": "-25364"}, {"distinct_range": 1704.190333619343, "num_eq": 8486824499756124744, "num_range": 3000, "upper_bound": "-15219"}, {"distinct_range": 0, "num_eq": 30000, "num_range": 2810264541308543944, "upper_bound": "-12494"}, {"distinct_range": 817.3439888993544, "num_eq": 6750465741214605101, "num_range": 1000, "upper_bound": "6252"}, {"distinct_range": 0, "num_eq": 10, "num_range": 100000, "upper_bound": "16325"}, {"distinct_range": 0, "num_eq": 2479882628222914206, "num_range": 0, "upper_bound": "26842"}], "histo_col_type": "INT2", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1488465963597469854, "histo_col_type": "", "name": "__auto__", "null_count": 5941113176611442601, "row_count": 6422542266567994559}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4410385315837177037, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3535786845091526124, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4602390221899408384, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 94059224488961191, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2869272662946079053, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4531179367365588967, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 663337545529312652, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1496819580257822184, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5553676117803310822, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4330469141956204401, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4588231305723219671, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5783191351514388598, "histo_col_type": "", "name": "__auto__", "null_count": 3775327577347773071, "row_count": 6422542266567994559}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3416528073036617480, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 70989347875405027, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6422542266567994559}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2266780820544132727, "histo_col_type": "", "name": "__auto__", "null_count": 1374567223994035835, "row_count": 6422542266567994559}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('qh', 'pu', 'mncnt', 'ph', 'jiacrl', 'i');
        CREATE TYPE rand_typ_1 AS ENUM ('hv', 'az', 'fnxfkx', 'niwzy', 'imsjtf', 'pxqyv');
        ;
    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/logTestRandomSyntaxSQLSmith188901756
--- FAIL: TestRandomSyntaxSQLSmith (300.72s)
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 @ b600d9c2283e19886406e658369e70b5c61a612f:

        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 "char" NOT NULL, col1_1 REGNAMESPACE NOT NULL, col1_2 TIME NOT NULL, PRIMARY KEY (col1_0, col1_1 DESC, col1_2 DESC), INDEX (col1_0 ASC, col1_1 DESC, col1_2), INDEX (col1_1, col1_0 DESC), UNIQUE (col1_1, col1_0, col1_2) WHERE (table1.col1_0 <= e'\'':::STRING) OR (table1.col1_2 = '24:00:00':::TIME), UNIQUE (col1_2 DESC, col1_1 ASC, col1_0 ASC), FAMILY (col1_1, col1_2, col1_0));
        CREATE TABLE table2 (col2_0 FLOAT4 NOT NULL, col2_1 BOX2D NOT NULL, col2_2 INTERVAL NULL, col2_3 INET, col2_4 JSONB NULL, col2_5 REGNAMESPACE NOT NULL, col2_6 JSONB NULL, PRIMARY KEY (col2_5 DESC), UNIQUE (col2_5 DESC) STORING (col2_1, col2_2, col2_6), INDEX (col2_0) STORING (col2_1, col2_3, col2_4, col2_6) WHERE table2.col2_0 <= 0.0:::FLOAT8, INDEX (col2_3 ASC, col2_5 ASC, col2_0 ASC, col2_1 ASC), FAMILY (col2_1), FAMILY (col2_5), FAMILY (col2_4, col2_0), FAMILY (col2_6, col2_3, col2_2));
        CREATE TABLE table3 (col1_0 "char" NOT NULL, col1_1 REGNAMESPACE NOT NULL, col1_2 TIME NOT NULL, col3_3 TIMESTAMP NULL, col3_4 FLOAT4, col3_5 REGNAMESPACE NULL, col3_6 DECIMAL NULL, col3_7 VARCHAR NOT NULL, col3_8 TIME, col3_9 BIT(4), col3_10 VARCHAR NOT NULL, PRIMARY KEY (col1_0, col1_1 DESC, col1_2 DESC, col3_6 DESC, col3_8, col3_7 DESC, col3_9 ASC, col3_3, col3_5 ASC), INDEX (col3_6, col3_10 ASC, col3_4 ASC, col1_0 ASC, col3_3 ASC, col3_8 ASC, col3_7 ASC, col3_9, col1_2, col1_1 ASC, col3_5) WHERE (((((table3.col3_8 < '24:00:00':::TIME) AND (table3.col3_3 < '0001-01-01 00:00:00':::TIMESTAMP)) OR (table3.col3_6 = 0:::DECIMAL)) OR (table3.col3_10 > e'\'':::STRING)) AND (table3.col1_2 > '24:00:00':::TIME)) AND (table3.col3_4 < 1.0:::FLOAT8), INDEX (col3_10 ASC, col1_2, col3_7 DESC, col3_8 ASC, col1_1, col3_4 ASC, col3_5) WHERE ((((table3.col3_8 = '24:00:00':::TIME) AND (table3.col1_2 < '00:00:00':::TIME)) AND (table3.col1_0 >= e'\'':::STRING)) OR (table3.col3_10 <= '':::STRING)) OR (table3.col3_7 >= '':::STRING), INDEX (col1_1, col3_9 DESC, col3_10 DESC) WHERE (((((table3.col3_10 > '':::STRING) OR (table3.col3_3 < '0001-01-01 00:00:00':::TIMESTAMP)) OR (table3.col1_2 = '00:00:00':::TIME)) AND (table3.col3_6 <= 1:::DECIMAL)) OR (table3.col1_0 != e'\'':::STRING)) OR (table3.col3_8 != '24:00:00':::TIME), UNIQUE (col3_5 ASC, col1_1 ASC, col3_10 ASC, col3_3 DESC, col3_6, col1_2 ASC) WHERE (((((((table3.col1_2 > '00:00:00':::TIME) OR (table3.col3_4 < '-Inf':::FLOAT8)) OR (table3.col3_8 = '00:00:00':::TIME)) AND (table3.col3_6 < 'Infinity':::DECIMAL)) AND (table3.col3_10 > '"':::STRING)) AND (table3.col1_0 > e'\x00':::STRING)) OR (table3.col3_3 != '294276-12-31 23:59:59.999999':::TIMESTAMP)) OR (table3.col3_7 < e'\'':::STRING), INDEX (col3_4 DESC, col3_9 ASC, col3_8 ASC, col3_3 DESC, col1_1 DESC, col3_6, col3_5 DESC, col3_10 ASC), INDEX (col3_4 DESC, col3_9 DESC), UNIQUE (col3_7, col1_0) STORING (col3_4), INDEX (col3_3, col3_6, col3_4 ASC, col3_5 DESC, col3_8 DESC, col3_9 ASC, col1_1 ASC, col3_7 DESC, col1_2 DESC), UNIQUE (col3_8, col1_0 DESC, col1_1 DESC, col1_2 DESC, col3_7, col3_6 DESC, col3_4 ASC, col3_5 ASC, col3_9, col3_10 DESC) WHERE table3.col3_10 < e'\x00':::STRING, FAMILY (col1_0, col3_6, col3_8), FAMILY (col3_3, col3_5), FAMILY (col3_7), FAMILY (col3_9, col1_2, col3_10), FAMILY (col3_4, col1_1)) INTERLEAVE IN PARENT table1 (col1_0, col1_1, col1_2);
        CREATE TABLE table4 (col4_0 TIMESTAMPTZ, col4_1 INT2 NULL, col4_2 TIMESTAMPTZ NULL, col4_3 OID NULL, col4_4 "char" NULL, col4_5 CHAR NULL, col4_6 STRING NOT NULL AS (CASE WHEN col4_2 IS NULL THEN e'Vl(-(:;r\x06':::STRING ELSE NULL END) VIRTUAL, col4_7 STRING NULL AS (lower(CAST(col4_3 AS STRING))) STORED, col4_8 INT2 NULL AS (col4_1 + 29378:::INT8) VIRTUAL, col4_9 INT2 NOT NULL AS (col4_1 + 2117:::INT8) VIRTUAL, INDEX (col4_3, col4_1, col4_4 DESC, col4_9 ASC, col4_8 ASC, col4_7 ASC, col4_6 ASC, col4_5 DESC, col4_0 DESC) WHERE ((table4.col4_0 > '-4713-11-24 00:00:00+00:00':::TIMESTAMPTZ) AND (table4.col4_8 < 1:::INT8)) AND (table4.col4_1 = (-128):::INT8), INDEX (col4_7, col4_2 DESC, col4_0 DESC, col4_5 ASC, col4_6, col4_8, col4_1), INDEX (col4_9 DESC, col4_2) WHERE (((table4.col4_0 != '-4713-11-24 00:00:00+00:00':::TIMESTAMPTZ) AND (table4.col4_6 <= e'\U00002603':::STRING)) OR (table4.col4_9 > 1:::INT8)) OR (table4.col4_1 < 1:::INT8), UNIQUE (col4_8 DESC, col4_1 DESC), UNIQUE (col4_8 ASC, col4_6 DESC, col4_0 ASC, col4_9, col4_3 ASC, col4_4) STORING (col4_1, col4_2, col4_7) WHERE (table4.col4_7 >= '"':::STRING) AND (table4.col4_4 != 'X':::STRING), INDEX (col4_8 DESC, col4_6, col4_9 DESC), INDEX (col4_1, col4_5 ASC, col4_3 ASC) STORING (col4_7), UNIQUE (col4_7 DESC) STORING (col4_0, col4_1, col4_4) WHERE table4.col4_5 <= e'\x00':::STRING, FAMILY (col4_4), FAMILY (col4_2, col4_7), FAMILY (col4_5, col4_0, col4_3), FAMILY (col4_1));
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5506185437828076391, "histo_buckets": [{"distinct_range": 0, "num_eq": 556461007337025732, "num_range": 0, "upper_bound": "\\u0015"}, {"distinct_range": 0, "num_eq": 2187000357437858967, "num_range": 9000000000, "upper_bound": "\\u001a"}, {"distinct_range": 365097738.6457385, "num_eq": 6748874511828829730, "num_range": 800000000, "upper_bound": "\'"}, {"distinct_range": 2000, "num_eq": 6634127942806606693, "num_range": 2000, "upper_bound": "m"}, {"distinct_range": 1100189212056733600, "num_eq": 0, "num_range": 1100189212056733561, "upper_bound": "s"}, {"distinct_range": 432893677233180300, "num_eq": 10000000, "num_range": 5039335564023850510, "upper_bound": "v"}], "histo_col_type": "\\"char\\"", "name": "__auto__", "null_count": 0, "row_count": 6267782373099272866}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6083247324593199181, "histo_buckets": [{"distinct_range": 0, "num_eq": 100000000, "num_range": 0, "upper_bound": "91723201"}, {"distinct_range": 80000000000, "num_eq": 80410573077467359, "num_range": 80000000000, "upper_bound": "399779590"}, {"distinct_range": 70000, "num_eq": 3738125546957776165, "num_range": 70000, "upper_bound": "1170134158"}, {"distinct_range": 5436619015457811000, "num_eq": 500000000, "num_range": 5436619015457811770, "upper_bound": "2212505956"}, {"distinct_range": 0, "num_eq": 6525298657266550671, "num_range": 100, "upper_bound": "2845335179"}, {"distinct_range": 3176462576312327700, "num_eq": 30, "num_range": 5273915474589209610, "upper_bound": "2934552796"}, {"distinct_range": 207492565682179650, "num_eq": 2773454773278765490, "num_range": 1017685461113385291, "upper_bound": "3420695628"}, {"distinct_range": 0, "num_eq": 100, "num_range": 800000, "upper_bound": "4153904247"}, {"distinct_range": 585725546665172000, "num_eq": 10000, "num_range": 585725546665171939, "upper_bound": "4270890922"}], "histo_col_type": "REGNAMESPACE", "name": "__auto__", "null_count": 0, "row_count": 6267782373099272866}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 613624486082381274, "histo_buckets": [{"distinct_range": 0, "num_eq": 5192741986502336299, "num_range": 0, "upper_bound": "09:38:47.461672"}], "histo_col_type": "TIME", "name": "__auto__", "null_count": 0, "row_count": 6267782373099272866}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4962574969122596348, "histo_col_type": "", "name": "__auto__", "null_count": 555800898718002939, "row_count": 5885025386635533176}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 802704304366685757, "histo_col_type": "INET", "name": "__auto__", "null_count": 182543520697907207, "row_count": 5885025386635533176}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1415629615900934217, "histo_col_type": "", "name": "__auto__", "null_count": 2659933333128449038, "row_count": 5885025386635533176}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5808335476363549465, "histo_buckets": [{"distinct_range": 0, "num_eq": 80000000000, "num_range": 0, "upper_bound": "3464056833"}], "histo_col_type": "REGNAMESPACE", "name": "__auto__", "null_count": 0, "row_count": 5885025386635533176}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5423361670347521610, "histo_col_type": "", "name": "__auto__", "null_count": 2522008197446171901, "row_count": 5885025386635533176}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3149737953428737319, "histo_buckets": [{"distinct_range": 0, "num_eq": 6904842854158971391, "num_range": 0, "upper_bound": "-1.6349668502807617"}, {"distinct_range": 0, "num_eq": 500000000, "num_range": 6180385562783329077, "upper_bound": "-0.15662309527397156"}], "histo_col_type": "FLOAT4", "name": "__auto__", "null_count": 0, "row_count": 5885025386635533176}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4208508376903603752, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5885025386635533176}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS e'[{"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 120683131316437423, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7762330737220859698}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1653563087407990731, "histo_col_type": "", "name": "__auto__", "null_count": 6026575661852898249, "row_count": 7762330737220859698}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5091376213679754712, "histo_buckets": [{"distinct_range": 0, "num_eq": 1327150404045458652, "num_range": 0, "upper_bound": "-7.554221097915495666E+31"}, {"distinct_range": 6199284621061001000, "num_eq": 6293201941966756593, "num_range": 6199284621061001477, "upper_bound": "-6283.068919908594906"}, {"distinct_range": 884492283658691300, "num_eq": 5194268275333501167, "num_range": 884492283658691276, "upper_bound": "-254.2223971228341346"}, {"distinct_range": 0, "num_eq": 800000000, "num_range": 0, "upper_bound": "29281740.14127702845"}, {"distinct_range": 369.41705505749104, "num_eq": 8411631902974077804, "num_range": 600, "upper_bound": "9.064294553547825662E+19"}, {"distinct_range": 3378199927742017000, "num_eq": 4414267444378054695, "num_range": 4620491530561820682, "upper_bound": "7.894022219754852112E+34"}, {"distinct_range": 0, "num_eq": 0, "num_range": 100000, "upper_bound": "8.055539679816295252E+34"}], "histo_col_type": "DECIMAL", "name": "__auto__", "null_count": 3670714110237661053, "row_count": 7762330737220859698}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5492888564621010559, "histo_col_type": "", "name": "__auto__", "null_count": 7749850123447657681, "row_count": 7762330737220859698}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4930699071812967080, "histo_buckets": [{"distinct_range": 0, "num_eq": 5000000000, "num_range": 0, "upper_bound": "\\u0003"}, {"distinct_range": 48408.464307264636, "num_eq": 4246284987697759445, "num_range": 4000000, "upper_bound": "``"}, {"distinct_range": 7053541104981928000, "num_eq": 70000000, "num_range": 7053541104981927710, "upper_bound": "d"}, {"distinct_range": 8780157385792561000, "num_eq": 7593738252540355794, "num_range": 8780157385792560781, "upper_bound": "p"}, {"distinct_range": 10000, "num_eq": 50000, "num_range": 10000, "upper_bound": "q"}, {"distinct_range": 48025796648.52614, "num_eq": 6124081356967640215, "num_range": 60000000000, "upper_bound": "\U00002603"}], "histo_col_type": "\\"char\\"", "name": "__auto__", "null_count": 0, "row_count": 7762330737220859698}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2299999325312291426, "histo_col_type": "FLOAT4", "name": "__auto__", "null_count": 3270906331244332654, "row_count": 7762330737220859698}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2700223801533040575, "histo_buckets": [{"distinct_range": 0, "num_eq": 60000, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 0, "num_eq": 8952098572212542176, "num_range": 6198860043955934555, "upper_bound": "439950543"}, {"distinct_range": 0, "num_eq": 5032200050984909625, "num_range": 0, "upper_bound": "877240975"}, {"distinct_range": 1000000, "num_eq": 30, "num_range": 1000000, "upper_bound": "1243685886"}, {"distinct_range": 0, "num_eq": 8637817462514762731, "num_range": 0, "upper_bound": "2100307316"}, {"distinct_range": 5821634288729487000, "num_eq": 20, "num_range": 5821634288729487788, "upper_bound": "3127775718"}], "histo_col_type": "REGNAMESPACE", "name": "__auto__", "null_count": 5009933649332167613, "row_count": 7762330737220859698}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5474351262927901999, "histo_col_type": "VARCHAR", "name": "__auto__", "null_count": 0, "row_count": 7762330737220859698}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4654386534740111594, "histo_buckets": [{"distinct_range": 0, "num_eq": 8000000000, "num_range": 0, "upper_bound": "01:37:31.122349"}, {"distinct_range": 0, "num_eq": 20000000000, "num_range": 30000000, "upper_bound": "24:00:00"}], "histo_col_type": "TIME", "name": "__auto__", "null_count": 3704180144967274661, "row_count": 7762330737220859698}, {"columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2482756815327273279, "histo_buckets": [{"distinct_range": 0, "num_eq": 40000000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 304194053.12690073, "num_eq": 7975722622781592803, "num_range": 700000000, "upper_bound": "\\u000c-t\\u0004e6Df"}, {"distinct_range": 3477181126422957600, "num_eq": 0, "num_range": 3477181126422957808, "upper_bound": "\\u0010a"}, {"distinct_range": 5000000, "num_eq": 200000000, "num_range": 5000000, "upper_bound": "k\\u0001 eS(\\u0007L"}, {"distinct_range": 80, "num_eq": 7384460035010858254, "num_range": 80, "upper_bound": "{O}"}], "histo_col_type": "VARCHAR", "name": "__auto__", "null_count": 0, "row_count": 7762330737220859698}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 548705041634997534, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7762330737220859698}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS e'[{"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1765090579907347996, "histo_buckets": [{"distinct_range": 0, "num_eq": 3978099156929207969, "num_range": 0, "upper_bound": "280298354"}, {"distinct_range": 1000000000, "num_eq": 3491645135289761897, "num_range": 1000000000, "upper_bound": "633434044"}, {"distinct_range": 100, "num_eq": 7389465100928527252, "num_range": 100, "upper_bound": "1517369375"}, {"distinct_range": 118751.20002118516, "num_eq": 500000000, "num_range": 300000, "upper_bound": "1756525976"}, {"distinct_range": 780841873793222800, "num_eq": 70000, "num_range": 780841873793222812, "upper_bound": "2182456424"}, {"distinct_range": 29.5643727692779, "num_eq": 0, "num_range": 40, "upper_bound": "2342912585"}, {"distinct_range": 6206065685669032000, "num_eq": 100000000000, "num_range": 6206065685669032292, "upper_bound": "2956951226"}], "histo_col_type": "OID", "name": "__auto__", "null_count": 233991639495184750, "row_count": 4108414674371130051}, {"columns": ["col4_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 638489413999059720, "histo_col_type": "", "name": "__auto__", "null_count": 3232973294963980366, "row_count": 4108414674371130051}, {"columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3021721095775644557, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4108414674371130051}, {"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 30055660242483687, "histo_buckets": [{"distinct_range": 0, "num_eq": 4537567655297741563, "num_range": 0, "upper_bound": "-14121"}, {"distinct_range": 682826838346367600, "num_eq": 4549759280991990553, "num_range": 682826838346367623, "upper_bound": "-8135"}, {"distinct_range": 568595.8368255597, "num_eq": 1755272858467182499, "num_range": 800000, "upper_bound": "-7805"}, {"distinct_range": 2987120203903400400, "num_eq": 50000000, "num_range": 5165166294824417571, "upper_bound": "-2228"}, {"distinct_range": 2748666728722165, "num_eq": 6000000000, "num_range": 8095051231855067, "upper_bound": "-787"}, {"distinct_range": 391807.89212311985, "num_eq": 900000000, "num_range": 900000, "upper_bound": "-1"}, {"distinct_range": 0, "num_eq": 500000000, "num_range": 0, "upper_bound": "3127"}, {"distinct_range": 200, "num_eq": 600, "num_range": 200, "upper_bound": "16189"}], "histo_col_type": "INT2", "name": "__auto__", "null_count": 1559534905464962165, "row_count": 4108414674371130051}, {"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2145990828002490842, "histo_col_type": "", "name": "__auto__", "null_count": 3228237199111494387, "row_count": 4108414674371130051}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2563405362757373857, "histo_buckets": [{"distinct_range": 0, "num_eq": 8087492260859466106, "num_range": 0, "upper_bound": "-27786"}, {"distinct_range": 0, "num_eq": 344880880860483994, "num_range": 567990780194581025, "upper_bound": "-7662"}, {"distinct_range": 667.5436632215831, "num_eq": 4000, "num_range": 800, "upper_bound": "4258"}, {"distinct_range": 10000, "num_eq": 40, "num_range": 10000, "upper_bound": "26333"}], "histo_col_type": "INT2", "name": "__auto__", "null_count": 3126636025406886268, "row_count": 4108414674371130051}, {"columns": ["col4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1944437439264492878, "histo_buckets": [{"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "AG*C\\u0011%"}, {"distinct_range": 0, "num_eq": 300000000, "num_range": 7000000, "upper_bound": "Ta"}, {"distinct_range": 1000, "num_eq": 4392460384253143074, "num_range": 1000, "upper_bound": "d\\u0006\\u0018K&``"}, {"distinct_range": 9000000, "num_eq": 670099651625002365, "num_range": 9000000, "upper_bound": "j)Ce\\"F"}, {"distinct_range": 9070989643493726000, "num_eq": 2948695132369176599, "num_range": 9070989643493726399, "upper_bound": "u\\u0014"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 1761044371921875958, "row_count": 4108414674371130051}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3914078154389672869, "histo_buckets": [{"distinct_range": 0, "num_eq": 3000000000, "num_range": 0, "upper_bound": "-25246"}, {"distinct_range": 0, "num_eq": 30000, "num_range": 1503610777287373805, "upper_bound": "-21649"}, {"distinct_range": 0, "num_eq": 70000000, "num_range": 90000000, "upper_bound": "-14537"}, {"distinct_range": 6753397823409384000, "num_eq": 8242245938279041870, "num_range": 6753397823409384892, "upper_bound": "127"}, {"distinct_range": 0, "num_eq": 4492153829036897325, "num_range": 2785236719160312191, "upper_bound": "4329"}, {"distinct_range": 0, "num_eq": 900000, "num_range": 2811710171662287011, "upper_bound": "26839"}], "histo_col_type": "INT2", "name": "__auto__", "null_count": 0, "row_count": 4108414674371130051}, {"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2406097527427456151, "histo_col_type": "", "name": "__auto__", "null_count": 77301280151474094, "row_count": 4108414674371130051}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3471430605584539549, "histo_col_type": "", "name": "__auto__", "null_count": 2085762859881649202, "row_count": 4108414674371130051}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('h');
        ;
    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/logTestRandomSyntaxSQLSmith380591149
--- FAIL: TestRandomSyntaxSQLSmith (300.59s)
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 @ 1e2234a8449f6fe886387128dc5103866c4d244e:

        		SET CLUSTER SETTING sql.defaults.interleaved_tables.enabled = true;
        	CREATE TABLE table1 (col1_0 NAME NOT NULL, col1_1 DECIMAL NULL, col1_2 FLOAT8 NULL, col1_3 CHAR NULL, col1_4 FLOAT4, col1_5 CHAR[] NULL, col1_6 BIT(13) NULL, col1_7 DECIMAL NULL, col1_8 INT2 NOT NULL, col1_9 BOOL NULL, col1_10 OID NULL, col1_11 INT8, PRIMARY KEY (col1_0 ASC), col1_12 INT2 AS (col1_8 + col1_11) STORED, col1_13 DECIMAL NULL AS (col1_7 + col1_1) STORED, col1_14 INT2 NOT NULL AS (col1_8 + col1_11) STORED, col1_15 STRING NULL AS (lower(col1_3)) STORED, col1_16 STRING NOT NULL AS (lower(CAST(col1_10 AS STRING))) STORED, UNIQUE (col1_10 DESC, col1_8 DESC, col1_4 DESC, col1_1 ASC, col1_6 ASC) WHERE (table1.col1_12 = 0:::INT8) OR (table1.col1_4 != (-1.0):::FLOAT8));
        CREATE TABLE table2 (col2_0 DATE NOT NULL, col2_1 BIT(35), col2_2 INET, col2_3 BYTES NOT NULL, col2_4 BIT(37) NULL, col2_5 CHAR NULL, col2_6 REGCLASS NOT NULL, col2_7 REGNAMESPACE, col2_8 BOOL, col2_9 JSONB, col2_10 BOOL, col2_11 STRING NOT NULL AS (CASE WHEN col2_3 IS NULL THEN e'\x13[/\x01':::STRING ELSE NULL END) VIRTUAL, INVERTED INDEX (col2_5 DESC, col2_6 ASC, col2_2, col2_10 DESC, col2_8 DESC, col2_4, col2_9 ASC) WHERE ((NOT table2.col2_10) AND (table2.col2_11 >= '':::STRING)) OR (table2.col2_5 > 'X':::STRING), FAMILY (col2_3, col2_4, col2_6, col2_7, col2_5), FAMILY (col2_10, col2_2, col2_1, col2_0), FAMILY (col2_8, col2_9));
        CREATE TABLE table3 (col3_0 VARCHAR NOT NULL, col3_1 UUID NOT NULL, col3_2 REGTYPE NOT NULL, col3_3 DATE NULL, col3_4 JSONB NULL, col3_5 FLOAT4 NULL, col3_6 INET NULL, col3_7 GEOGRAPHY NOT NULL, col3_8 INT4 NULL, col3_9 STRING AS (lower(CAST(col3_6 AS STRING))) STORED, col3_10 STRING NOT NULL AS (lower(col3_0)) VIRTUAL, col3_11 STRING NULL AS (lower(CAST(col3_1 AS STRING))) VIRTUAL, col3_12 STRING AS (lower(col3_0)) STORED, col3_13 STRING NULL AS (lower(CAST(col3_1 AS STRING))) STORED, col3_14 STRING NULL AS (lower(CAST(col3_7 AS STRING))) VIRTUAL, col3_15 STRING NULL AS (lower(CAST(col3_4 AS STRING))) VIRTUAL, INVERTED INDEX (col3_4 DESC), INDEX (col3_8 ASC, col3_13 DESC, col3_0 DESC, col3_9 ASC, col3_6, col3_1 DESC, col3_2 DESC, col3_10 DESC) STORING (col3_3, col3_4, col3_7), INVERTED INDEX (col3_14 DESC, col3_8 DESC, col3_4) WHERE (((((((table3.col3_5 <= 3.4028234663852886e+38:::FLOAT8) OR (table3.col3_10 >= e'\U00002603':::STRING)) AND (table3.col3_3 >= '5874897-12-31':::DATE)) AND (table3.col3_11 > 'X':::STRING)) OR (table3.col3_8 < 127:::INT8)) AND (table3.col3_13 > '"':::STRING)) OR (table3.col3_15 > e'\x00':::STRING)) OR (table3.col3_9 >= 'X':::STRING), INVERTED INDEX (col3_14, col3_12 ASC, col3_0 ASC, col3_11, col3_15, col3_5 DESC, col3_3 DESC, col3_8 ASC, col3_1 DESC, col3_10 DESC, col3_9, col3_4) WHERE ((((((((table3.col3_13 < '':::STRING) AND (table3.col3_3 > '5874897-12-31':::DATE)) AND (table3.col3_12 < '"':::STRING)) AND (table3.col3_0 != '"':::STRING)) OR (table3.col3_5 <= '-Inf':::FLOAT8)) AND (table3.col3_10 != e'\'':::STRING)) OR (table3.col3_14 > e'\x00':::STRING)) OR (table3.col3_15 != e'\x00':::STRING)) AND (table3.col3_9 != '"':::STRING), FAMILY (col3_3, col3_13, col3_7, col3_5, col3_6, col3_9), FAMILY (col3_12, col3_2), FAMILY (col3_8), FAMILY (col3_4), FAMILY (col3_0, col3_1));
        CREATE TABLE table4 (col4_0 TIME[] NULL, col4_1 INT4 NOT NULL, col4_2 UUID, col4_3 BOOL NULL, col4_4 STRING NULL, col4_5 REGNAMESPACE NOT NULL, col4_6 FLOAT4, col4_7 INT2 NOT NULL, col4_8 GEOGRAPHY, col4_9 BIT(5) NULL, col4_10 INTERVAL NULL, col4_11 REGPROCEDURE NOT NULL, col4_12 BYTES NOT NULL, col4_13 DECIMAL, PRIMARY KEY (col4_12 DESC, col4_5 ASC, col4_1), col4_14 STRING NOT NULL AS (CASE WHEN col4_12 IS NULL THEN e'\x01\b':::STRING ELSE e'h\x01':::STRING END) STORED, col4_15 INT2 NULL AS (col4_7 + 18833:::INT8) STORED, FAMILY (col4_13), FAMILY (col4_15), FAMILY (col4_11), FAMILY (col4_2), FAMILY (col4_10), FAMILY (col4_0, col4_12, col4_3), FAMILY (col4_8), FAMILY (col4_14, col4_5, col4_1, col4_6, col4_9, col4_4), FAMILY (col4_7));
        CREATE TABLE table5 (col5_0 INT8 NULL, col5_1 VARCHAR, col5_2 TIMETZ NULL, col5_3 INT2 NULL, col5_4 FLOAT4, col5_5 TIMESTAMPTZ NULL, col5_6 INET, col5_7 CHAR NOT NULL, col5_8 UUID NULL, col5_9 STRING NOT NULL AS (lower(col5_7)) STORED, col5_10 INT8 NOT NULL AS (col5_0 + col5_3) VIRTUAL, col5_11 INT2 NULL AS (col5_3 + col5_0) VIRTUAL, col5_12 INT2 NOT NULL AS (col5_3 + 4777:::INT8) STORED, col5_13 STRING AS (lower(col5_7)) VIRTUAL, INDEX (col5_1 ASC, col5_3, col5_6 DESC, col5_7 ASC, col5_5, col5_11 ASC, col5_10 ASC, col5_9, col5_13 ASC, col5_2, col5_0 ASC, col5_12 DESC, col5_4 ASC), INDEX (col5_10 DESC) STORING (col5_5, col5_6, col5_7, col5_12) WHERE (((((((((((table5.col5_7 != e'\'':::STRING) OR (table5.col5_5 >= '-2000-01-01 00:00:00+00:00':::TIMESTAMPTZ)) AND (table5.col5_3 != (-128):::INT8)) OR (table5.col5_4 >= '-Inf':::FLOAT8)) AND (table5.col5_9 < e'\U00002603':::STRING)) OR (table5.col5_1 = 'X':::STRING)) AND (table5.col5_10 < (-2147483648):::INT8)) AND (table5.col5_2 != '00:00:00+15:59:00':::TIMETZ)) AND (table5.col5_12 != (-1):::INT8)) AND (table5.col5_0 = 127:::INT8)) OR (table5.col5_11 >= 32767:::INT8)) AND (table5.col5_13 >= '':::STRING), UNIQUE (col5_1 DESC, col5_12 DESC, col5_13 ASC, col5_7 DESC, col5_5 ASC, col5_6 ASC, col5_10 ASC, col5_8 DESC, col5_9 ASC, col5_11, col5_2, col5_0) WHERE (table5.col5_13 = 'X':::STRING) OR (table5.col5_2 != '00:00:00+15:59:00':::TIMETZ), UNIQUE (col5_6 ASC, col5_10, col5_2, col5_11 ASC, col5_4 ASC, col5_1 DESC, col5_9 DESC, col5_5, col5_12 DESC, col5_13) STORING (col5_7));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2104288907197989135, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7837530029655237792}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 468577426339684101, "histo_col_type": "", "name": "__auto__", "null_count": 7822285857564174391, "row_count": 7837530029655237792}, {"columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6785586874633337091, "histo_col_type": "", "name": "__auto__", "null_count": 4750412822242465371, "row_count": 7837530029655237792}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2385422883629759181, "histo_col_type": "", "name": "__auto__", "null_count": 6274901484334691038, "row_count": 7837530029655237792}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4919337684703872083, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7837530029655237792}, {"columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6133707767383106195, "histo_col_type": "", "name": "__auto__", "null_count": 2832407608754674332, "row_count": 7837530029655237792}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 200169359844093099, "histo_col_type": "", "name": "__auto__", "null_count": 4207097967139502521, "row_count": 7837530029655237792}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1377872806260947982, "histo_col_type": "", "name": "__auto__", "null_count": 401534961900368729, "row_count": 7837530029655237792}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 560657411822928270, "histo_col_type": "", "name": "__auto__", "null_count": 3126871251634369611, "row_count": 7837530029655237792}, {"columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7196096408094511026, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7837530029655237792}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4220926334420866406, "histo_buckets": [{"distinct_range": 0, "num_eq": 7516907943993438152, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 2000000, "num_eq": 20000000, "num_range": 2000000, "upper_bound": "148404436"}, {"distinct_range": 273022579115115460, "num_eq": 10000000, "num_range": 535020162295577757, "upper_bound": "757936211"}, {"distinct_range": 4666912518146801, "num_eq": 2000, "num_range": 4157712655513202524, "upper_bound": "2037957823"}, {"distinct_range": 2251106373914877000, "num_eq": 400000000, "num_range": 2580116766971404786, "upper_bound": "2265492169"}, {"distinct_range": 62.38156532854581, "num_eq": 5908376224441536493, "num_range": 90, "upper_bound": "4287504839"}], "histo_col_type": "OID", "name": "__auto__", "null_count": 980723679378134942, "row_count": 7837530029655237792}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2489611102769768053, "histo_col_type": "", "name": "__auto__", "null_count": 5568991169660169417, "row_count": 7837530029655237792}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6184876311863444837, "histo_col_type": "", "name": "__auto__", "null_count": 3688677768647734687, "row_count": 7837530029655237792}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1967783051438969881, "histo_col_type": "", "name": "__auto__", "null_count": 7250361893540820814, "row_count": 7837530029655237792}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 280463740105149264, "histo_col_type": "", "name": "__auto__", "null_count": 1620193560008674423, "row_count": 7837530029655237792}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3617996123259568419, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7837530029655237792}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6363836113125308847, "histo_col_type": "", "name": "__auto__", "null_count": 551260019579357723, "row_count": 7837530029655237792}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 669, "histo_col_type": "", "name": "__auto__", "null_count": 390, "row_count": 800}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 116, "histo_col_type": "", "name": "__auto__", "null_count": 106, "row_count": 800}, {"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 408, "histo_col_type": "", "name": "__auto__", "null_count": 434, "row_count": 800}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 669, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 800}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 28, "histo_col_type": "", "name": "__auto__", "null_count": 175, "row_count": 800}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 627, "histo_col_type": "", "name": "__auto__", "null_count": 359, "row_count": 800}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 788, "histo_col_type": "", "name": "__auto__", "null_count": 498, "row_count": 800}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 407, "histo_buckets": [{"distinct_range": 0, "num_eq": 1586173588406569208, "num_range": 0, "upper_bound": "\\u000e"}, {"distinct_range": 215400226052034600, "num_eq": 8000, "num_range": 786630680069480756, "upper_bound": ","}, {"distinct_range": 0, "num_eq": 10000000, "num_range": 100, "upper_bound": ";"}, {"distinct_range": 0, "num_eq": 4402365300905448722, "num_range": 0, "upper_bound": "y"}], "histo_col_type": "CHAR", "name": "__auto__", "null_count": 742, "row_count": 800}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 39, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 800}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 170, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 800}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 727, "histo_col_type": "", "name": "__auto__", "null_count": 652, "row_count": 800}, {"columns": ["col2_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 140, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 800}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS e'[{"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 83296, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500000}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31229, "histo_col_type": "", "name": "__auto__", "null_count": 143537, "row_count": 500000}, {"columns": ["col3_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 326308, "histo_col_type": "", "name": "__auto__", "null_count": 186338, "row_count": 500000}, {"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 170700, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500000}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 271469, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500000}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 470185, "histo_col_type": "", "name": "__auto__", "null_count": 366723, "row_count": 500000}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 436636, "histo_col_type": "", "name": "__auto__", "null_count": 49617, "row_count": 500000}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3844, "histo_buckets": [{"distinct_range": 0, "num_eq": 1000000, "num_range": 0, "upper_bound": "\\\\x3700012a0200"}, {"distinct_range": 1359244230207661600, "num_eq": 400, "num_range": 8142466355825618045, "upper_bound": "\\\\x3700030001124570733a58562c7d610001"}, {"distinct_range": 40000, "num_eq": 80000000000, "num_range": 40000, "upper_bound": "\\\\x370003000300010b"}, {"distinct_range": 0, "num_eq": 90000000, "num_range": 2000000000, "upper_bound": "\\\\x3700030003000112335a416434483868200001"}, {"distinct_range": 1803443146463651600, "num_eq": 100000000, "num_range": 1803443146463651663, "upper_bound": "\\\\x3700030003000138"}, {"distinct_range": 0, "num_eq": 200000000, "num_range": 900000, "upper_bound": "\\\\x3700030003000139"}, {"distinct_range": 0, "num_eq": 400000, "num_range": 100000, "upper_bound": "\\\\x37000300030003000100"}, {"distinct_range": 40000000000, "num_eq": 6331806154403498447, "num_range": 40000000000, "upper_bound": "\\\\x3700030003000300010a"}, {"distinct_range": 308370113.3083179, "num_eq": 1000000, "num_range": 3000000000, "upper_bound": "\\\\x370003000300030001122a3a3f5c60430001"}, {"distinct_range": 0, "num_eq": 770761631672330556, "num_range": 30000000000, "upper_bound": "\\\\x3700030003000300012909a94db98585b5638c00"}, {"distinct_range": 700000000, "num_eq": 2000000000, "num_range": 700000000, "upper_bound": "\\\\x370003000300032d3a4600010a"}, {"distinct_range": 875772.2762180811, "num_eq": 40000000000, "num_range": 1000000, "upper_bound": "\\\\x37000300030003686b6124545a513c49000138"}, {"distinct_range": 200000000, "num_eq": 6769914160885957053, "num_range": 200000000, "upper_bound": "\\\\x370003000362000261000138"}, {"distinct_range": 0, "num_eq": 5000000, "num_range": 900, "upper_bound": "\\\\x3700030003620002657c3200010a"}, {"distinct_range": 0, "num_eq": 3409194778914759605, "num_range": 4000, "upper_bound": "\\\\x370003000362617a000139"}, {"distinct_range": 0, "num_eq": 100000, "num_range": 2697617920245381901, "upper_bound": "\\\\x37000300036300024a6d3440603a582b6375000139"}, {"distinct_range": 17615996.296607994, "num_eq": 8826881517860941144, "num_range": 20000000, "upper_bound": "\\\\x3700030003630002673a4f5768226f552d000138"}, {"distinct_range": 0, "num_eq": 80000000000, "num_range": 1000000, "upper_bound": "\\\\x370003000363000278205e406474507d000112666f6f6261720001"}, {"distinct_range": 81463548.03999548, "num_eq": 7000000, "num_range": 300000000, "upper_bound": "\\\\x3700030003666f6f000100"}, {"distinct_range": 700000, "num_eq": 50000000000, "num_range": 700000, "upper_bound": "\\\\x3761000200030001298d234db539853d1000"}, {"distinct_range": 5684897651929469000, "num_eq": 600, "num_range": 5684897651929468491, "upper_bound": "\\\\x3761000200030003000100"}, {"distinct_range": 0, "num_eq": 2595520769967806332, "num_range": 100000, "upper_bound": "\\\\x3761000200030003000138"}, {"distinct_range": 26.107529216530594, "num_eq": 1000000000, "num_range": 40, "upper_bound": "\\\\x376100020003495e44345b3b69323e0002276d56594b000139"}, {"distinct_range": 4549934397494021000, "num_eq": 300000000, "num_range": 5515308895581629744, "upper_bound": "\\\\x376100020003495e44345b3b69323e00026261720002000300010a"}, {"distinct_range": 0, "num_eq": 600000, "num_range": 1306134791266178096, "upper_bound": "\\\\x376100020003610002000300012a0331a543ada5abab1400"}, {"distinct_range": 0, "num_eq": 5000000, "num_range": 5000000000, "upper_bound": "\\\\x37610002000362000139"}, {"distinct_range": 0, "num_eq": 6649442410961644722, "num_range": 5908416369356325884, "upper_bound": "\\\\x37610002000362617a0001124f56467e605d536f55444c0001"}, {"distinct_range": 2606449455677078000, "num_eq": 500000000, "num_range": 7998277489738011458, "upper_bound": "\\\\x37610002000363000139"}, {"distinct_range": 8992333445541497000, "num_eq": 20, "num_range": 8992333445541496396, "upper_bound": "\\\\x3762000139"}, {"distinct_range": 128468.06212635129, "num_eq": 7000000, "num_range": 200000, "upper_bound": "\\\\x3763000139"}, {"distinct_range": 0, "num_eq": 907940215196970236, "num_range": 7626896177455758264, "upper_bound": "\\\\x37666f6f626172000262617a000138"}, {"distinct_range": 0, "num_eq": 200000000, "num_range": 0, "upper_bound": "\\\\x37703b42253a4357473c4c000139"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 118190, "row_count": 500000}, {"columns": ["col3_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 113984, "histo_col_type": "", "name": "__auto__", "null_count": 221027, "row_count": 500000}, {"columns": ["col3_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 326210, "histo_buckets": [{"distinct_range": 0, "num_eq": 4850907267946579921, "num_range": 0, "upper_bound": ""}, {"distinct_range": 9813100.049581496, "num_eq": 4320807520663130187, "num_range": 10000000, "upper_bound": "\\u0000"}, {"distinct_range": 5000000000, "num_eq": 500000000, "num_range": 5000000000, "upper_bound": "\\"5Xm"}, {"distinct_range": 755705607256451600, "num_eq": 4184848541916055796, "num_range": 1881849927470254284, "upper_bound": "&I\\u000fH&\\u0002"}, {"distinct_range": 2693866103547570700, "num_eq": 8546839185849605225, "num_range": 9050873687082045275, "upper_bound": "1:\\u0002\\n\\u0013\\u0007E"}, {"distinct_range": 232361921121796800, "num_eq": 1000000, "num_range": 232361921121796815, "upper_bound": "U0\\u001aEfu\\u001a"}, {"distinct_range": 1404383817137356800, "num_eq": 4000000000, "num_range": 1404383817137356816, "upper_bound": "``;BbY]"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 469305, "row_count": 500000}, {"columns": ["col3_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 223300, "histo_col_type": "", "name": "__auto__", "null_count": 420864, "row_count": 500000}, {"columns": ["col3_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 331318, "histo_col_type": "", "name": "__auto__", "null_count": 372506, "row_count": 500000}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 415174, "histo_col_type": "", "name": "__auto__", "null_count": 286673, "row_count": 500000}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 460466, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500000}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 496475, "histo_buckets": [{"distinct_range": 0, "num_eq": 9000000000, "num_range": 0, "upper_bound": "-1760694073"}, {"distinct_range": 386347900.3981894, "num_eq": 0, "num_range": 10000000000, "upper_bound": "1521806567"}], "histo_col_type": "INT4", "name": "__auto__", "null_count": 398562, "row_count": 500000}, {"columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 484488, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500000}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS e'[{"columns": ["col4_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1705576444372374847, "histo_col_type": "", "name": "__auto__", "null_count": 656866673962722111, "row_count": 6521567214957610731}, {"columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 120338641364193781, "histo_col_type": "", "name": "__auto__", "null_count": 4319914137744841812, "row_count": 6521567214957610731}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2246788659208997328, "histo_col_type": "", "name": "__auto__", "null_count": 2667100151698742039, "row_count": 6521567214957610731}, {"columns": ["col4_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1401992501015666703, "histo_col_type": "", "name": "__auto__", "null_count": 2242642425977032585, "row_count": 6521567214957610731}, {"columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6375144403880145889, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6521567214957610731}, {"columns": ["col4_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4855419240553598513, "histo_col_type": "", "name": "__auto__", "null_count": 163516759936518638, "row_count": 6521567214957610731}, {"columns": ["col4_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2534090315632268311, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6521567214957610731}, {"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4407786463908478627, "histo_col_type": "", "name": "__auto__", "null_count": 6083872821650136194, "row_count": 6521567214957610731}, {"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3661399743777380712, "histo_col_type": "", "name": "__auto__", "null_count": 4900101888667021906, "row_count": 6521567214957610731}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1717524670785137758, "histo_col_type": "", "name": "__auto__", "null_count": 6425498118516239557, "row_count": 6521567214957610731}, {"columns": ["col4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 664112841187261211, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6521567214957610731}, {"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4305085240288847251, "histo_col_type": "", "name": "__auto__", "null_count": 3563572071953798692, "row_count": 6521567214957610731}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2633635047939502615, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6521567214957610731}, {"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1477385078719479876, "histo_col_type": "", "name": "__auto__", "null_count": 3476842023674141862, "row_count": 6521567214957610731}, {"columns": ["col4_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5491934153464362365, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6521567214957610731}, {"columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1876802843979292524, "histo_buckets": [{"distinct_range": 0, "num_eq": 200000000, "num_range": 0, "upper_bound": "\\\\x752a662c6c"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 6521567214957610731}]':::JSONB;
        ALTER TABLE table5 INJECT STATISTICS e'[{"columns": ["col5_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1702568599787601008, "histo_buckets": [{"distinct_range": 0, "num_eq": 8238598120499930786, "num_range": 0, "upper_bound": "-9106771157832446225"}, {"distinct_range": 0, "num_eq": 7153510460926172513, "num_range": 300000, "upper_bound": "-6598042216032531916"}, {"distinct_range": 3042367490859130400, "num_eq": 9043870156466399722, "num_range": 3042367490859130560, "upper_bound": "-5529641369036438437"}, {"distinct_range": 0, "num_eq": 7738001277164920995, "num_range": 3154768047042816710, "upper_bound": "-2918309806542226135"}, {"distinct_range": 0, "num_eq": 60, "num_range": 2000000000, "upper_bound": "2370834047588393952"}, {"distinct_range": 0, "num_eq": 60000000000, "num_range": 6000000, "upper_bound": "3096426776290004748"}, {"distinct_range": 5749940313852471000, "num_eq": 3364044481664612377, "num_range": 5749940313852471175, "upper_bound": "4092875713458010709"}, {"distinct_range": 822578687.3436581, "num_eq": 3714773819244794102, "num_range": 1000000000, "upper_bound": "4156564974451599804"}, {"distinct_range": 785462874369531600, "num_eq": 600, "num_range": 785462874369531663, "upper_bound": "8532126525949509537"}], "histo_col_type": "INT8", "name": "__auto__", "null_count": 0, "row_count": 2378780893400271906}, {"columns": ["col5_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 470030486193014256, "histo_buckets": [{"distinct_range": 0, "num_eq": 50000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 90000000000, "num_eq": 10, "num_range": 90000000000, "upper_bound": "8_\\t|\\u0019"}, {"distinct_range": 1282593490145906200, "num_eq": 4000000000, "num_range": 1282593490145906292, "upper_bound": "{R79"}], "histo_col_type": "VARCHAR", "name": "__auto__", "null_count": 854306990814842492, "row_count": 2378780893400271906}, {"columns": ["col5_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 699128968253768578, "histo_col_type": "", "name": "__auto__", "null_count": 29276016880603656, "row_count": 2378780893400271906}, {"columns": ["col5_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1802762220638621715, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2378780893400271906}, {"columns": ["col5_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 247030976608364076, "histo_col_type": "", "name": "__auto__", "null_count": 1054373072855601628, "row_count": 2378780893400271906}, {"columns": ["col5_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 290537034799566085, "histo_col_type": "", "name": "__auto__", "null_count": 2342999112115116779, "row_count": 2378780893400271906}, {"columns": ["col5_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1353717637332896150, "histo_col_type": "", "name": "__auto__", "null_count": 2100750681180234688, "row_count": 2378780893400271906}, {"columns": ["col5_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 257013403087301089, "histo_col_type": "", "name": "__auto__", "null_count": 179130830588601401, "row_count": 2378780893400271906}, {"columns": ["col5_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2031929558644209852, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2378780893400271906}, {"columns": ["col5_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 225627539623131778, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2378780893400271906}, {"columns": ["col5_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 486247243090950123, "histo_col_type": "", "name": "__auto__", "null_count": 484391371151771762, "row_count": 2378780893400271906}, {"columns": ["col5_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 585529703225546124, "histo_col_type": "", "name": "__auto__", "null_count": 2116214398066576608, "row_count": 2378780893400271906}, {"columns": ["col5_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2092379562478359402, "histo_col_type": "", "name": "__auto__", "null_count": 2329180120378179702, "row_count": 2378780893400271906}, {"columns": ["col5_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1324576485823460431, "histo_col_type": "", "name": "__auto__", "null_count": 960172861226381979, "row_count": 2378780893400271906}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('uhxhr', 'rvwko', 'yvin', 'gzqv', 'pqfftm');
        CREATE TYPE rand_typ_1 AS ENUM ('lurv');
        CREATE TYPE rand_typ_2 AS ENUM ('qrxnqy', 'wvm', 'eivm', 'owxwga', 'asnxx', 'fkhp');
        ;
    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/logTestRandomSyntaxSQLSmith019119706
--- FAIL: TestRandomSyntaxSQLSmith (300.65s)
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 @ 00b770d51383793d83c6c886357788dc211f7158:

    rsg_test.go:764: 331722 executions, 282162 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 VARCHAR NULL, col1_1 OID NULL, col1_2 OID, col1_3 BIT(20) NOT NULL, col1_4 REGPROCEDURE, col1_5 REGTYPE, col1_6 BIT(26), col1_7 OID NOT NULL, col1_8 TIMETZ NULL, col1_9 FLOAT4 NULL, col1_10 JSONB NULL, col1_11 TIMESTAMP NOT NULL, col1_12 FLOAT4 NULL AS (col1_9 + 0.5033549666404724:::FLOAT8) VIRTUAL, INDEX (col1_8 DESC, col1_4 ASC, col1_2) STORING (col1_5, col1_7, col1_10) WHERE ((((table1.col1_12 < 0.0:::FLOAT8) AND (table1.col1_9 != 3.4028234663852886e+38:::FLOAT8)) OR (table1.col1_11 >= '3000-01-01 00:00:00':::TIMESTAMP)) AND (table1.col1_8 <= '24:00:00-15:59:00':::TIMETZ)) OR (table1.col1_0 != e'\U00002603':::STRING), UNIQUE (col1_12 ASC, col1_5 ASC, col1_4 DESC, col1_1 ASC, col1_2 ASC, col1_0, col1_7 ASC, col1_8, col1_9 ASC), UNIQUE (col1_11, col1_2 ASC, col1_7 DESC, col1_9, col1_5 ASC) STORING (col1_3, col1_4, col1_8) WHERE ((((table1.col1_8 <= '24:00:00-15:59:00':::TIMETZ) AND (table1.col1_11 >= '294276-12-31 23:59:59.999999':::TIMESTAMP)) AND (table1.col1_12 <= '-Inf':::FLOAT8)) AND (table1.col1_0 > '':::STRING)) AND (table1.col1_9 >= '-Inf':::FLOAT8), INDEX (col1_11 DESC, col1_5) WHERE ((((table1.col1_9 < 1.401298464324817e-45:::FLOAT8) AND (table1.col1_11 != '0001-01-01 00:00:00':::TIMESTAMP)) AND (table1.col1_0 >= '"':::STRING)) OR (table1.col1_8 >= '24:00:00-15:59:00':::TIMETZ)) OR (table1.col1_12 > (-1.0):::FLOAT8), FAMILY (col1_4), FAMILY (col1_1), FAMILY (col1_9, col1_10, col1_7, col1_0, col1_11), FAMILY (col1_6), FAMILY (col1_3), FAMILY (col1_5), FAMILY (col1_2), FAMILY (col1_8));
        CREATE TABLE table2 (col2_0 TIMESTAMP NOT NULL, col2_1 DECIMAL NOT NULL, col2_2 REGNAMESPACE NOT NULL, PRIMARY KEY (col2_2 ASC, col2_1 ASC), UNIQUE (col2_1 ASC, col2_0) WHERE (table2.col2_1 >= (-1.234E+401):::DECIMAL) AND (table2.col2_0 >= '3000-01-01 00:00:00':::TIMESTAMP), INDEX (col2_0 DESC, col2_2 ASC, col2_1 DESC) WHERE (table2.col2_1 > (-1):::DECIMAL) OR (table2.col2_0 >= '-4713-11-24 00:00:00':::TIMESTAMP), INDEX (col2_1 DESC, col2_2) WHERE (table2.col2_1 != (-1):::DECIMAL) AND (table2.col2_0 < '3000-01-01 00:00:00':::TIMESTAMP), INDEX (col2_1, col2_0 ASC), UNIQUE (col2_2 ASC) STORING (col2_0), UNIQUE (col2_1 ASC, col2_0), UNIQUE (col2_1 ASC, col2_2), UNIQUE (col2_1) WHERE (table2.col2_0 <= '3000-01-01 00:00:00':::TIMESTAMP) OR (table2.col2_1 != (-1.234E+401):::DECIMAL));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 16700614187, "histo_col_type": "", "name": "__auto__", "null_count": 28663554819, "row_count": 30000000000}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 11495109154, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30000000000}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 28686521040, "histo_col_type": "", "name": "__auto__", "null_count": 1452610721, "row_count": 30000000000}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8416654647, "histo_col_type": "", "name": "__auto__", "null_count": 3091482407, "row_count": 30000000000}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8506240458, "histo_buckets": [{"distinct_range": 0, "num_eq": 10000000000, "num_range": 0, "upper_bound": "-1.1624269485473633"}, {"distinct_range": 0, "num_eq": 2713719300963397592, "num_range": 70000000000, "upper_bound": "-0.3675372004508972"}, {"distinct_range": 0, "num_eq": 6816221316551349870, "num_range": 4000, "upper_bound": "-0.3193701207637787"}, {"distinct_range": 5000000000, "num_eq": 5000, "num_range": 5000000000, "upper_bound": "-0.16794544458389282"}, {"distinct_range": 0, "num_eq": 7280795258817228408, "num_range": 0, "upper_bound": "0.0"}, {"distinct_range": 5572.310367701946, "num_eq": 851754322232518913, "num_range": 8000, "upper_bound": "1.401298464324817e-45"}, {"distinct_range": 0, "num_eq": 8658614314188962142, "num_range": 184582394696275439, "upper_bound": "0.31703639030456543"}, {"distinct_range": 0, "num_eq": 100000, "num_range": 70000, "upper_bound": "0.5928410887718201"}], "histo_col_type": "FLOAT4", "name": "__auto__", "null_count": 18885771003, "row_count": 30000000000}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 28326620848, "histo_col_type": "", "name": "__auto__", "null_count": 1244324717, "row_count": 30000000000}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 19734434136, "histo_col_type": "", "name": "__auto__", "null_count": 29247197748, "row_count": 30000000000}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 25278062239, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30000000000}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 18280989425, "histo_buckets": [{"distinct_range": 0, "num_eq": 70, "num_range": 0, "upper_bound": "00:00:00+15:59:00"}, {"distinct_range": 531274986589847900, "num_eq": 100000000000, "num_range": 571332288868867798, "upper_bound": "06:09:45.47744+06:00:00"}, {"distinct_range": 0, "num_eq": 400000, "num_range": 40000000, "upper_bound": "08:52:26.854647+05:42:00"}, {"distinct_range": 271779.9810870335, "num_eq": 7008621119578301348, "num_range": 1000000, "upper_bound": "21:00:48.202238+13:32:00"}, {"distinct_range": 0, "num_eq": 70000000, "num_range": 4788829722699526930, "upper_bound": "14:21:30.886433+06:41:00"}, {"distinct_range": 30, "num_eq": 1000, "num_range": 30, "upper_bound": "00:21:26.512411-10:16:00"}, {"distinct_range": 44331261646.428024, "num_eq": 2655571466019149625, "num_range": 70000000000, "upper_bound": "12:34:25.556537-02:49:00"}, {"distinct_range": 0, "num_eq": 4417060607784609303, "num_range": 809694383085073208, "upper_bound": "18:15:37.773461-06:00:00"}], "histo_col_type": "TIMETZ", "name": "__auto__", "null_count": 18594326222, "row_count": 30000000000}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7120789978, "histo_buckets": [{"distinct_range": 0, "num_eq": 1746344866487177418, "num_range": 0, "upper_bound": "-4713-11-24 00:00:00"}, {"distinct_range": 4574383658.418458, "num_eq": 267050922683464764, "num_range": 5000000000, "upper_bound": "1987-02-09 10:17:16.00069"}, {"distinct_range": 0, "num_eq": 10000000, "num_range": 1252890933817308912, "upper_bound": "1990-10-15 01:21:06.000994"}, {"distinct_range": 600000, "num_eq": 100000000, "num_range": 600000, "upper_bound": "2003-08-13 12:35:31.000511"}, {"distinct_range": 0, "num_eq": 30, "num_range": 8723403443223007205, "upper_bound": "2014-05-14 02:55:01.000871"}, {"distinct_range": 5215124853430481000, "num_eq": 3104488994848913296, "num_range": 5215124853430480438, "upper_bound": "2029-07-22 11:49:11.000096"}, {"distinct_range": 592954318.5601528, "num_eq": 5942641565769619068, "num_range": 1000000000, "upper_bound": "2029-10-07 02:32:01.0009"}, {"distinct_range": 0, "num_eq": 7524442445669144396, "num_range": 40000000000, "upper_bound": "2031-04-09 11:19:58.000071"}], "histo_col_type": "TIMESTAMP", "name": "__auto__", "null_count": 0, "row_count": 30000000000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 16927736624, "histo_col_type": "", "name": "__auto__", "null_count": 16205171195, "row_count": 30000000000}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 683862138, "histo_col_type": "", "name": "__auto__", "null_count": 27861010683, "row_count": 30000000000}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5325439468, "histo_col_type": "", "name": "__auto__", "null_count": 14728857330, "row_count": 30000000000}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 354662866602357221, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4861548989595057233}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3513668190176673257, "histo_buckets": [{"distinct_range": 0, "num_eq": 2404086328820875039, "num_range": 0, "upper_bound": "-Infinity"}, {"distinct_range": 1537780821104796000, "num_eq": 606323713079631735, "num_range": 2020818567999816758, "upper_bound": "-5.757732209556719935E+22"}, {"distinct_range": 1159805283951234600, "num_eq": 9000000000, "num_range": 1159805283951234529, "upper_bound": "-8725204622.224385765"}, {"distinct_range": 0, "num_eq": 5594207175930775477, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 500000000, "num_eq": 2096254470191406536, "num_range": 500000000, "upper_bound": "6.971325071694121809E+36"}], "histo_col_type": "DECIMAL", "name": "__auto__", "null_count": 0, "row_count": 4861548989595057233}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 191102214697104416, "histo_buckets": [{"distinct_range": 0, "num_eq": 40000000, "num_range": 0, "upper_bound": "0"}], "histo_col_type": "REGNAMESPACE", "name": "__auto__", "null_count": 0, "row_count": 4861548989595057233}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('lmizbo', 'ss', 'j');
        ;
    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/logTestRandomSyntaxSQLSmith494891384
--- FAIL: TestRandomSyntaxSQLSmith (300.66s)
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 @ 10abf6e8bc246ec5c8b32ddc973f434595a46e5b:

        LIMIT
        	45:::INT8;
    rsg_test.go:769: 290561 executions, 282280 successful
    rsg_test.go:580: To reproduce, use schema:
    rsg_test.go:582: 
        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 NAME, col1_1 JSONB NOT NULL, col1_2 CHAR NULL, col1_3 BOOL NOT NULL, col1_4 STRING NOT NULL AS (lower(CAST(col1_1 AS STRING))) VIRTUAL, col1_5 STRING NOT NULL AS (lower(CAST(col1_1 AS STRING))) STORED, UNIQUE (col1_0, col1_2, col1_5, col1_4 DESC, col1_3 DESC) STORING (col1_1), FAMILY (col1_2), FAMILY (col1_3, col1_1, col1_5, col1_0));
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 870636, "histo_col_type": "", "name": "__auto__", "null_count": 477601, "row_count": 900000}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 58960, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 900000}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 870169, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 900000}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 492334, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 900000}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 18213, "histo_buckets": [{"distinct_range": 0, "num_eq": 80000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 17486.327787726816, "num_eq": 5612958103276663310, "num_range": 100000, "upper_bound": "\\u0000"}, {"distinct_range": 447889670430270100, "num_eq": 10000000, "num_range": 959696195136632013, "upper_bound": "\\""}, {"distinct_range": 199151265.9568173, "num_eq": 5386107155574510992, "num_range": 400000000, "upper_bound": "7\\u001d8\\u0010\\\\\\u0003\\u0008n"}, {"distinct_range": 0, "num_eq": 5542762737482182514, "num_range": 2170087225533268788, "upper_bound": ">1\\u0008\\u0006Kw-"}, {"distinct_range": 4306053556857071000, "num_eq": 800, "num_range": 4306053556857071032, "upper_bound": "Pb\\u0001qmX\'f\\u0015"}, {"distinct_range": 5128272.041306937, "num_eq": 800000, "num_range": 7000000, "upper_bound": "q|$:\\u0018\\u0018?{k"}], "histo_col_type": "NAME", "name": "__auto__", "null_count": 709770, "row_count": 900000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 585363, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 900000}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('jtdxa', 'ek', 'ftry', 'd', 'ieoz');
        ;
    rsg_test.go:582: 
        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:584: 
    rsg_test.go:585: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith940070626
--- FAIL: TestRandomSyntaxSQLSmith (300.52s)
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 @ db3cdb8913ba56599cc52766411893438b5c4b54:

        		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 BOOL NOT NULL, col1_1 REGPROC NOT NULL, col1_2 VARCHAR NULL, col1_3 INET NULL, col1_4 INT4, col1_5 NAME, col1_6 NAME NOT NULL, PRIMARY KEY (col1_1 ASC), col1_7 STRING AS (lower(CAST(col1_0 AS STRING))) VIRTUAL, INDEX (col1_3, col1_7 ASC, col1_0 DESC, col1_1, col1_5 DESC, col1_4 DESC, col1_6 DESC), INDEX (col1_3 DESC, col1_2 ASC, col1_0 DESC, col1_5 ASC, col1_6 DESC, col1_4 DESC, col1_1) WHERE NOT table1.col1_0, INDEX (col1_7 ASC, col1_1 DESC, col1_5) STORING (col1_0, col1_3), UNIQUE (col1_7 ASC), UNIQUE (col1_2 ASC, col1_7 ASC, col1_5 ASC, col1_1 DESC, col1_3 DESC, col1_6 DESC, col1_4 ASC) WHERE ((((table1.col1_2 <= e'\x00':::STRING) AND (table1.col1_5 <= '':::STRING)) AND (table1.col1_6 > e'\'':::STRING)) OR (table1.col1_7 < '"':::STRING)) OR table1.col1_0, UNIQUE (col1_6, col1_5 ASC, col1_7 ASC, col1_1 DESC, col1_2 DESC, col1_0 ASC));
        CREATE TABLE table2 (col2_0 DECIMAL NOT NULL, col2_1 DATE NULL, col2_2 DECIMAL, col2_3 REGPROCEDURE NOT NULL, col2_4 CHAR, col2_5 REGPROCEDURE NOT NULL, col2_6 UUID NULL, col2_7 REGPROCEDURE, col2_8 DATE NULL, col2_9 TIME NOT NULL, col2_10 FLOAT8 NOT NULL, col2_11 STRING NOT NULL, col2_12 BIT(39), col2_13 NAME NULL, col2_14 FLOAT4 NULL, PRIMARY KEY (col2_11 ASC), col2_15 STRING AS (lower(CAST(col2_8 AS STRING))) STORED, col2_16 FLOAT8 NULL AS (col2_10 + 1.6056553242452571:::FLOAT8) STORED, col2_17 STRING NOT NULL AS (lower(col2_13)) VIRTUAL, UNIQUE (col2_13 DESC, col2_5, col2_7 ASC, col2_9, col2_11 ASC, col2_17 DESC, col2_4 DESC, col2_0) WHERE ((((table2.col2_10 >= 1.7976931348623157e+308:::FLOAT8) OR (table2.col2_9 < '24:00:00':::TIME)) OR (table2.col2_2 < '-Infinity':::DECIMAL)) AND (table2.col2_4 < '"':::STRING)) AND (table2.col2_1 <= '4714-11-24 BC':::DATE), UNIQUE (col2_15, col2_12, col2_4, col2_8 DESC, col2_3 DESC, col2_11 DESC, col2_5 DESC, col2_2, col2_16 ASC, col2_17 DESC, col2_0, col2_14 ASC, col2_9, col2_1 ASC, col2_6 DESC, col2_13, col2_10, col2_7 ASC) WHERE ((((((((((((table2.col2_16 = 'NaN':::FLOAT8) AND (table2.col2_0 < (-1.234E+401):::DECIMAL)) AND (table2.col2_2 > 'NaN':::DECIMAL)) AND (table2.col2_1 = '5874897-12-31':::DATE)) OR (table2.col2_11 = e'\U00002603':::STRING)) OR (table2.col2_15 = '"':::STRING)) AND (table2.col2_14 <= 0.0:::FLOAT8)) OR (table2.col2_17 <= e'\'':::STRING)) OR (table2.col2_8 > 'infinity':::DATE)) OR (table2.col2_10 > 3.4028234663852886e+38:::FLOAT8)) AND (table2.col2_4 >= e'\'':::STRING)) AND (table2.col2_9 >= '24:00:00':::TIME)) AND (table2.col2_13 = e'\x00':::STRING), INDEX (col2_7 DESC, col2_12, col2_14 ASC, col2_2 DESC, col2_17 ASC, col2_4, col2_1, col2_16 ASC, col2_8 ASC, col2_0 DESC) STORING (col2_3, col2_6, col2_13) WHERE (table2.col2_11 < '':::STRING) AND (table2.col2_4 = e'\x00':::STRING), UNIQUE (col2_10, col2_9 ASC, col2_5, col2_13 DESC, col2_7 ASC) STORING (col2_0, col2_2, col2_3, col2_4, col2_8, col2_14, col2_16) WHERE ((((((((((table2.col2_1 = '5874897-12-31':::DATE) OR (table2.col2_8 != 'infinity':::DATE)) AND (table2.col2_2 > (-1.234E+401):::DECIMAL)) AND (table2.col2_11 != e'\'':::STRING)) OR (table2.col2_10 >= '-Inf':::FLOAT8)) AND (table2.col2_9 > '24:00:00':::TIME)) AND (table2.col2_15 != '':::STRING)) OR (table2.col2_0 > '-Infinity':::DECIMAL)) AND (table2.col2_16 >= '+Inf':::FLOAT8)) OR (table2.col2_13 < e'\'':::STRING)) OR (table2.col2_17 != e'\'':::STRING), INDEX (col2_12 DESC, col2_6) STORING (col2_2, col2_3, col2_4, col2_7, col2_13, col2_14, col2_15), INDEX (col2_7 DESC, col2_2 DESC), UNIQUE (col2_3 ASC, col2_2, col2_13 ASC, col2_7 ASC, col2_5 DESC, col2_11 DESC, col2_10 ASC, col2_17 ASC, col2_15 DESC, col2_9, col2_4 DESC, col2_8 DESC), FAMILY (col2_16, col2_15, col2_9, col2_4), FAMILY (col2_11), FAMILY (col2_3), FAMILY (col2_6), FAMILY (col2_13), FAMILY (col2_8), FAMILY (col2_7), FAMILY (col2_12), FAMILY (col2_14), FAMILY (col2_5), FAMILY (col2_2), FAMILY (col2_10), FAMILY (col2_1, col2_0));
        CREATE TABLE table3 (col3_0 FLOAT4 NULL, INDEX (col3_0 DESC) WHERE table3.col3_0 = 'NaN':::FLOAT8, UNIQUE (col3_0) WHERE table3.col3_0 <= 0.0:::FLOAT8);
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5413136382630745, "histo_buckets": [{"distinct_range": 0, "num_eq": 8132426384355216747, "num_range": 0, "upper_bound": "\\u0002\\u0001"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 4670015270904008704, "row_count": 5527573858486917208}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 779463109754613044, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5527573858486917208}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2818560404502643783, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5527573858486917208}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 34182362578338137, "histo_buckets": [{"distinct_range": 0, "num_eq": 5000000000, "num_range": 0, "upper_bound": "/-l\\u001dO[N"}, {"distinct_range": 1846891747430483700, "num_eq": 200000000, "num_range": 7295834314725390182, "upper_bound": "0&\x7fWn?]@"}, {"distinct_range": 1572641763814000400, "num_eq": 6160526998635646942, "num_range": 1572641763814000505, "upper_bound": "HS\\u001e\\u0007+\\u0019"}, {"distinct_range": 0, "num_eq": 100000, "num_range": 0, "upper_bound": "V"}, {"distinct_range": 9000000000, "num_eq": 100, "num_range": 9000000000, "upper_bound": "b;\\u000f=\\u00173;PB"}, {"distinct_range": 0, "num_eq": 100000, "num_range": 2523634312288941941, "upper_bound": "t=0wB#^"}], "histo_col_type": "VARCHAR", "name": "__auto__", "null_count": 521038553416569881, "row_count": 5527573858486917208}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 110632728264703361, "histo_buckets": [{"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "0.0.0.0/0"}, {"distinct_range": 0, "num_eq": 415862241491240139, "num_range": 1000, "upper_bound": "89.255.73.74/29"}, {"distinct_range": 1253823700849999000, "num_eq": 7796660850253023218, "num_range": 1253823700849998979, "upper_bound": "cfa0:6bd1:7ff6:9e20:aeb0:6375:e2a9:2ad3/7"}, {"distinct_range": 0, "num_eq": 143490989274958668, "num_range": 7228067335690257453, "upper_bound": "6eae:211f:44ed:c8b4:917:cd57:bb6c:27a9/17"}, {"distinct_range": 0, "num_eq": 2000000, "num_range": 1062063323530679109, "upper_bound": "bab1:e50:92a0:925e:d5bf:fd8e:eeab:c536/17"}, {"distinct_range": 0, "num_eq": 9009725267336142159, "num_range": 0, "upper_bound": "f027:c155:faf6:e720:f512:cbe8:9305:15f/19"}], "histo_col_type": "INET", "name": "__auto__", "null_count": 2041282681422913929, "row_count": 5527573858486917208}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3571611062457728592, "histo_col_type": "", "name": "__auto__", "null_count": 514020950880857389, "row_count": 5527573858486917208}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1072707347220691283, "histo_col_type": "", "name": "__auto__", "null_count": 3435847179770334800, "row_count": 5527573858486917208}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 934642016969055979, "histo_buckets": [{"distinct_range": 0, "num_eq": 59295317012827810, "num_range": 0, "upper_bound": "\\u0005_g\\u0005"}, {"distinct_range": 2000000, "num_eq": 3856981620326130261, "num_range": 2000000, "upper_bound": "\\u000ch1t\\u0001"}, {"distinct_range": 10000, "num_eq": 5501325915756369794, "num_range": 10000, "upper_bound": "\\u0013#\x7f(CcRK"}, {"distinct_range": 70, "num_eq": 60000, "num_range": 70, "upper_bound": "\\u001c_g\\n=f\\u0012:\\r"}, {"distinct_range": 8952281956572165000, "num_eq": 0, "num_range": 8952281956572165127, "upper_bound": "#"}, {"distinct_range": 3674202123181219000, "num_eq": 50000000, "num_range": 4788828063679323534, "upper_bound": "=\\u000c*ME\\u000b"}, {"distinct_range": 0, "num_eq": 0, "num_range": 3388371376701325026, "upper_bound": "K7"}, {"distinct_range": 20000, "num_eq": 7000000000, "num_range": 20000, "upper_bound": "V"}, {"distinct_range": 5090444055518641000, "num_eq": 1533596037510090520, "num_range": 6298893578230493036, "upper_bound": "c\\n9I\\u001e\\u0003~\\u0010"}], "histo_col_type": "NAME", "name": "__auto__", "null_count": 0, "row_count": 5527573858486917208}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4705595513044430734, "histo_col_type": "", "name": "__auto__", "null_count": 3623113315377466927, "row_count": 7684272682251479816}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7093395687149926714, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7684272682251479816}, {"columns": ["col2_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5958119449171070347, "histo_buckets": [{"distinct_range": 0, "num_eq": 6761969414413114417, "num_range": 0, "upper_bound": ""}, {"distinct_range": 0, "num_eq": 6986033476740818672, "num_range": 8712339297225302168, "upper_bound": "7//l?=\\n/"}, {"distinct_range": 0, "num_eq": 1190529661363836954, "num_range": 3757043375391086551, "upper_bound": ":\\u0003\\u000ed\\rUd\\u0004\\u000e"}, {"distinct_range": 5.086919698311785, "num_eq": 60000, "num_range": 30, "upper_bound": "G"}, {"distinct_range": 0, "num_eq": 8277872239047138743, "num_range": 70, "upper_bound": "T"}, {"distinct_range": 729507243001615500, "num_eq": 30000000000, "num_range": 729507243001615542, "upper_bound": "X2K*h"}, {"distinct_range": 0, "num_eq": 1000, "num_range": 30000000, "upper_bound": "Y\\u0018\\u0010/\\"S"}, {"distinct_range": 8820135618.229092, "num_eq": 436522408799586752, "num_range": 20000000000, "upper_bound": "e"}, {"distinct_range": 0, "num_eq": 0, "num_range": 60, "upper_bound": "t\\u000en\\u0014\\u0008z\\u001b\\u001b"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 4783904656676069207, "row_count": 7684272682251479816}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1264143586826421938, "histo_col_type": "", "name": "__auto__", "null_count": 1975917012363652121, "row_count": 7684272682251479816}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1886854244487418025, "histo_col_type": "", "name": "__auto__", "null_count": 7067434973085021672, "row_count": 7684272682251479816}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7025884014779832069, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7684272682251479816}, {"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3010076689009716085, "histo_buckets": [{"distinct_range": 0, "num_eq": 10000000, "num_range": 0, "upper_bound": "-Inf"}, {"distinct_range": 50000000, "num_eq": 500000000, "num_range": 50000000, "upper_bound": "0.015748649187477953"}, {"distinct_range": 5699416645544936000, "num_eq": 60, "num_range": 6358037670296676328, "upper_bound": "0.9132511857936068"}, {"distinct_range": 0, "num_eq": 300000, "num_range": 0, "upper_bound": "1.064831840891309"}, {"distinct_range": 1289681817556761900, "num_eq": 4722406597053966572, "num_range": 1289681817556761784, "upper_bound": "1.261497672556962"}, {"distinct_range": 7537326348644125000, "num_eq": 100000000, "num_range": 7537326348644124216, "upper_bound": "1.5295720810198583"}, {"distinct_range": 5911300360750572000, "num_eq": 103739903505986605, "num_range": 5911300360750571425, "upper_bound": "3.4028234663852886e+38"}], "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 0, "row_count": 7684272682251479816}, {"columns": ["col2_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1471448879262562947, "histo_buckets": [{"distinct_range": 0, "num_eq": 100000, "num_range": 0, "upper_bound": "000000000000000000000000000000000000000"}, {"distinct_range": 1000, "num_eq": 4357812952970495033, "num_range": 1000, "upper_bound": "010001110100011000011000011011001010100"}, {"distinct_range": 30, "num_eq": 90, "num_range": 30, "upper_bound": "010111101001101110100101001100110110110"}, {"distinct_range": 1.102051775707412, "num_eq": 8231295037679290905, "num_range": 700, "upper_bound": "011111111111111111111111111111111111111"}, {"distinct_range": 0, "num_eq": 8179679886083221905, "num_range": 10, "upper_bound": "101001100110101001111000100001111000100"}, {"distinct_range": 0, "num_eq": 0, "num_range": 2649429448509939951, "upper_bound": "110111101011100011001011100000111000010"}, {"distinct_range": 0, "num_eq": 6000000000, "num_range": 0, "upper_bound": "111010010010111111010111100101110001010"}], "histo_col_type": "BIT(39)", "name": "__auto__", "null_count": 2563059151527808390, "row_count": 7684272682251479816}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 190220200381965575, "histo_col_type": "", "name": "__auto__", "null_count": 3920236621743948881, "row_count": 7684272682251479816}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2615263506838265510, "histo_buckets": [{"distinct_range": 0, "num_eq": 5635136192140107456, "num_range": 0, "upper_bound": "1108835777"}, {"distinct_range": 768865099392106400, "num_eq": 5476262543501956830, "num_range": 768865099392106356, "upper_bound": "1489342328"}, {"distinct_range": 0, "num_eq": 5000000, "num_range": 6517798208830015718, "upper_bound": "1986761691"}, {"distinct_range": 2007718414941863400, "num_eq": 700000000, "num_range": 2007718414941863406, "upper_bound": "2771459651"}, {"distinct_range": 0, "num_eq": 3049319852047324867, "num_range": 80000000000, "upper_bound": "2960833023"}, {"distinct_range": 4996232144136798000, "num_eq": 4302043121674335142, "num_range": 4996232144136798434, "upper_bound": "4041527601"}], "histo_col_type": "REGPROCEDURE", "name": "__auto__", "null_count": 0, "row_count": 7684272682251479816}, {"columns": ["col2_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4314501179670593771, "histo_col_type": "", "name": "__auto__", "null_count": 6646212093652661046, "row_count": 7684272682251479816}, {"columns": ["col2_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1767741705429321088, "histo_col_type": "", "name": "__auto__", "null_count": 71218998133392997, "row_count": 7684272682251479816}, {"columns": ["col2_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 594453575890294517, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7684272682251479816}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1374108629978722992, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7684272682251479816}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6581613838889875244, "histo_col_type": "", "name": "__auto__", "null_count": 4664389660538371642, "row_count": 7684272682251479816}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1931071067582486000, "histo_buckets": [{"distinct_range": 0, "num_eq": 7000000000, "num_range": 0, "upper_bound": "1223231391"}], "histo_col_type": "REGPROCEDURE", "name": "__auto__", "null_count": 5344761200464841211, "row_count": 7684272682251479816}, {"columns": ["col2_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2739509309696479475, "histo_buckets": [{"distinct_range": 0, "num_eq": 387323156208543435, "num_range": 0, "upper_bound": "\\u0012\\u0010,u;JRj"}, {"distinct_range": 98120866.4462361, "num_eq": 0, "num_range": 100000000, "upper_bound": "|\\u001cV``\\u0013,"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 7684272682251479816}, {"columns": ["col2_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3278368270008739025, "histo_col_type": "", "name": "__auto__", "null_count": 1171680158830694461, "row_count": 7684272682251479816}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS '[{"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6095618036, "histo_buckets": [{"distinct_range": 0, "num_eq": 400000, "num_range": 0, "upper_bound": "-1.3360867500305176"}, {"distinct_range": 6959519921877606000, "num_eq": 10, "num_range": 6959519921877605899, "upper_bound": "0.772406816482544"}], "histo_col_type": "FLOAT4", "name": "__auto__", "null_count": 46928527825, "row_count": 90000000000}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('mnj', 'td', 'quz', 'qa', 'vgfj');
        CREATE TYPE rand_typ_1 AS ENUM ('bndu', 'q', 'blxv', 'j', 'ptfje', 'aigejs');
        CREATE TYPE rand_typ_2 AS ENUM ('kgsfuc');
        CREATE TYPE rand_typ_3 AS ENUM ('bwvrq');
        CREATE TYPE rand_typ_4 AS ENUM ('ae', 'q', 'a', 'f', 'swzjf');
        ;
    rsg_test.go:582: 
        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:584: 
    rsg_test.go:585: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith769891690
--- FAIL: TestRandomSyntaxSQLSmith (300.62s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 547a1208b2bf09c2358f49dfca3259fa731aacc5:

        		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 UUID, col1_1 DECIMAL, col1_2 INT2 NULL, col1_3 REGPROC NULL, col1_4 GEOGRAPHY NOT NULL, col1_5 BOOL[] NULL, col1_6 BOOL, col1_7 BYTES, col1_8 INT2 NOT NULL, col1_9 REGCLASS NOT NULL, col1_10 DECIMAL NOT NULL AS (col1_1 + 60372996879.00917917:::DECIMAL) STORED, col1_11 STRING AS (lower(CAST(col1_3 AS STRING))) STORED, col1_12 INT2 NULL AS (col1_8 + col1_2) VIRTUAL, col1_13 DECIMAL AS (col1_1 + (-6.115655972703482122E+24):::DECIMAL) VIRTUAL, col1_14 INT2 AS (col1_8 + col1_2) VIRTUAL, col1_15 INT2 NULL AS (col1_8 + 5637:::INT8) VIRTUAL, INDEX (col1_3 DESC, col1_7 ASC, col1_6 ASC, col1_2 ASC));
        CREATE TABLE table2 (col2_0 BIT(32) NOT NULL, col2_1 FLOAT8, PRIMARY KEY (col2_0 DESC), INDEX (col2_0 DESC) WHERE table2.col2_1 <= 3.4028234663852886e+38:::FLOAT8, UNIQUE (col2_0) WHERE table2.col2_1 >= 5e-324:::FLOAT8, UNIQUE (col2_1 ASC, col2_0 DESC) WHERE table2.col2_1 = 'NaN':::FLOAT8, INDEX (col2_1 DESC, col2_0 ASC) WHERE table2.col2_1 = (-1.0):::FLOAT8);
        CREATE TABLE table3 (col3_0 BOOL NOT NULL, col3_1 FLOAT4 NOT NULL, col3_2 DECIMAL NOT NULL, col3_3 REGNAMESPACE NOT NULL, PRIMARY KEY (col3_2 ASC, col3_0 ASC, col3_3 DESC, col3_1), col3_4 FLOAT4 AS (col3_1 + (-0.7461748719215393):::FLOAT8) STORED, col3_5 STRING AS (lower(CAST(col3_0 AS STRING))) VIRTUAL, col3_6 DECIMAL NULL AS (col3_2 + (-4.445888923389739530E+36):::DECIMAL) VIRTUAL, INDEX (col3_5 DESC, col3_6 DESC, col3_2 DESC, col3_3 DESC, col3_4), UNIQUE (col3_4 DESC, col3_1, col3_0, col3_6, col3_2, col3_5 ASC), FAMILY (col3_2), FAMILY (col3_3, col3_0, col3_1), FAMILY (col3_4));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 22474261235, "histo_col_type": "", "name": "__auto__", "null_count": 26895400824, "row_count": 40000000000}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 22759562585, "histo_col_type": "", "name": "__auto__", "null_count": 21859678130, "row_count": 40000000000}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5317846869, "histo_col_type": "", "name": "__auto__", "null_count": 27163463737, "row_count": 40000000000}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 37669241869, "histo_col_type": "", "name": "__auto__", "null_count": 774643879, "row_count": 40000000000}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 25044152845, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 40000000000}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 23155062981, "histo_col_type": "", "name": "__auto__", "null_count": 5182529937, "row_count": 40000000000}, {"columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8977903940, "histo_col_type": "", "name": "__auto__", "null_count": 17677394120, "row_count": 40000000000}, {"columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 13494627453, "histo_col_type": "", "name": "__auto__", "null_count": 12142133212, "row_count": 40000000000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4977282895, "histo_col_type": "", "name": "__auto__", "null_count": 32228487841, "row_count": 40000000000}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 15457068303, "histo_buckets": [{"distinct_range": 0, "num_eq": 10000000000, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 6420623196858119000, "num_eq": 3277198491704878258, "num_range": 6420623196858119659, "upper_bound": "547970684"}, {"distinct_range": 3778708521970043400, "num_eq": 2000000000, "num_range": 3778708521970043428, "upper_bound": "871417303"}, {"distinct_range": 4177744850019641300, "num_eq": 9158621354895937582, "num_range": 7951674413260678606, "upper_bound": "2578203639"}, {"distinct_range": 5893534036688358000, "num_eq": 50, "num_range": 5893534036688358430, "upper_bound": "3105945140"}, {"distinct_range": 38937315.16584578, "num_eq": 3495873667686478605, "num_range": 1000000000, "upper_bound": "3167875106"}], "histo_col_type": "REGPROC", "name": "__auto__", "null_count": 27831803093, "row_count": 40000000000}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 15257617636, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 40000000000}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 16755217927, "histo_col_type": "", "name": "__auto__", "null_count": 15150226222, "row_count": 40000000000}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8862522419, "histo_col_type": "", "name": "__auto__", "null_count": 1732522665, "row_count": 40000000000}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31614958029, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 40000000000}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 487651474, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 40000000000}, {"columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 10815034804, "histo_col_type": "", "name": "__auto__", "null_count": 9568210949, "row_count": 40000000000}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1959499864962879233, "histo_col_type": "BIT(32)", "name": "__auto__", "null_count": 0, "row_count": 3221489525768270100}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1312460836471449256, "histo_buckets": [{"distinct_range": 0, "num_eq": 10000, "num_range": 0, "upper_bound": "-0.9511946467438398"}, {"distinct_range": 2634206916894682000, "num_eq": 8294614161477381845, "num_range": 6183053928334455444, "upper_bound": "1.0"}, {"distinct_range": 0, "num_eq": 500, "num_range": 0, "upper_bound": "1.040926238789694"}], "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 1125532817293552568, "row_count": 3221489525768270100}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS '[{"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 344, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 565, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 493, "histo_buckets": [{"distinct_range": 0, "num_eq": 70, "num_range": 0, "upper_bound": "-39417138016137990.23"}, {"distinct_range": 819398.7632046043, "num_eq": 2911788661990009885, "num_range": 900000, "upper_bound": "-6112285.97088247716"}, {"distinct_range": 50, "num_eq": 1790973022680280978, "num_range": 50, "upper_bound": "-0.07593008385743829418"}, {"distinct_range": 8105.5507607392165, "num_eq": 5214459838510761849, "num_range": 30000, "upper_bound": "3722679975358.813782"}, {"distinct_range": 64417701163840860, "num_eq": 40, "num_range": 1387498882508559286, "upper_bound": "64711120441161.25563"}, {"distinct_range": 0, "num_eq": 20, "num_range": 60000000, "upper_bound": "3.835431730023952956E+25"}], "histo_col_type": "DECIMAL", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 77, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8000}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4098, "histo_buckets": [{"distinct_range": 0, "num_eq": 7652473460665364092, "num_range": 0, "upper_bound": "0.6478779911994934"}], "histo_col_type": "FLOAT4", "name": "__auto__", "null_count": 5107, "row_count": 8000}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 644, "histo_col_type": "", "name": "__auto__", "null_count": 7571, "row_count": 8000}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4324, "histo_col_type": "", "name": "__auto__", "null_count": 7302, "row_count": 8000}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('oeny', 'bx', 'nzmu', 'wmtti', 'tcug');
        CREATE TYPE rand_typ_1 AS ENUM ('tktnq', 'udfzww', 'hfczli', 'hjnm');
        CREATE TYPE rand_typ_2 AS ENUM ('o');
        CREATE TYPE rand_typ_3 AS ENUM ('w', 'sdt');
        CREATE TYPE rand_typ_4 AS ENUM ('gapjr');
        ;
    rsg_test.go:582: 
        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:584: 
    rsg_test.go:585: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith849226716
--- FAIL: TestRandomSyntaxSQLSmith (334.08s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

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

        CREATE TABLE table3 (col3_0 REGTYPE NOT NULL, col3_1 TIMETZ NOT NULL, col3_2 JSONB NOT NULL, col3_3 STRING AS (lower(CAST(col3_1 AS STRING))) STORED);
        CREATE TABLE table4 (col4_0 FLOAT4 NULL, col4_1 INT8 NULL, col4_2 BOOL NOT NULL, col4_3 BIT(10) NULL, col4_4 GEOGRAPHY NULL, col4_5 BIT(22)[] NOT NULL, col4_6 OID NOT NULL, col4_7 DATE, col4_8 REGCLASS NULL, col4_9 FLOAT8 NOT NULL, col4_10 REGPROC NOT NULL, col4_11 "char", PRIMARY KEY (col4_10 DESC), col4_12 STRING NULL AS (lower(CAST(col4_3 AS STRING))) STORED, col4_13 STRING NULL AS (lower(CAST(col4_6 AS STRING))) VIRTUAL, UNIQUE (col4_9 ASC, col4_10 DESC), INDEX (col4_10, col4_7, col4_12 ASC) WHERE (((((((table4.col4_13 <= e'\x00':::STRING) AND (table4.col4_9 != '+Inf':::FLOAT8)) AND table4.col4_2) AND (table4.col4_12 != e'\U00002603':::STRING)) AND (table4.col4_1 > (-1):::INT8)) OR (table4.col4_11 = e'\U00002603':::STRING)) AND (table4.col4_0 = 1.0:::FLOAT8)) OR (table4.col4_7 = 'infinity':::DATE), UNIQUE (col4_8 ASC, col4_1 DESC, col4_6) STORING (col4_5, col4_7, col4_9, col4_12));
        CREATE TABLE table5 (col5_0 "char" NOT NULL, col5_1 INT4 NULL, col5_2 BIT(27) NULL, col5_3 GEOMETRY NOT NULL, col5_4 BOOL NOT NULL, col5_5 BOOL, col5_6 INT8 NULL, col5_7 STRING NOT NULL, col5_8 JSONB NOT NULL, col5_9 OID, col5_10 REGNAMESPACE NOT NULL, col5_11 VARCHAR, col5_12 NAME NOT NULL, col5_13 INT8 NOT NULL AS (col5_6 + col5_1) VIRTUAL, col5_14 INT8 NOT NULL AS (col5_6 + col5_1) VIRTUAL, col5_15 INT8 AS (col5_6 + col5_1) VIRTUAL, col5_16 INT4 NULL AS (col5_1 + col5_6) VIRTUAL, col5_17 INT4 AS (col5_1 + col5_6) STORED, col5_18 INT4 NOT NULL AS (col5_1 + col5_6) STORED);
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3130852923147863723, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 711548759544061954, "histo_col_type": "", "name": "__auto__", "null_count": 3026663286922864399, "row_count": 7050112537371517504}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6497731984783338335, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 234514882487258104, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2593556967643561980, "histo_col_type": "", "name": "__auto__", "null_count": 1077069136010207942, "row_count": 7050112537371517504}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 793227748674039214, "histo_col_type": "", "name": "__auto__", "null_count": 5724589917051879748, "row_count": 7050112537371517504}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 423355291544921030, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4498228992734877284, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4609456470561451467, "histo_buckets": [{"distinct_range": 0, "num_eq": 50000000000, "num_range": 0, "upper_bound": ""}, {"distinct_range": 2459206.3235536437, "num_eq": 6000000000, "num_range": 3000000, "upper_bound": "\\u0008H\\u00170\\u0014"}, {"distinct_range": 6093942705082023000, "num_eq": 100000000, "num_range": 6093942705082022485, "upper_bound": "\\u00189\\\\\\n"}, {"distinct_range": 57.23651916577246, "num_eq": 100000, "num_range": 100, "upper_bound": ",d,Jk"}, {"distinct_range": 5496178090492109000, "num_eq": 7724028904302530830, "num_range": 5496178090492108394, "upper_bound": "6"}, {"distinct_range": 2657720258102549500, "num_eq": 5906396551658507531, "num_range": 2657720258102549353, "upper_bound": "AF"}, {"distinct_range": 1237.5676121933384, "num_eq": 600000000, "num_range": 10000, "upper_bound": "X"}, {"distinct_range": 502977786118253900, "num_eq": 1509989969600078044, "num_range": 502977786118253876, "upper_bound": "h#tUBQ\\u001f"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 1224960619921350389, "row_count": 7050112537371517504}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 400104336361488953, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5411720784417069997, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3975542588238871662, "histo_col_type": "", "name": "__auto__", "null_count": 996592409314257395, "row_count": 7050112537371517504}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4541039872624815436, "histo_col_type": "", "name": "__auto__", "null_count": 2949172541212664904, "row_count": 7050112537371517504}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4738634170234248746, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 642275322995854611, "histo_buckets": [{"distinct_range": 0, "num_eq": 300, "num_range": 0, "upper_bound": "\\u0002"}, {"distinct_range": 0, "num_eq": 90000000000, "num_range": 4970481867056205833, "upper_bound": "*@\\u0011h-EW6["}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5649886855575141951, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7050112537371517504}, {"columns": ["col1_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6198355938947874843, "histo_col_type": "", "name": "__auto__", "null_count": 4389123813844688361, "row_count": 7050112537371517504}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 902531751360103695, "histo_col_type": "", "name": "__auto__", "null_count": 1289327858719219538, "row_count": 3015867756887652550}, {"columns": ["col2_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2885156578920873693, "histo_col_type": "", "name": "__auto__", "null_count": 2330755794382990539, "row_count": 3015867756887652550}, {"columns": ["col2_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 157965949370621772, "histo_col_type": "", "name": "__auto__", "null_count": 111076167758582890, "row_count": 3015867756887652550}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1999065422776732865, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3015867756887652550}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 373206278803313526, "histo_col_type": "", "name": "__auto__", "null_count": 116952429171571564, "row_count": 3015867756887652550}, {"columns": ["col2_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2680321451922291325, "histo_col_type": "", "name": "__auto__", "null_count": 856305379068326396, "row_count": 3015867756887652550}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2349126641163799313, "histo_col_type": "", "name": "__auto__", "null_count": 2601424692727286034, "row_count": 3015867756887652550}, {"columns": ["col2_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1336089048723728896, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3015867756887652550}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2684297418319695925, "histo_col_type": "", "name": "__auto__", "null_count": 2940643966038297106, "row_count": 3015867756887652550}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2453397623006632413, "histo_col_type": "", "name": "__auto__", "null_count": 612202220389388444, "row_count": 3015867756887652550}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2871433797253082816, "histo_buckets": [{"distinct_range": 0, "num_eq": 40000, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 0, "num_eq": 6895989695000051105, "num_range": 80, "upper_bound": "199072646"}, {"distinct_range": 900000000, "num_eq": 1924074116995420926, "num_range": 900000000, "upper_bound": "311709595"}, {"distinct_range": 40, "num_eq": 0, "num_range": 40, "upper_bound": "1250929778"}, {"distinct_range": 0, "num_eq": 400000, "num_range": 30, "upper_bound": "2193867796"}, {"distinct_range": 3123756859494482000, "num_eq": 6000, "num_range": 3123756859494481859, "upper_bound": "3274151908"}], "histo_col_type": "REGPROCEDURE", "name": "__auto__", "null_count": 0, "row_count": 3015867756887652550}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2414069765155789357, "histo_col_type": "", "name": "__auto__", "null_count": 56986881440015535, "row_count": 3015867756887652550}, {"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1655760043450164033, "histo_col_type": "", "name": "__auto__", "null_count": 1903259950175353332, "row_count": 3015867756887652550}, {"columns": ["col2_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 435736550714940554, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3015867756887652550}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 299216892138285486, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3015867756887652550}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 824360493654675936, "histo_col_type": "", "name": "__auto__", "null_count": 1634376561119494553, "row_count": 3015867756887652550}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS '[{"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3407, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10000}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4964, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10000}, {"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3025, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 10000}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3914, "histo_col_type": "", "name": "__auto__", "null_count": 7266, "row_count": 10000}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS '[{"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4138194239767244797, "histo_col_type": "", "name": "__auto__", "null_count": 4036629949091392669, "row_count": 4246573564705730253}, {"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3416598054880187128, "histo_col_type": "", "name": "__auto__", "null_count": 2738082130919366681, "row_count": 4246573564705730253}, {"columns": ["col4_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4097767554096613899, "histo_col_type": "", "name": "__auto__", "null_count": 2468399913341540613, "row_count": 4246573564705730253}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1032671548659522687, "histo_col_type": "", "name": "__auto__", "null_count": 3616464761365255993, "row_count": 4246573564705730253}, {"columns": ["col4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3462561338175664064, "histo_col_type": "", "name": "__auto__", "null_count": 986609500865577525, "row_count": 4246573564705730253}, {"columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2964574889330261320, "histo_col_type": "", "name": "__auto__", "null_count": 1638784441372585700, "row_count": 4246573564705730253}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1643090590068690379, "histo_col_type": "", "name": "__auto__", "null_count": 425268523552745074, "row_count": 4246573564705730253}, {"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2055463014354875044, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4246573564705730253}, {"columns": ["col4_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 996724847480793889, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4246573564705730253}, {"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 48946228668048251, "histo_buckets": [{"distinct_range": 0, "num_eq": 400000000, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 0, "num_eq": 381067387961442681, "num_range": 5724860110681208003, "upper_bound": "153720554"}, {"distinct_range": 1081023136653716100, "num_eq": 40000000, "num_range": 5632275320160269877, "upper_bound": "1424838316"}, {"distinct_range": 100000, "num_eq": 10000000000, "num_range": 100000, "upper_bound": "2316104232"}, {"distinct_range": 0, "num_eq": 9000000, "num_range": 600000000, "upper_bound": "3470381254"}, {"distinct_range": 36309894639091410, "num_eq": 3113832482752663249, "num_range": 36309894639091409, "upper_bound": "4281516854"}], "histo_col_type": "REGCLASS", "name": "__auto__", "null_count": 3417285501681107075, "row_count": 4246573564705730253}, {"columns": ["col4_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1843342868897878045, "histo_buckets": [{"distinct_range": 0, "num_eq": 3882523783415768395, "num_range": 0, "upper_bound": "538895294"}, {"distinct_range": 3000000000, "num_eq": 1370967209974444243, "num_range": 3000000000, "upper_bound": "1085114858"}, {"distinct_range": 600000000, "num_eq": 7644473333603256511, "num_range": 600000000, "upper_bound": "1622201394"}, {"distinct_range": 0, "num_eq": 8037425269506455657, "num_range": 30000000000, "upper_bound": "2494942220"}, {"distinct_range": 0, "num_eq": 5085581489328856211, "num_range": 100000000000, "upper_bound": "4167867993"}], "histo_col_type": "REGPROC", "name": "__auto__", "null_count": 0, "row_count": 4246573564705730253}, {"columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2865261961153392763, "histo_col_type": "", "name": "__auto__", "null_count": 3215995781153785299, "row_count": 4246573564705730253}, {"columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2305045543534091072, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4246573564705730253}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4011247209502835612, "histo_buckets": [{"distinct_range": 0, "num_eq": 4101179018120245722, "num_range": 0, "upper_bound": "-0.3768129882022251"}, {"distinct_range": 3791270115135582700, "num_eq": 50000, "num_range": 3791270115135582609, "upper_bound": "-0.1048543156767559"}, {"distinct_range": 0, "num_eq": 900000, "num_range": 9000000000, "upper_bound": "-0.01881902878961994"}, {"distinct_range": 2394366467996794400, "num_eq": 300, "num_range": 2394366467996794197, "upper_bound": "1.401298464324817e-45"}, {"distinct_range": 205988993228045630, "num_eq": 0, "num_range": 341898304969586972, "upper_bound": "0.2805918281332471"}, {"distinct_range": 2369298216963958300, "num_eq": 90000000000, "num_range": 7505710972500198369, "upper_bound": "0.3457244641461346"}, {"distinct_range": 0, "num_eq": 2348460947094542937, "num_range": 6177401055883999252, "upper_bound": "0.40836980782329124"}, {"distinct_range": 0, "num_eq": 50000, "num_range": 2991296350331410920, "upper_bound": "1.4736484349843568"}], "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 0, "row_count": 4246573564705730253}]':::JSONB;
        ALTER TABLE table5 INJECT STATISTICS '[{"columns": ["col5_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3402771449901402798, "histo_col_type": "", "name": "__auto__", "null_count": 662531823032264482, "row_count": 6191750073377857115}, {"columns": ["col5_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4298618615348707050, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4811078986150179309, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3767571914504034515, "histo_col_type": "", "name": "__auto__", "null_count": 4545089142297891749, "row_count": 6191750073377857115}, {"columns": ["col5_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3435665946398064473, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3552864008639424886, "histo_col_type": "", "name": "__auto__", "null_count": 826842930078445807, "row_count": 6191750073377857115}, {"columns": ["col5_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 305190626795592672, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3037184306871492995, "histo_col_type": "", "name": "__auto__", "null_count": 2632743040828312437, "row_count": 6191750073377857115}, {"columns": ["col5_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1466290448811919022, "histo_col_type": "", "name": "__auto__", "null_count": 1887194800529594614, "row_count": 6191750073377857115}, {"columns": ["col5_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5663254428841174481, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2983699715418017726, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_18"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 838757411458280103, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5253254116725369550, "histo_col_type": "", "name": "__auto__", "null_count": 1045843149144130888, "row_count": 6191750073377857115}, {"columns": ["col5_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1702823890283542291, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6084144784352399319, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4469229116331305089, "histo_col_type": "", "name": "__auto__", "null_count": 466858916274875165, "row_count": 6191750073377857115}, {"columns": ["col5_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3952878898178227119, "histo_col_type": "", "name": "__auto__", "null_count": 128323398994583295, "row_count": 6191750073377857115}, {"columns": ["col5_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 315498909673293648, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6191750073377857115}, {"columns": ["col5_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1647790634246396399, "histo_col_type": "", "name": "__auto__", "null_count": 140403122602941986, "row_count": 6191750073377857115}]':::JSONB;
        ALTER TABLE table5 ADD FOREIGN KEY (col5_12) REFERENCES table1 (col1_9) ON UPDATE CASCADE;
        CREATE TYPE rand_typ_0 AS ENUM ('ev');
        CREATE TYPE rand_typ_1 AS ENUM ('cia', 'nja', 'trx');
        CREATE TYPE rand_typ_2 AS ENUM ('phel', 'qfnc', 's');
        CREATE TYPE rand_typ_3 AS ENUM ('uemzxz', 'rzhx', 'u', 'ctl', 'rmuf');
        CREATE TYPE rand_typ_4 AS ENUM ('wioxr', 'u');
        ;
    rsg_test.go:582: 
        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:584: 
    rsg_test.go:585: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith299141652
--- FAIL: TestRandomSyntaxSQLSmith (300.71s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 03b83e02502e8876ecb366659156ab00f7431a51:

        		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 TIMESTAMPTZ NULL, col1_2 STRING AS (lower(CAST(col1_0 AS STRING))) VIRTUAL, FAMILY (col1_0, col1_1));
        CREATE TABLE table2 (col2_0 BIT(4) NULL, col2_1 NAME NOT NULL, col2_2 TIMETZ NULL, col2_3 INT2, col2_4 TIMESTAMP, col2_5 DATE[] NULL, col2_6 JSONB NOT NULL, col2_7 GEOMETRY, col2_8 GEOGRAPHY, col2_9 REGNAMESPACE NOT NULL, col2_10 "char" NULL, col2_11 STRING, col2_12 STRING NULL AS (lower(col2_11)) VIRTUAL, col2_13 STRING NULL AS (lower(CAST(col2_7 AS STRING))) STORED, col2_14 STRING NOT NULL AS (lower(CAST(col2_0 AS STRING))) STORED, col2_15 STRING AS (lower(CAST(col2_4 AS STRING))) STORED, col2_16 STRING NULL AS (lower(CAST(col2_7 AS STRING))) VIRTUAL, col2_17 STRING AS (lower(CAST(col2_2 AS STRING))) VIRTUAL, col2_18 STRING NOT NULL AS (lower(col2_1)) VIRTUAL, UNIQUE (col2_3), UNIQUE (col2_3, col2_9));
        CREATE TABLE table3 (col3_0 INT2 NOT NULL, col3_1 REGTYPE NOT NULL, col3_2 REGTYPE NOT NULL, col3_3 INET NOT NULL, col3_4 INT4 NOT NULL, col3_5 BYTES NOT NULL, col3_6 BOOL NOT NULL, col3_7 DECIMAL NOT NULL, col3_8 TIMESTAMPTZ, col3_9 INT8 NOT NULL, PRIMARY KEY (col3_4, col3_7 ASC, col3_9, col3_2 ASC, col3_6, col3_5 ASC, col3_0 ASC, col3_1 ASC, col3_3 DESC), col3_10 STRING NULL AS (lower(CAST(col3_3 AS STRING))) STORED, UNIQUE (col3_1 DESC, col3_2 DESC, col3_0, col3_10 DESC, col3_9, col3_5 ASC, col3_8, col3_3, col3_7 ASC, col3_4 DESC, col3_6) WHERE (((((((table3.col3_8 < '3000-01-01 00:00:00+00:00':::TIMESTAMPTZ) OR (table3.col3_9 <= (-2147483648):::INT8)) OR (table3.col3_4 >= (-32768):::INT8)) AND (table3.col3_10 > 'X':::STRING)) AND (table3.col3_5 < '\xff':::BYTES)) OR (NOT table3.col3_6)) OR (table3.col3_7 <= (-1.234E+401):::DECIMAL)) AND (table3.col3_0 != (-1):::INT8), UNIQUE (col3_7 ASC, col3_3 ASC), UNIQUE (col3_5 DESC, col3_8 DESC, col3_10 DESC, col3_2 ASC, col3_1 DESC, col3_4 ASC, col3_9 ASC) WHERE table3.col3_4 < 0:::INT8, UNIQUE (col3_3, col3_7 DESC, col3_10, col3_2 DESC, col3_1 ASC, col3_0 DESC, col3_8), UNIQUE (col3_5, col3_7 DESC, col3_10, col3_8 DESC, col3_9 ASC, col3_0 ASC, col3_3 ASC), INDEX (col3_1 ASC, col3_8, col3_10 DESC, col3_4 DESC, col3_2, col3_6 DESC, col3_5 ASC), INDEX (col3_10 ASC, col3_5, col3_9 DESC, col3_7 ASC, col3_4, col3_1, col3_2 DESC, col3_0 ASC) WHERE (((((((table3.col3_10 >= e'\'':::STRING) AND (table3.col3_7 != 1:::DECIMAL)) OR (table3.col3_5 != '\xff':::BYTES)) OR (table3.col3_0 < 127:::INT8)) AND table3.col3_6) OR (table3.col3_4 != (-32768):::INT8)) AND (table3.col3_9 <= 0:::INT8)) AND (table3.col3_8 != '0001-01-01 00:00:00+00:00':::TIMESTAMPTZ), UNIQUE (col3_0 ASC, col3_3 DESC, col3_9 DESC, col3_1, col3_4 ASC, col3_7 ASC, col3_5 ASC, col3_8 DESC, col3_10, col3_2 DESC, col3_6), UNIQUE (col3_9 ASC, col3_2 DESC, col3_8 ASC, col3_3 ASC, col3_7 DESC, col3_4 DESC, col3_6 ASC, col3_1 DESC, col3_5 DESC) STORING (col3_10) WHERE table3.col3_6 OR (table3.col3_7 < (-1.234E+401):::DECIMAL));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 22, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 70}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 18, "histo_col_type": "", "name": "__auto__", "null_count": 65, "row_count": 70}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7, "histo_col_type": "", "name": "__auto__", "null_count": 62, "row_count": 70}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 235877995312528105, "histo_col_type": "", "name": "__auto__", "null_count": 81299393096787664, "row_count": 1318798514148844559}, {"columns": ["col2_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1194845817933082006, "histo_col_type": "", "name": "__auto__", "null_count": 614117739802021016, "row_count": 1318798514148844559}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 640232448407999446, "histo_col_type": "", "name": "__auto__", "null_count": 1005086434075921321, "row_count": 1318798514148844559}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 645672300238966398, "histo_col_type": "", "name": "__auto__", "null_count": 297227559904996776, "row_count": 1318798514148844559}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1315936693440818300, "histo_col_type": "", "name": "__auto__", "null_count": 221648855716883780, "row_count": 1318798514148844559}, {"columns": ["col2_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 939456109947931145, "histo_col_type": "", "name": "__auto__", "null_count": 651581043601209568, "row_count": 1318798514148844559}, {"columns": ["col2_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 698146135390136912, "histo_col_type": "", "name": "__auto__", "null_count": 54164450607278555, "row_count": 1318798514148844559}, {"columns": ["col2_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 862657679702917377, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1318798514148844559}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1094398415458183756, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1318798514148844559}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1076816947021275509, "histo_col_type": "", "name": "__auto__", "null_count": 711160881615207445, "row_count": 1318798514148844559}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 256620070732676437, "histo_col_type": "", "name": "__auto__", "null_count": 407332467137710104, "row_count": 1318798514148844559}, {"columns": ["col2_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 506677555721958852, "histo_col_type": "", "name": "__auto__", "null_count": 18267405247145918, "row_count": 1318798514148844559}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 226175654713726660, "histo_col_type": "", "name": "__auto__", "null_count": 672211808894721584, "row_count": 1318798514148844559}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1281765917101388923, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1318798514148844559}, {"columns": ["col2_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 223076875182909429, "histo_col_type": "", "name": "__auto__", "null_count": 499600193473269312, "row_count": 1318798514148844559}, {"columns": ["col2_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 577025008967573787, "histo_col_type": "", "name": "__auto__", "null_count": 1081079893464755841, "row_count": 1318798514148844559}, {"columns": ["col2_18"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 877213828207630324, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1318798514148844559}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 944523554534621242, "histo_col_type": "", "name": "__auto__", "null_count": 294825875569183592, "row_count": 1318798514148844559}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 317874735281937880, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1318798514148844559}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS e'[{"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2356720892856891232, "histo_col_type": "INT2", "name": "__auto__", "null_count": 0, "row_count": 2745611925255037248}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1290146688622026507, "histo_buckets": [{"distinct_range": 0, "num_eq": 30, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 149651843503476320, "num_eq": 70000000, "num_range": 149651843503476313, "upper_bound": "153111140"}, {"distinct_range": 1967234853882214700, "num_eq": 8852022537944213097, "num_range": 1967234853882214588, "upper_bound": "897405994"}, {"distinct_range": 3713.9171739219964, "num_eq": 5863964261394822978, "num_range": 6000, "upper_bound": "1117481820"}, {"distinct_range": 2017152599414285300, "num_eq": 2619488869692112856, "num_range": 4552008168305885755, "upper_bound": "2076535210"}], "histo_col_type": "REGTYPE", "name": "__auto__", "null_count": 0, "row_count": 2745611925255037248}, {"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1525514426343323740, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2745611925255037248}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2105983172251105934, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2745611925255037248}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2499259819263202372, "histo_col_type": "", "name": "__auto__", "null_count": 454655530897487050, "row_count": 2745611925255037248}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2483432328730608395, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2745611925255037248}, {"columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 134527904660402165, "histo_col_type": "STRING", "name": "__auto__", "null_count": 2518217770972098236, "row_count": 2745611925255037248}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2719248279010913111, "histo_buckets": [{"distinct_range": 0, "num_eq": 7000000, "num_range": 0, "upper_bound": "181.66.25.96/5"}, {"distinct_range": 0, "num_eq": 3365078941527862429, "num_range": 100000000, "upper_bound": "208.239.79.184/10"}, {"distinct_range": 5482620832514894000, "num_eq": 6133368634114655867, "num_range": 5482620832514893879, "upper_bound": "116.112.186.223/12"}, {"distinct_range": 0, "num_eq": 40000000, "num_range": 400000000, "upper_bound": "148.13.92.164/16"}, {"distinct_range": 16.68902893294304, "num_eq": 20, "num_range": 20, "upper_bound": "192.225.77.204/20"}, {"distinct_range": 100000000000, "num_eq": 10000000000, "num_range": 100000000000, "upper_bound": "55.152.29.195/21"}, {"distinct_range": 4776057861622809000, "num_eq": 6000, "num_range": 4894479385603571657, "upper_bound": "d7dd:a1ed:4ce2:6481:50ac:eb6:3318:de48/77"}], "histo_col_type": "INET", "name": "__auto__", "null_count": 0, "row_count": 2745611925255037248}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1901828856097580246, "histo_buckets": [{"distinct_range": 0, "num_eq": 7957625938145871859, "num_range": 0, "upper_bound": "-1814678650"}, {"distinct_range": 8941139387927970000, "num_eq": 4217116774373766427, "num_range": 9131104794030388826, "upper_bound": "-1065743897"}, {"distinct_range": 4203467271623022000, "num_eq": 50, "num_range": 4479458190271210956, "upper_bound": "-1035238360"}, {"distinct_range": 291284041794269250, "num_eq": 300000, "num_range": 688555043163923629, "upper_bound": "-754012513"}, {"distinct_range": 6227832169463825000, "num_eq": 100, "num_range": 6227832169463825826, "upper_bound": "-25499039"}, {"distinct_range": 3457629313191753700, "num_eq": 8000, "num_range": 3457629313191753535, "upper_bound": "1705037514"}], "histo_col_type": "INT4", "name": "__auto__", "null_count": 0, "row_count": 2745611925255037248}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1889750048119316631, "histo_buckets": [{"distinct_range": 0, "num_eq": 8872823106814320301, "num_range": 0, "upper_bound": "\\\\x08d998fdea"}, {"distinct_range": 693528002390585300, "num_eq": 2189367563706088909, "num_range": 1319931465816886744, "upper_bound": "\\\\x22"}, {"distinct_range": 1096218778137179900, "num_eq": 8117598126540133175, "num_range": 1096218778137179858, "upper_bound": "\\\\x6700dc60791e08"}, {"distinct_range": 0, "num_eq": 5447546622596204846, "num_range": 688961530505838626, "upper_bound": "\\\\x744078"}, {"distinct_range": 0, "num_eq": 845313643797234468, "num_range": 700000, "upper_bound": "\\\\x8f"}, {"distinct_range": 0, "num_eq": 40, "num_range": 0, "upper_bound": "\\\\x9871bb"}, {"distinct_range": 0, "num_eq": 600000, "num_range": 9191989651241547137, "upper_bound": "\\\\x993b81"}, {"distinct_range": 519484958857328260, "num_eq": 7158679980402988528, "num_range": 3230206801019415930, "upper_bound": "\\\\xc50688045fae89"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 2745611925255037248}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1616225504477029677, "histo_buckets": [{"distinct_range": 0, "num_eq": 900, "num_range": 0, "upper_bound": "2.202624335400050653E+29"}, {"distinct_range": 0, "num_eq": 50, "num_range": 0, "upper_bound": "6.641547618132780328E+36"}], "histo_col_type": "DECIMAL", "name": "__auto__", "null_count": 0, "row_count": 2745611925255037248}]':::JSONB;
        ALTER TABLE table3 ADD FOREIGN KEY (col3_9) REFERENCES table2 (col2_3) ON UPDATE RESTRICT;
        ALTER TABLE table3 ADD FOREIGN KEY (col3_4, col3_1) REFERENCES table2 (col2_3, col2_9);
        CREATE TYPE rand_typ_0 AS ENUM ('ld', 'tzdm', 'aob');
        CREATE TYPE rand_typ_1 AS ENUM ('eznuw', 'p', 'lumkio');
        CREATE TYPE rand_typ_2 AS ENUM ('lsfarf', 'rffdf', 'ilosu', 'g', 'a');
        ;
    rsg_test.go:582: 
        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:584: 
    rsg_test.go:585: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith342099435
--- FAIL: TestRandomSyntaxSQLSmith (300.79s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 2bf78f3f1f2d34502ab0ae884d505e08f3bd8648:

    rsg_test.go:580: To reproduce, use schema:
    rsg_test.go:582: 
        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 REGCLASS NULL, col1_1 INT2 NOT NULL, col1_2 REGNAMESPACE NOT NULL, col1_3 BYTES NULL, col1_4 INET, col1_5 REGNAMESPACE NOT NULL, col1_6 STRING NULL, col1_7 NAME NULL, col1_8 OID[] NULL, col1_9 REGNAMESPACE, col1_10 BYTES, col1_11 FLOAT8 NOT NULL, col1_12 "char" NULL, col1_13 INTERVAL, col1_14 STRING NULL AS (lower(col1_7)) VIRTUAL, col1_15 STRING AS (lower(CAST(col1_0 AS STRING))) STORED, col1_16 STRING AS (lower(col1_12)) VIRTUAL, col1_17 STRING AS (lower(CAST(col1_9 AS STRING))) VIRTUAL, col1_18 STRING NOT NULL AS (lower(CAST(col1_5 AS STRING))) VIRTUAL, UNIQUE (col1_18) STORING (col1_0, col1_2, col1_6, col1_7, col1_10, col1_11, col1_13), UNIQUE (col1_13 ASC, col1_2 DESC, col1_12 ASC, col1_9, col1_1, col1_18 ASC, col1_3 ASC, col1_10, col1_0), UNIQUE (col1_0 DESC, col1_14 DESC, col1_6 ASC, col1_4 DESC, col1_13 DESC, col1_3 ASC, col1_5 ASC, col1_17 DESC, col1_7 ASC, col1_11, col1_16 ASC) STORING (col1_9), INDEX (col1_3 DESC, col1_16, col1_17 ASC), FAMILY (col1_3), FAMILY (col1_15, col1_6), FAMILY (col1_4), FAMILY (col1_11), FAMILY (col1_10, col1_7, col1_2, col1_13), FAMILY (col1_0), FAMILY (col1_5, col1_8, col1_1), FAMILY (col1_9), FAMILY (col1_12));
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 235, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 50000}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 40790, "histo_col_type": "", "name": "__auto__", "null_count": 33177, "row_count": 50000}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 49310, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 50000}, {"columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 9003, "histo_col_type": "", "name": "__auto__", "null_count": 9383, "row_count": 50000}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 10741, "histo_col_type": "", "name": "__auto__", "null_count": 28582, "row_count": 50000}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8893, "histo_col_type": "", "name": "__auto__", "null_count": 34056, "row_count": 50000}, {"columns": ["col1_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 26728, "histo_col_type": "", "name": "__auto__", "null_count": 14849, "row_count": 50000}, {"columns": ["col1_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 9022, "histo_col_type": "", "name": "__auto__", "null_count": 42263, "row_count": 50000}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 740, "histo_col_type": "", "name": "__auto__", "null_count": 23368, "row_count": 50000}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 35273, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 50000}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31551, "histo_buckets": [{"distinct_range": 0, "num_eq": 700, "num_range": 0, "upper_bound": "\\\\x12047dfdfec4b758"}, {"distinct_range": 0, "num_eq": 100000000000, "num_range": 20000000000, "upper_bound": "\\\\x262133"}, {"distinct_range": 0, "num_eq": 7000000, "num_range": 1036495233841290440, "upper_bound": "\\\\x2f1fc4"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 41072, "row_count": 50000}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 42781, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 50000}, {"columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 23852, "histo_col_type": "", "name": "__auto__", "null_count": 33081, "row_count": 50000}, {"columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 46828, "histo_col_type": "", "name": "__auto__", "null_count": 22266, "row_count": 50000}, {"columns": ["col1_18"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 29232, "histo_buckets": [{"distinct_range": 0, "num_eq": 8640913130993088146, "num_range": 0, "upper_bound": "\\u000c"}, {"distinct_range": 800000000, "num_eq": 400000000, "num_range": 800000000, "upper_bound": "*\\u0017\\u000f!\\\\o\\u0012X\\\\"}, {"distinct_range": 117240.20460025675, "num_eq": 600000, "num_range": 600000, "upper_bound": "6*F\\u000f``"}, {"distinct_range": 755896478.5477613, "num_eq": 5108075212577879934, "num_range": 800000000, "upper_bound": "B\\u0019\\u000f|\\u000bjD,9"}, {"distinct_range": 3195513889375625000, "num_eq": 1000000, "num_range": 6592461455834222979, "upper_bound": "I"}, {"distinct_range": 600000000, "num_eq": 50000000000, "num_range": 600000000, "upper_bound": "MAu"}, {"distinct_range": 0, "num_eq": 5608595841975457953, "num_range": 6057463467036066824, "upper_bound": "\U00002603"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 50000}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 16482, "histo_col_type": "", "name": "__auto__", "null_count": 16130, "row_count": 50000}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 36508, "histo_col_type": "", "name": "__auto__", "null_count": 14241, "row_count": 50000}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 41660, "histo_col_type": "", "name": "__auto__", "null_count": 31947, "row_count": 50000}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 26426, "histo_col_type": "", "name": "__auto__", "null_count": 40193, "row_count": 50000}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('g', 'lcdyfw', 'baprpb', 'yxg', 'qbpsdx');
        CREATE TYPE rand_typ_1 AS ENUM ('ctew', 'vyhw', 'fx', 'ysl', 'ztqxj', 'lrxo');
        CREATE TYPE rand_typ_2 AS ENUM ('zz');
        CREATE TYPE rand_typ_3 AS ENUM ('arbkr', 'xadx', 'sflmez', 'g', 'ahsm', 'oleg');
        ;
    rsg_test.go:582: 
        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:584: 
    rsg_test.go:585: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith245063732
--- FAIL: TestRandomSyntaxSQLSmith (300.48s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 7c3cf23b898815395fbc80e08ed8947a243267bc:

        		SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;
        		SET CLUSTER SETTING sql.defaults.interleaved_tables.enabled = true;
        	CREATE TABLE table1 (col1_0 INET, col1_1 REGCLASS NULL, col1_2 JSONB NOT NULL, col1_3 GEOGRAPHY NOT NULL, col1_4 REGPROCEDURE NULL, col1_5 OID NOT NULL, col1_6 INT8 NULL, col1_7 BIT(36), col1_8 JSONB, col1_9 GEOMETRY NULL, col1_10 VARCHAR, col1_11 OID NOT NULL, col1_12 STRING AS (lower(col1_10)) VIRTUAL, col1_13 STRING NOT NULL AS (lower(CAST(col1_11 AS STRING))) VIRTUAL, col1_14 STRING AS (lower(col1_10)) VIRTUAL, col1_15 STRING AS (lower(CAST(col1_9 AS STRING))) STORED, UNIQUE (col1_6, col1_12, col1_5 ASC, col1_14 DESC, col1_1 ASC, col1_11, col1_7 ASC, col1_10 DESC), FAMILY (col1_1), FAMILY (col1_2, col1_10, col1_5), FAMILY (col1_4, col1_11), FAMILY (col1_8), FAMILY (col1_7, col1_15), FAMILY (col1_3, col1_0, col1_9), FAMILY (col1_6));
        CREATE TABLE table2 (col2_0 OID NULL, col2_1 DATE NULL, col2_2 REGCLASS, col2_3 GEOMETRY NOT NULL, col2_4 INT2 NULL, col2_5 GEOGRAPHY NOT NULL, col2_6 JSONB NOT NULL, col2_7 INTERVAL, col2_8 STRING NOT NULL AS (lower(CAST(col2_1 AS STRING))) VIRTUAL, col2_9 STRING NULL AS (lower(CAST(col2_3 AS STRING))) STORED, col2_10 STRING AS (lower(CAST(col2_5 AS STRING))) VIRTUAL, INVERTED INDEX (col2_3) WHERE ((((table2.col2_9 = 'X':::STRING) OR (table2.col2_10 >= '':::STRING)) AND (table2.col2_1 != '1970-01-01':::DATE)) OR (table2.col2_4 > (-128):::INT8)) AND (table2.col2_8 != e'\x00':::STRING), INVERTED INDEX (col2_8, col2_10 DESC, col2_9 ASC, col2_3 DESC), UNIQUE (col2_7 DESC) STORING (col2_1, col2_3, col2_4, col2_5) WHERE ((((table2.col2_9 != e'\'':::STRING) AND (table2.col2_1 >= '4714-11-24 BC':::DATE)) AND (table2.col2_10 >= 'X':::STRING)) OR (table2.col2_8 < e'\'':::STRING)) AND (table2.col2_4 < (-1):::INT8));
        CREATE TABLE table3 (col3_0 INT8 NULL, col3_1 BOOL NOT NULL, col3_2 TIMESTAMPTZ NULL, col3_3 TIMETZ NOT NULL, col3_4 TIMETZ NOT NULL, col3_5 FLOAT8 NOT NULL, PRIMARY KEY (col3_5 DESC), col3_6 STRING NULL AS (lower(CAST(col3_1 AS STRING))) STORED, col3_7 STRING AS (CASE WHEN col3_2 IS NULL THEN NULL ELSE NULL END) VIRTUAL, INDEX (col3_4 ASC, col3_7 DESC, col3_0 DESC, col3_1, col3_3 DESC, col3_6) STORING (col3_2) WHERE (((NOT table3.col3_1) AND (table3.col3_4 < '00:00:00+15:59:00':::TIMETZ)) OR (table3.col3_5 = 3.4028234663852886e+38:::FLOAT8)) AND (table3.col3_2 != '-2000-01-01 00:00:00+00:00':::TIMESTAMPTZ), INDEX (col3_3, col3_6, col3_5 ASC, col3_0 DESC) WHERE NOT table3.col3_1, UNIQUE (col3_2 ASC, col3_0 DESC, col3_5 ASC, col3_4 DESC, col3_6 DESC), UNIQUE (col3_4 DESC, col3_7 DESC, col3_0 DESC, col3_3, col3_5 ASC, col3_2, col3_1) WHERE (table3.col3_2 >= '294276-12-31 23:59:59.999999+00:00':::TIMESTAMPTZ) AND table3.col3_1, INDEX (col3_2 ASC) STORING (col3_0, col3_1, col3_4), UNIQUE (col3_5 DESC, col3_1 DESC, col3_0 DESC, col3_7 ASC, col3_6 DESC, col3_2 ASC) WHERE (table3.col3_7 <= e'\'':::STRING) OR (table3.col3_4 > '00:00:00+15:59:00':::TIMETZ), FAMILY (col3_6), FAMILY (col3_5, col3_1), FAMILY (col3_3), FAMILY (col3_4, col3_0), FAMILY (col3_2));
        CREATE TABLE table4 (col4_0 NAME NOT NULL, col4_1 GEOMETRY NULL, col4_2 REGCLASS, col4_3 BIT(45) NULL, col4_4 REGNAMESPACE, col4_5 REGTYPE NULL, col4_6 INT8 NULL, col4_7 BYTES, col4_8 STRING, col4_9 FLOAT4 NOT NULL, col4_10 TIMESTAMPTZ NULL, col4_11 BOX2D NULL, col4_12 "char", col4_13 STRING AS (CASE WHEN col4_10 IS NULL THEN NULL ELSE e'\fgj~B':::STRING END) VIRTUAL, col4_14 STRING NOT NULL AS (lower(CAST(col4_3 AS STRING))) STORED, col4_15 STRING NOT NULL AS (lower(col4_0)) VIRTUAL, UNIQUE (col4_10 ASC, col4_6 DESC, col4_5, col4_2 ASC, col4_9 DESC, col4_8 DESC, col4_12 DESC, col4_11, col4_4 ASC, col4_15, col4_3) WHERE (((((((((table4.col4_15 < 'X':::STRING) OR (table4.col4_13 < '"':::STRING)) AND (table4.col4_12 > '"':::STRING)) OR (table4.col4_14 < '':::STRING)) OR (table4.col4_7 >= '\xe29883':::BYTES)) AND (table4.col4_0 < '"':::STRING)) AND (table4.col4_8 != '"':::STRING)) OR (table4.col4_6 = 1:::INT8)) OR (table4.col4_10 = '0001-01-01 00:00:00+00:00':::TIMESTAMPTZ)) OR (table4.col4_9 > '-Inf':::FLOAT8), UNIQUE (col4_12 ASC, col4_9 DESC, col4_7 DESC, col4_11) STORING (col4_1, col4_3, col4_4, col4_10) WHERE ((table4.col4_6 != (-1):::INT8) OR (table4.col4_14 <= e'\x00':::STRING)) OR (table4.col4_9 >= 1.0:::FLOAT8), UNIQUE (col4_12 DESC, col4_8 DESC, col4_0 DESC, col4_15 DESC, col4_13 DESC, col4_11 DESC, col4_6, col4_10 DESC, col4_9), UNIQUE (col4_5 DESC) STORING (col4_0, col4_3, col4_6, col4_8, col4_9, col4_10, col4_12) WHERE ((table4.col4_7 <= '\x00':::BYTES) OR (table4.col4_8 < '"':::STRING)) OR (table4.col4_12 > '"':::STRING), UNIQUE (col4_5, col4_2 DESC) WHERE table4.col4_12 < '':::STRING, INDEX (col4_13 DESC, col4_7 ASC, col4_11, col4_5 ASC, col4_9 DESC, col4_4, col4_2 ASC, col4_12 ASC, col4_10) WHERE ((((table4.col4_7 >= '\xff':::BYTES) OR (table4.col4_15 >= 'X':::STRING)) AND (table4.col4_10 >= '0001-01-01 00:00:00+00:00':::TIMESTAMPTZ)) OR (table4.col4_12 >= '"':::STRING)) OR (table4.col4_6 != 127:::INT8), INDEX (col4_0 DESC), FAMILY (col4_8, col4_12, col4_5), FAMILY (col4_14), FAMILY (col4_2, col4_11), FAMILY (col4_1), FAMILY (col4_6), FAMILY (col4_3), FAMILY (col4_9), FAMILY (col4_10), FAMILY (col4_0, col4_7), FAMILY (col4_4));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 294557952345426778, "histo_col_type": "", "name": "__auto__", "null_count": 289251006540317563, "row_count": 600113862984484049}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 194926758762308455, "histo_col_type": "", "name": "__auto__", "null_count": 445535411498316647, "row_count": 600113862984484049}, {"columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 464783438215933544, "histo_col_type": "", "name": "__auto__", "null_count": 255948963072941643, "row_count": 600113862984484049}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 382375070798701975, "histo_col_type": "", "name": "__auto__", "null_count": 63336533416657444, "row_count": 600113862984484049}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 487157755862671122, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 600113862984484049}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8856224575645784, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 600113862984484049}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 492164103567854813, "histo_buckets": [{"distinct_range": 0, "num_eq": 500, "num_range": 0, "upper_bound": "-4215592425910138232"}, {"distinct_range": 6869574844442612000, "num_eq": 9107690680162625094, "num_range": 7381871966050744515, "upper_bound": "-3980036363071587083"}, {"distinct_range": 600000, "num_eq": 10000, "num_range": 600000, "upper_bound": "-3838271468211434572"}, {"distinct_range": 0, "num_eq": 500000000, "num_range": 1000000000, "upper_bound": "1584242637656669281"}, {"distinct_range": 7567494074331589000, "num_eq": 5598409112439346195, "num_range": 8676798928562688781, "upper_bound": "1878658860017532401"}, {"distinct_range": 0, "num_eq": 500000, "num_range": 800000000, "upper_bound": "2301430483643565125"}, {"distinct_range": 0, "num_eq": 1467432568579443312, "num_range": 0, "upper_bound": "2475890448753472015"}, {"distinct_range": 2159038805085856300, "num_eq": 900000, "num_range": 3515196181762981547, "upper_bound": "8551819821487477327"}], "histo_col_type": "INT8", "name": "__auto__", "null_count": 412850815366291105, "row_count": 600113862984484049}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 75417540246357639, "histo_col_type": "", "name": "__auto__", "null_count": 148865831965720905, "row_count": 600113862984484049}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 389566982608570955, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 600113862984484049}, {"columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 540500366628064897, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 600113862984484049}, {"columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 496058347513949705, "histo_col_type": "", "name": "__auto__", "null_count": 284103819534076397, "row_count": 600113862984484049}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 513515545955417762, "histo_col_type": "", "name": "__auto__", "null_count": 391522077969093914, "row_count": 600113862984484049}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 106190407868241166, "histo_col_type": "", "name": "__auto__", "null_count": 284254194668685501, "row_count": 600113862984484049}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 16002481941646412, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 600113862984484049}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 95453927919348506, "histo_col_type": "", "name": "__auto__", "null_count": 522505114977341113, "row_count": 600113862984484049}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 338023913676757965, "histo_col_type": "", "name": "__auto__", "null_count": 202791192959742594, "row_count": 600113862984484049}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4354446, "histo_col_type": "", "name": "__auto__", "null_count": 1006669, "row_count": 6000000}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2588852, "histo_buckets": [{"distinct_range": 0, "num_eq": 500000, "num_range": 0, "upper_bound": "\\\\x42fd010000000000000000c20167a85dd3a673c201fefd4b2b6a7242001531633517204200a7f8c3ab6260"}, {"distinct_range": 0, "num_eq": 5000, "num_range": 400000000, "upper_bound": "\\\\x42fd040000000000000000c1f0a4140469be8dc200d9fd03dd4044420289b8e9ff7c3c42016e2a13f3a7f6"}, {"distinct_range": 0, "num_eq": 6742329201497190014, "num_range": 7480639956771562231, "upper_bound": "\\\\x42fd070000000000000000c20167a85dd3a673c201fefd4b2b6a7242001531633517204200a7f8c3ab6260"}, {"distinct_range": 6246168414704356000, "num_eq": 200000, "num_range": 6246168414704356809, "upper_bound": "\\\\x42fd090000000000000000c20167a85dd3a673c201fefd4b2b6a7242001531633517204200a7f8c3ab6260"}, {"distinct_range": 4001667813378202000, "num_eq": 9000, "num_range": 4001667813378201875, "upper_bound": "\\\\x42fd0b0000000000000000c20167a85dd3a673c201fefd4b2b6a7242001531633517204200a7f8c3ab6260"}, {"distinct_range": 0, "num_eq": 4097719479491989880, "num_range": 9000000000, "upper_bound": "\\\\x42fd110000000000000000c1f0a4140469be8dc200d9fd03dd4044420289b8e9ff7c3c42016e2a13f3a7f6"}, {"distinct_range": 0, "num_eq": 4528215977374905491, "num_range": 0, "upper_bound": "\\\\x42fd127ba89ff5c1f6b500c1ddbb0a3b45c5a4c1a4054212c63a4041f88e3beb0462d841f7a6d0532b75cc"}, {"distinct_range": 7799981763530887000, "num_eq": 5000, "num_range": 9028608826437039764, "upper_bound": "\\\\x42fd190000000000000000c1f0a4140469be8dc200d9fd03dd4044420289b8e9ff7c3c42016e2a13f3a7f6"}, {"distinct_range": 17107.678335791126, "num_eq": 20000000000, "num_range": 30000, "upper_bound": "\\\\x42fd1b0000000000000000c1f0a4140469be8dc200d9fd03dd4044420289b8e9ff7c3c42016e2a13f3a7f6"}, {"distinct_range": 4000000000, "num_eq": 5106439558458629828, "num_range": 4000000000, "upper_bound": "\\\\x42fdffffffffffffffff00c1ddbb0a3b45c5a4c1a4054212c63a4041f88e3beb0462d841f7a6d0532b75cc"}, {"distinct_range": 0, "num_eq": 500, "num_range": 100000000, "upper_bound": "\\\\x42fdffffffffffffffff00c1e8561e7bcfc492c1fd1f947661f32c41f9f8ed24e3a52641fa2a711b0ea7ca"}, {"distinct_range": 10, "num_eq": 3374295265650451644, "num_range": 10, "upper_bound": "\\\\x42fdffffffffffffffff00c1f0a4140469be8dc200d9fd03dd4044420289b8e9ff7c3c42016e2a13f3a7f6"}, {"distinct_range": 855927595514543500, "num_eq": 2673162071970370549, "num_range": 1584227882564081996, "upper_bound": "\\\\x42fdffffffffffffffff00c20167a85dd3a673c201fefd4b2b6a7242001531633517204200a7f8c3ab6260"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 6000000}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 807415, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6000000}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5921493, "histo_buckets": [{"distinct_range": 0, "num_eq": 8373413860623917985, "num_range": 0, "upper_bound": ""}, {"distinct_range": 0, "num_eq": 40000000, "num_range": 3538875860063022786, "upper_bound": "D"}, {"distinct_range": 1280668758420290000, "num_eq": 60000000, "num_range": 1280668758420290026, "upper_bound": "ILOi"}, {"distinct_range": 400000, "num_eq": 8000000, "num_range": 400000, "upper_bound": "Q\\u0018?\\u0010\\u0008*\\u0015"}, {"distinct_range": 181.92947822532835, "num_eq": 6826321796296710241, "num_range": 2000, "upper_bound": "R\\u0006"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 6000000}, {"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 962649, "histo_col_type": "", "name": "__auto__", "null_count": 2625822, "row_count": 6000000}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2679199, "histo_col_type": "", "name": "__auto__", "null_count": 788833, "row_count": 6000000}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5076916, "histo_col_type": "", "name": "__auto__", "null_count": 4548987, "row_count": 6000000}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2723993, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6000000}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2684283, "histo_buckets": [{"distinct_range": 0, "num_eq": 200000000, "num_range": 0, "upper_bound": "-42 years -1 mons -504 days -17:13:49.235221"}, {"distinct_range": 0, "num_eq": 0, "num_range": 814313330591934599, "upper_bound": "-21 years -5 mons -3 days -10:09:41.690322"}, {"distinct_range": 712743192076537500, "num_eq": 60000, "num_range": 6824606771353291592, "upper_bound": "5 years 9 mons 648 days 20:53:22.697694"}, {"distinct_range": 911946124044235600, "num_eq": 50000000000, "num_range": 911946124044235641, "upper_bound": "42 years 7 mons 591 days 22:45:20.37721"}, {"distinct_range": 0, "num_eq": 8000000, "num_range": 1913610197303775693, "upper_bound": "64 years 6 mons 512 days 19:23:00.64867"}, {"distinct_range": 5984828705993756, "num_eq": 8759436008476510832, "num_range": 510663297876160133, "upper_bound": "78 years 11 mons 105 days 08:51:48.428739"}], "histo_col_type": "INTERVAL", "name": "__auto__", "null_count": 5941512, "row_count": 6000000}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4486103, "histo_col_type": "", "name": "__auto__", "null_count": 2058648, "row_count": 6000000}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5608358, "histo_col_type": "", "name": "__auto__", "null_count": 3150443, "row_count": 6000000}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS '[{"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5276984724568156596, "histo_col_type": "TIMESTAMPTZ", "name": "__auto__", "null_count": 4479109681716303684, "row_count": 5827994603638159525}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4614601664973050897, "histo_buckets": [{"distinct_range": 0, "num_eq": 800000000, "num_range": 0, "upper_bound": "10:43:43.898038+06:50:00"}], "histo_col_type": "TIMETZ", "name": "__auto__", "null_count": 0, "row_count": 5827994603638159525}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3067754491277968329, "histo_col_type": "TIMETZ", "name": "__auto__", "null_count": 0, "row_count": 5827994603638159525}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1151708939058593520, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5827994603638159525}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3623097408381831314, "histo_col_type": "", "name": "__auto__", "null_count": 4816287433384450118, "row_count": 5827994603638159525}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3983613270057360025, "histo_col_type": "", "name": "__auto__", "null_count": 4340479721735705921, "row_count": 5827994603638159525}, {"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1302656132264496646, "histo_col_type": "", "name": "__auto__", "null_count": 4451911191922080841, "row_count": 5827994603638159525}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1881709568933634377, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 5827994603638159525}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS e'[{"columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 424398334, "histo_col_type": "", "name": "__auto__", "null_count": 2787328800, "row_count": 3000000000}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 717994676, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3000000000}, {"columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1047807128, "histo_col_type": "", "name": "__auto__", "null_count": 2200082278, "row_count": 3000000000}, {"columns": ["col4_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 285361781, "histo_buckets": [{"distinct_range": 0, "num_eq": 14722297727760804, "num_range": 0, "upper_bound": "\\u0008#w$\\u0002"}, {"distinct_range": 5183399727682271000, "num_eq": 1809466254089783151, "num_range": 5183399727682271266, "upper_bound": "\\t{``\\u001co\\n1%\\""}, {"distinct_range": 0, "num_eq": 1255180619724475666, "num_range": 50000000, "upper_bound": "\\nez|\\u0002k"}, {"distinct_range": 0, "num_eq": 20, "num_range": 200, "upper_bound": "\\u001db;:"}, {"distinct_range": 0, "num_eq": 6717279119762635400, "num_range": 200, "upper_bound": "\\""}, {"distinct_range": 151764162543871940, "num_eq": 3010645689884120193, "num_range": 8768896286590431554, "upper_bound": "\'"}, {"distinct_range": 0, "num_eq": 10000, "num_range": 9000, "upper_bound": ",R\\u000f\\u000exA\\u0005"}, {"distinct_range": 264127289050675100, "num_eq": 900000000, "num_range": 1368340627011618326, "upper_bound": "6j_U%\\u0019?"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 2671687300, "row_count": 3000000000}, {"columns": ["col4_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2012785945, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3000000000}, {"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 357455820, "histo_col_type": "NAME", "name": "__auto__", "null_count": 0, "row_count": 3000000000}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2520549006, "histo_col_type": "", "name": "__auto__", "null_count": 2323330715, "row_count": 3000000000}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 796614844, "histo_col_type": "", "name": "__auto__", "null_count": 461285683, "row_count": 3000000000}, {"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2962152348, "histo_col_type": "", "name": "__auto__", "null_count": 2307581872, "row_count": 3000000000}, {"columns": ["col4_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2814422094, "histo_col_type": "", "name": "__auto__", "null_count": 1763258970, "row_count": 3000000000}, {"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1523113086, "histo_col_type": "", "name": "__auto__", "null_count": 2646708480, "row_count": 3000000000}, {"columns": ["col4_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2322683327, "histo_buckets": [{"distinct_range": 0, "num_eq": 8934863175775887679, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 0, "num_eq": 4615525145310625162, "num_range": 2979348029926018671, "upper_bound": "1743932455"}], "histo_col_type": "REGTYPE", "name": "__auto__", "null_count": 2264551230, "row_count": 3000000000}, {"columns": ["col4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2494726831, "histo_col_type": "", "name": "__auto__", "null_count": 1524201295, "row_count": 3000000000}, {"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 17978259, "histo_col_type": "", "name": "__auto__", "null_count": 1081809389, "row_count": 3000000000}, {"columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2852687388, "histo_buckets": [{"distinct_range": 0, "num_eq": 8101574363989938706, "num_range": 0, "upper_bound": "\\u0003"}, {"distinct_range": 0, "num_eq": 70000000, "num_range": 2994447347234135664, "upper_bound": "\\u0006"}, {"distinct_range": 656.6596510575247, "num_eq": 20000000000, "num_range": 2000, "upper_bound": "\\u0019"}, {"distinct_range": 8214608158166477000, "num_eq": 900, "num_range": 8214608158166477075, "upper_bound": "#"}, {"distinct_range": 6820929712373859000, "num_eq": 4000, "num_range": 8068659082577100931, "upper_bound": ","}, {"distinct_range": 2170791412495726000, "num_eq": 90000000000, "num_range": 2170791412495726091, "upper_bound": ":"}, {"distinct_range": 0, "num_eq": 1633913269064389030, "num_range": 70, "upper_bound": "}"}], "histo_col_type": "\\"char\\"", "name": "__auto__", "null_count": 1252633347, "row_count": 3000000000}, {"columns": ["col4_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2996742147, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3000000000}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('s', 'udtz', 'prkww', 'gghsng', 'jrhofz');
        CREATE TYPE rand_typ_1 AS ENUM ('radn', 'a', 'vk', 'cse', 'ev');
        CREATE TYPE rand_typ_2 AS ENUM ('clokym', 'y', 'xaivno', 'wcx', 'efponh');
        CREATE TYPE rand_typ_3 AS ENUM ('skv');
        ;
    rsg_test.go:582: 
        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:584: 
    rsg_test.go:585: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith077087745
--- FAIL: TestRandomSyntaxSQLSmith (317.55s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 691eba40c69a076d045cb810bdc8ee4db1bd3d97:

        		SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;
        		SET CLUSTER SETTING sql.defaults.interleaved_tables.enabled = true;
        	CREATE TABLE table1 (col1_0 CHAR NULL, col1_1 DATE NOT NULL, col1_2 BYTES, col1_3 REGPROCEDURE NOT NULL, col1_4 BOOL NULL, col1_5 INT8 NOT NULL, col1_6 DATE, col1_7 GEOGRAPHY, col1_8 INET NOT NULL, col1_9 BIT(16), col1_10 BOOL, col1_11 BYTES, col1_12 BOX2D NOT NULL, col1_13 DECIMAL NOT NULL, col1_14 GEOGRAPHY, col1_15 DECIMAL NULL, col1_16 REGCLASS, col1_17 STRING NOT NULL AS (lower(CAST(col1_4 AS STRING))) STORED, INDEX (col1_3 DESC, col1_6 ASC, col1_2 DESC));
        CREATE TABLE table2 (col2_0 INTERVAL, col2_1 OID NULL, col2_2 REGCLASS NULL, col2_3 DATE, col2_4 FLOAT4 NOT NULL, col2_5 VARCHAR, col2_6 DECIMAL NOT NULL, col2_7 BIT(28) NOT NULL, col2_8 GEOMETRY NOT NULL, col2_9 REGPROC, col2_10 STRING NOT NULL AS (lower(CAST(col2_0 AS STRING))) VIRTUAL, col2_11 STRING AS (lower(CAST(col2_0 AS STRING))) STORED, col2_12 STRING NOT NULL AS (lower(CAST(col2_7 AS STRING))) STORED, col2_13 STRING NOT NULL AS (lower(CAST(col2_2 AS STRING))) VIRTUAL, col2_14 STRING AS (lower(CAST(col2_1 AS STRING))) VIRTUAL, col2_15 STRING NOT NULL AS (lower(CAST(col2_9 AS STRING))) VIRTUAL, INDEX (col2_13 DESC, col2_0 DESC, col2_14 DESC, col2_15) WHERE (((((((((table2.col2_5 > e'\'':::STRING) OR (table2.col2_12 >= '':::STRING)) AND (table2.col2_3 >= '-infinity':::DATE)) OR (table2.col2_15 > e'\'':::STRING)) AND (table2.col2_13 < '':::STRING)) OR (table2.col2_4 = 'NaN':::FLOAT8)) AND (table2.col2_14 > e'\'':::STRING)) OR (table2.col2_6 <= 0:::DECIMAL)) OR (table2.col2_11 <= e'\U00002603':::STRING)) OR (table2.col2_10 != '':::STRING), INDEX (col2_2 ASC, col2_11 ASC, col2_4 DESC) WHERE (((((table2.col2_13 >= '':::STRING) OR (table2.col2_12 < '"':::STRING)) OR (table2.col2_5 = e'\U00002603':::STRING)) OR (table2.col2_15 != e'\x00':::STRING)) OR (table2.col2_6 < (-1):::DECIMAL)) AND (table2.col2_10 > e'\U00002603':::STRING), INVERTED INDEX (col2_11 DESC, col2_8 DESC) WHERE (table2.col2_14 > e'\U00002603':::STRING) AND (table2.col2_6 <= 0:::DECIMAL), UNIQUE (col2_1 DESC, col2_3 ASC, col2_10 DESC, col2_0 DESC, col2_2 DESC, col2_15 DESC, col2_12 DESC, col2_13 ASC, col2_5, col2_14, col2_11 DESC), UNIQUE (col2_12, col2_10 DESC, col2_9, col2_2 ASC, col2_0 ASC, col2_5 DESC) STORING (col2_1, col2_6, col2_7, col2_8) WHERE (((((((((table2.col2_3 >= '4714-11-24 BC':::DATE) OR (table2.col2_5 >= '':::STRING)) OR (table2.col2_11 != e'\U00002603':::STRING)) OR (table2.col2_12 < e'\'':::STRING)) OR (table2.col2_6 <= 'NaN':::DECIMAL)) AND (table2.col2_13 > e'\x00':::STRING)) OR (table2.col2_14 > 'X':::STRING)) AND (table2.col2_4 <= '-Inf':::FLOAT8)) OR (table2.col2_15 = e'\'':::STRING)) AND (table2.col2_10 <= e'\'':::STRING), UNIQUE (col2_2 DESC, col2_7, col2_15, col2_0, col2_3 DESC, col2_10 DESC, col2_12 ASC, col2_5 ASC) STORING (col2_1, col2_4, col2_6, col2_9), INDEX (col2_10 DESC, col2_9, col2_14 DESC, col2_0 DESC, col2_15) STORING (col2_1, col2_2, col2_7, col2_11));
        CREATE TABLE table3 (col3_0 INT4 NOT NULL, col3_1 TIMETZ NOT NULL, col3_2 GEOMETRY, col3_3 DECIMAL NULL, INDEX (col3_0 ASC, col3_3 ASC, col3_1 ASC) STORING (col3_2), FAMILY (col3_0), FAMILY (col3_3, col3_1, col3_2));
        CREATE TABLE table4 (col4_0 CHAR NOT NULL, col4_1 REGNAMESPACE NULL, col4_2 NAME NOT NULL, PRIMARY KEY (col4_2), col4_3 STRING AS (lower(col4_2)) VIRTUAL, col4_4 STRING NOT NULL AS (lower(col4_0)) STORED, INDEX (col4_0 DESC, col4_1 ASC, col4_3 DESC, col4_4 ASC, col4_2 DESC), UNIQUE (col4_1 ASC, col4_3 DESC, col4_0 DESC, col4_4, col4_2 DESC), UNIQUE (col4_1 ASC, col4_4), FAMILY (col4_0, col4_4, col4_1), FAMILY (col4_2));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 46, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 117, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 117, "histo_col_type": "", "name": "__auto__", "null_count": 408, "row_count": 500}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 395, "histo_col_type": "", "name": "__auto__", "null_count": 88, "row_count": 500}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 376, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 418, "histo_col_type": "", "name": "__auto__", "null_count": 221, "row_count": 500}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 101, "histo_col_type": "", "name": "__auto__", "null_count": 207, "row_count": 500}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 341, "histo_col_type": "", "name": "__auto__", "null_count": 189, "row_count": 500}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 378, "histo_col_type": "", "name": "__auto__", "null_count": 369, "row_count": 500}, {"columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 220, "histo_col_type": "", "name": "__auto__", "null_count": 477, "row_count": 500}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 321, "histo_col_type": "", "name": "__auto__", "null_count": 392, "row_count": 500}, {"columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 447, "histo_col_type": "", "name": "__auto__", "null_count": 149, "row_count": 500}, {"columns": ["col1_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 314, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 276, "histo_buckets": [{"distinct_range": 0, "num_eq": 6553641900997479598, "num_range": 0, "upper_bound": "578178546"}, {"distinct_range": 0, "num_eq": 8135555708256838540, "num_range": 30, "upper_bound": "764347214"}, {"distinct_range": 48809.44190593989, "num_eq": 0, "num_range": 1000000, "upper_bound": "2665870003"}, {"distinct_range": 953685166672046500, "num_eq": 2806076001776627502, "num_range": 953685166672046519, "upper_bound": "2830120068"}, {"distinct_range": 0, "num_eq": 80, "num_range": 5654167182004133537, "upper_bound": "3471864535"}, {"distinct_range": 475482278855813440, "num_eq": 9000000000, "num_range": 5240559706304160828, "upper_bound": "4116082416"}], "histo_col_type": "REGPROCEDURE", "name": "__auto__", "null_count": 0, "row_count": 500}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 207, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 492, "histo_col_type": "", "name": "__auto__", "null_count": 398, "row_count": 500}, {"columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 26, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 500}, {"columns": ["col1_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 51, "histo_col_type": "", "name": "__auto__", "null_count": 8, "row_count": 500}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3997087271976704066, "histo_col_type": "", "name": "__auto__", "null_count": 5691797773874107311, "row_count": 8152424011147252167}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7226477520197674842, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8152424011147252167}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5092610338918519447, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8152424011147252167}, {"columns": ["col2_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2752146692191114025, "histo_buckets": [{"distinct_range": 0, "num_eq": 5391633442317879943, "num_range": 0, "upper_bound": ""}, {"distinct_range": 0, "num_eq": 8528495260423856613, "num_range": 2994149165882525857, "upper_bound": "\\""}, {"distinct_range": 1761709.8149522308, "num_eq": 300000, "num_range": 2000000, "upper_bound": ":i\\rj4in#}"}, {"distinct_range": 3877792190506105000, "num_eq": 800000000, "num_range": 3877792190506104992, "upper_bound": "?D"}, {"distinct_range": 0, "num_eq": 8176540868036057916, "num_range": 4245235951743989787, "upper_bound": "N\\u0017"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 6170861003176088449, "row_count": 8152424011147252167}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2081302240409432468, "histo_col_type": "", "name": "__auto__", "null_count": 2754658324725241915, "row_count": 8152424011147252167}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2377511938355388489, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8152424011147252167}, {"columns": ["col2_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 478699480196044755, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8152424011147252167}, {"columns": ["col2_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6182132199122832044, "histo_col_type": "", "name": "__auto__", "null_count": 5772853731179907800, "row_count": 8152424011147252167}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6475667879497581848, "histo_col_type": "", "name": "__auto__", "null_count": 5976838841196530481, "row_count": 8152424011147252167}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 400158087760353794, "histo_col_type": "", "name": "__auto__", "null_count": 4264949970704658350, "row_count": 8152424011147252167}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2687502069630937052, "histo_col_type": "", "name": "__auto__", "null_count": 5812664879251695604, "row_count": 8152424011147252167}, {"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1542503782881728082, "histo_buckets": [{"distinct_range": 0, "num_eq": 3033630034457546799, "num_range": 0, "upper_bound": ""}, {"distinct_range": 4120313085869934000, "num_eq": 40000000, "num_range": 4364329037310819141, "upper_bound": "\\u0005!Q\\u001e"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 8152424011147252167}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 230988761501357312, "histo_buckets": [{"distinct_range": 0, "num_eq": 7832168905349444453, "num_range": 0, "upper_bound": "63158119"}, {"distinct_range": 2772533.9769874793, "num_eq": 500, "num_range": 7000000, "upper_bound": "347364086"}, {"distinct_range": 100000000, "num_eq": 700000, "num_range": 100000000, "upper_bound": "654394182"}, {"distinct_range": 1970514925407116300, "num_eq": 7412162870790911715, "num_range": 1970514925407116160, "upper_bound": "1187042660"}, {"distinct_range": 648748451.4542487, "num_eq": 0, "num_range": 4000000000, "upper_bound": "1957459553"}, {"distinct_range": 0, "num_eq": 9000, "num_range": 8986543137902017582, "upper_bound": "2574897473"}, {"distinct_range": 0, "num_eq": 0, "num_range": 3436673683499822021, "upper_bound": "3658315465"}, {"distinct_range": 0, "num_eq": 5000000000, "num_range": 1039713163468899599, "upper_bound": "4160609352"}, {"distinct_range": 358373839779377000, "num_eq": 0, "num_range": 358373839779376992, "upper_bound": "4228225076"}], "histo_col_type": "REGCLASS", "name": "__auto__", "null_count": 7728587048629867422, "row_count": 8152424011147252167}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5777542523747612648, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8152424011147252167}, {"columns": ["col2_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6605251139769114789, "histo_buckets": [{"distinct_range": 0, "num_eq": 5183307158207174922, "num_range": 0, "upper_bound": "\\u00113^"}, {"distinct_range": 4015423.0049962252, "num_eq": 7538217645494188185, "num_range": 6000000, "upper_bound": "-+"}, {"distinct_range": 8139683106444159000, "num_eq": 2064172652625194743, "num_range": 8139683106444158777, "upper_bound": "/\\u0018\\u000f[&]\\u0018_"}, {"distinct_range": 0, "num_eq": 3000000, "num_range": 7000, "upper_bound": "7[ZN\\u001e"}, {"distinct_range": 6694698494876854000, "num_eq": 90000, "num_range": 6694698494876853807, "upper_bound": "G"}, {"distinct_range": 400360646905139650, "num_eq": 400000, "num_range": 5844845240820868250, "upper_bound": "X"}, {"distinct_range": 0, "num_eq": 4563035970545195476, "num_range": 900000000, "upper_bound": "onQ"}, {"distinct_range": 13909.362220323259, "num_eq": 6085958467169525093, "num_range": 60000, "upper_bound": "\U00002603"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 8152424011147252167}, {"columns": ["col2_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2002464088617022402, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8152424011147252167}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS '[{"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2179, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3000}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2011, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3000}, {"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2586, "histo_col_type": "", "name": "__auto__", "null_count": 2318, "row_count": 3000}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1602, "histo_col_type": "", "name": "__auto__", "null_count": 71, "row_count": 3000}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS e'[{"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 527211074057311261, "histo_col_type": "", "name": "__auto__", "null_count": 214313670821167863, "row_count": 6159788339483501887}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5181726749459296715, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 6159788339483501887}, {"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2885176714059571814, "histo_buckets": [{"distinct_range": 0, "num_eq": 2000000, "num_range": 0, "upper_bound": "\\u000f"}, {"distinct_range": 1000, "num_eq": 3000000000, "num_range": 1000, "upper_bound": "\U00002603"}], "histo_col_type": "CHAR", "name": "__auto__", "null_count": 0, "row_count": 6159788339483501887}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 486496040207311629, "histo_buckets": [{"distinct_range": 0, "num_eq": 90000000, "num_range": 0, "upper_bound": "49465388"}, {"distinct_range": 0, "num_eq": 7740822095498204345, "num_range": 6684223592882562961, "upper_bound": "1887340449"}, {"distinct_range": 0, "num_eq": 4389644850298630871, "num_range": 809076940649870226, "upper_bound": "3708178714"}, {"distinct_range": 1000000000, "num_eq": 1109470950408723504, "num_range": 1000000000, "upper_bound": "3814906815"}, {"distinct_range": 0, "num_eq": 1328266711047745223, "num_range": 138982438437857390, "upper_bound": "3897393563"}, {"distinct_range": 0, "num_eq": 100000000, "num_range": 0, "upper_bound": "4028659142"}], "histo_col_type": "REGNAMESPACE", "name": "__auto__", "null_count": 5337467819958668800, "row_count": 6159788339483501887}, {"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4293789023604154227, "histo_buckets": [{"distinct_range": 0, "num_eq": 8824233272091635069, "num_range": 0, "upper_bound": "\\u0003sDH! "}, {"distinct_range": 1672446159801830700, "num_eq": 2188362960956731942, "num_range": 1672446159801830605, "upper_bound": "O["}, {"distinct_range": 30, "num_eq": 900000, "num_range": 30, "upper_bound": "X\\u001bK1T"}, {"distinct_range": 40000000000, "num_eq": 6000000000, "num_range": 40000000000, "upper_bound": "nAuC\\u000b\\\\"}], "histo_col_type": "NAME", "name": "__auto__", "null_count": 0, "row_count": 6159788339483501887}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('e', 'hie', 'radzw');
        CREATE TYPE rand_typ_1 AS ENUM ('cv', 'mwzg', 'oyfoc');
        CREATE TYPE rand_typ_2 AS ENUM ('lnd', 'dxkkdq');
        CREATE TYPE rand_typ_3 AS ENUM ('urqwvj', 'rjkl');
        ;
    rsg_test.go:595: 
        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:597: 
    rsg_test.go:598: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith315262552
--- FAIL: TestRandomSyntaxSQLSmith (300.66s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

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

    rsg_test.go:595: 
        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 OID, col1_1 DATE, col1_2 INT2 NULL, col1_3 OID NOT NULL, col1_4 DECIMAL NOT NULL, col1_5 DECIMAL NULL, col1_6 BIT(20) NULL, col1_7 INET NOT NULL, col1_8 BIT(32) NOT NULL, col1_9 INT4 NOT NULL, col1_10 JSONB, UNIQUE (col1_4) WHERE ((((table1.col1_5 < '-Infinity':::DECIMAL) AND (table1.col1_2 >= (-128):::INT8)) OR (table1.col1_9 = 1:::INT8)) AND (table1.col1_4 > (-1.234E+401):::DECIMAL)) OR (table1.col1_1 >= '-infinity':::DATE), FAMILY (col1_0), FAMILY (col1_8, col1_3), FAMILY (col1_10, col1_4, col1_1, col1_5, col1_9, col1_2, col1_7), FAMILY (col1_6), UNIQUE (col1_2, col1_0));
        CREATE TABLE table2 (col2_0 BOX2D NULL, col2_1 UUID, col2_2 REGNAMESPACE NOT NULL, col2_3 REGTYPE NULL, col2_4 TIMESTAMP NOT NULL, col2_5 INT4 NOT NULL, col2_6 BOX2D NOT NULL, col2_7 TIMESTAMPTZ, INDEX (col2_5 DESC, col2_3, col2_0 DESC) WHERE table2.col2_5 >= 2147483647:::INT8, INDEX (col2_3 DESC, col2_6, col2_4 ASC, col2_7 DESC, col2_5 ASC, col2_0, col2_1 DESC) STORING (col2_2) WHERE ((table2.col2_4 > '3000-01-01 00:00:00':::TIMESTAMP) OR (table2.col2_5 > (-1):::INT8)) OR (table2.col2_7 > '294276-12-31 23:59:59.999999+00:00':::TIMESTAMPTZ), INDEX (col2_6 ASC, col2_1, col2_2 DESC, col2_4 DESC, col2_0 ASC, col2_7 DESC, col2_5 ASC), FAMILY (col2_7, col2_0, col2_6, col2_2, col2_3, col2_5), FAMILY (col2_1), FAMILY (col2_4));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2509607275870922143, "histo_col_type": "DECIMAL", "name": "__auto__", "null_count": 0, "row_count": 3611703544470580269}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3226303917163234153, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3611703544470580269}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 626787592057985491, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3611703544470580269}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 448603747647758864, "histo_col_type": "", "name": "__auto__", "null_count": 3279178043777818943, "row_count": 3611703544470580269}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 26758179506001145, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3611703544470580269}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2799837430277087964, "histo_col_type": "", "name": "__auto__", "null_count": 3504088091427858305, "row_count": 3611703544470580269}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3216223877282685182, "histo_col_type": "", "name": "__auto__", "null_count": 1005500249794361507, "row_count": 3611703544470580269}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3174385377245200312, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3611703544470580269}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1373825454268216640, "histo_col_type": "", "name": "__auto__", "null_count": 3539053646804418321, "row_count": 3611703544470580269}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3455887683000784233, "histo_col_type": "", "name": "__auto__", "null_count": 94649903622492946, "row_count": 3611703544470580269}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1674725680787014462, "histo_col_type": "", "name": "__auto__", "null_count": 1273543734611919720, "row_count": 3611703544470580269}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 932565933, "histo_col_type": "", "name": "__auto__", "null_count": 188734652, "row_count": 1000000000}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 164562591, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1000000000}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 696884148, "histo_buckets": [{"distinct_range": 0, "num_eq": 30000, "num_range": 0, "upper_bound": "-471870263"}, {"distinct_range": 3400375539927804000, "num_eq": 8000, "num_range": 6668793581311738400, "upper_bound": "1897549711"}], "histo_col_type": "INT4", "name": "__auto__", "null_count": 0, "row_count": 1000000000}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 485378839, "histo_buckets": [{"distinct_range": 0, "num_eq": 5926410346968983455, "num_range": 0, "upper_bound": "BOX(-10 -10,10 10)"}, {"distinct_range": 0, "num_eq": 10000000, "num_range": 7351603030148931891, "upper_bound": "BOX(-1.2724160885831102 -0.27894718091283577,0.8384283883870225 0.7334153948863156)"}, {"distinct_range": 70000000000, "num_eq": 10000000000, "num_range": 70000000000, "upper_bound": "BOX(-1.2203878084749453 -0.034960746424517186,0.4903981011643552 2.305757146698717)"}, {"distinct_range": 8153881189335776000, "num_eq": 172803639012644911, "num_range": 8153881189335776080, "upper_bound": "BOX(0.42249960631605354 -0.04203865641801863,0.4397657888441807 1.001360623650901)"}, {"distinct_range": 362537629.15912014, "num_eq": 4764323634403110740, "num_range": 5000000000, "upper_bound": "BOX(0.5744140456422642 -1.316712317840263,0.9043558354271755 0.016859053161850712)"}, {"distinct_range": 40000, "num_eq": 649425426416725155, "num_range": 40000, "upper_bound": "BOX(1.0662205691668825 -0.5585022793560945,1.9162616121845735 -0.26565136070743367)"}], "histo_col_type": "BOX2D", "name": "__auto__", "null_count": 0, "row_count": 1000000000}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 476391524, "histo_col_type": "", "name": "__auto__", "null_count": 911608130, "row_count": 1000000000}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 863748211, "histo_col_type": "", "name": "__auto__", "null_count": 611438564, "row_count": 1000000000}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 361685642, "histo_col_type": "", "name": "__auto__", "null_count": 645332376, "row_count": 1000000000}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 142182222, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1000000000}]':::JSONB;
        ALTER TABLE table2 ADD FOREIGN KEY (col2_5, col2_3) REFERENCES table1 (col1_2, col1_0) ON UPDATE RESTRICT;
        CREATE TYPE rand_typ_0 AS ENUM ('qbs', 'dbbxas', 'az', 'zilokg', 'cze', 'qdxjlv');
        CREATE TYPE rand_typ_1 AS ENUM ('ptn', 'b');
        ;
    rsg_test.go:595: 
        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:597: 
    rsg_test.go:598: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith952650496
--- FAIL: TestRandomSyntaxSQLSmith (300.73s)
Reproduce

To reproduce, try:

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

Internal log

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

/cc @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 9dccf8e95549fedd575fa01620882f13cc4411c5:

        		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 TIMESTAMPTZ NOT NULL);
        CREATE TABLE table2 (col2_0 JSONB NULL, col2_1 UUID NULL, col2_2 INT8 NOT NULL, col2_3 OID NULL, col2_4 BOX2D NOT NULL, col2_5 VARCHAR NOT NULL, INVERTED INDEX (col2_0 DESC), UNIQUE (col2_5));
        CREATE TABLE table3 (col3_0 REGPROCEDURE NULL, col3_1 OID, col3_2 VARCHAR, col3_3 OID NOT NULL, col3_4 INT2 NOT NULL, col3_5 BOOL NULL, col3_6 REGPROCEDURE NOT NULL, col3_7 DECIMAL, col3_8 REGCLASS, col3_9 BIT(17) NOT NULL, col3_10 TIMESTAMPTZ, PRIMARY KEY (col3_9 DESC, col3_3 ASC), col3_11 STRING NOT NULL AS (lower(CAST(col3_3 AS STRING))) STORED, col3_12 STRING NULL AS (CASE WHEN col3_10 IS NULL THEN e'7\x11.e\x04\x05\x0f':::STRING ELSE e':\x10o+\x1a613':::STRING END) STORED, col3_13 STRING NOT NULL AS (CASE WHEN col3_10 IS NULL THEN 'LDJ':::STRING ELSE NULL END) VIRTUAL, col3_14 STRING NOT NULL AS (lower(CAST(col3_1 AS STRING))) VIRTUAL, INDEX (col3_1 DESC, col3_4 ASC, col3_3 DESC), UNIQUE (col3_1 DESC, col3_8 ASC, col3_10, col3_4, col3_12 ASC, col3_9 ASC, col3_13 ASC) STORING (col3_6, col3_7) WHERE (((((((table3.col3_5 AND (table3.col3_11 > e'\U00002603':::STRING)) AND (table3.col3_10 = '-2000-01-01 00:00:00+00:00':::TIMESTAMPTZ)) AND (table3.col3_12 < 'X':::STRING)) OR (table3.col3_4 < (-128):::INT8)) OR (table3.col3_2 <= 'X':::STRING)) OR (table3.col3_7 <= (-1):::DECIMAL)) OR (table3.col3_14 > '':::STRING)) AND (table3.col3_13 < 'X':::STRING), UNIQUE (col3_14, col3_13 ASC, col3_9, col3_11 DESC, col3_8, col3_7 DESC, col3_2 ASC, col3_3 ASC, col3_0, col3_1 DESC, col3_12, col3_4 ASC, col3_10 ASC, col3_6, col3_5 DESC) WHERE table3.col3_12 <= 'X':::STRING, UNIQUE (col3_3 DESC, col3_10 ASC, col3_5, col3_11 ASC, col3_4, col3_1 DESC, col3_7 ASC, col3_12, col3_2 ASC, col3_9 ASC, col3_6, col3_8, col3_13 ASC, col3_0 ASC, col3_14 ASC) WHERE (((table3.col3_11 < '"':::STRING) AND (table3.col3_13 >= e'\'':::STRING)) AND (NOT table3.col3_5)) AND (table3.col3_4 > 127:::INT8), UNIQUE (col3_10, col3_0 DESC, col3_5 DESC, col3_4 DESC, col3_8 ASC, col3_9, col3_6 ASC, col3_13 DESC, col3_11 ASC, col3_3, col3_1), INDEX (col3_0 DESC, col3_14, col3_10, col3_5 ASC, col3_9 DESC, col3_7 ASC) STORING (col3_1, col3_2, col3_8, col3_11, col3_12) WHERE ((((((((table3.col3_12 = '"':::STRING) AND (table3.col3_2 > e'\x00':::STRING)) AND (table3.col3_13 = e'\U00002603':::STRING)) AND (table3.col3_14 <= '"':::STRING)) AND (table3.col3_10 != '3000-01-01 00:00:00+00:00':::TIMESTAMPTZ)) AND (table3.col3_7 <= 'NaN':::DECIMAL)) OR (table3.col3_11 != e'\U00002603':::STRING)) OR (table3.col3_4 < 1:::INT8)) AND table3.col3_5, UNIQUE (col3_10));
        CREATE TABLE table4 (col4_0 BOX2D NOT NULL, col4_1 DECIMAL NOT NULL, col4_2 INT4 NOT NULL, col4_3 REGPROC NOT NULL, col4_4 TIMESTAMPTZ NULL, col4_5 INT2 NOT NULL, col4_6 STRING NOT NULL, col4_7 INT4[] NULL, col4_8 OID, PRIMARY KEY (col4_3 DESC, col4_2 ASC, col4_6 ASC, col4_0), col4_9 STRING NULL AS (CASE WHEN col4_7 IS NULL THEN e'\x17!\x1b':::STRING ELSE e'[gsV\x01;b\n':::STRING END) VIRTUAL, col4_10 INT2 NULL AS (col4_5 + col4_2) STORED, col4_11 INT4 AS (col4_2 + (-1208347073):::INT8) VIRTUAL, col4_12 INT2 NULL AS (col4_5 + col4_2) VIRTUAL, INDEX (col4_8, col4_3, col4_5 ASC, col4_4 DESC, col4_12) STORING (col4_1, col4_7), INDEX (col4_6 ASC, col4_2 DESC, col4_1 DESC, col4_9 DESC, col4_8), UNIQUE (col4_11, col4_1 ASC) WHERE (((((table4.col4_4 <= '0001-01-01 00:00:00+00:00':::TIMESTAMPTZ) AND (table4.col4_6 != e'\x00':::STRING)) OR (table4.col4_10 > 1:::INT8)) OR (table4.col4_9 < '"':::STRING)) AND (table4.col4_11 <= 2147483647:::INT8)) AND (table4.col4_2 >= (-1):::INT8), INVERTED INDEX (col4_0, col4_9 DESC, col4_10, col4_8, col4_5 DESC, col4_11 DESC, col4_12 ASC, col4_6, col4_1, col4_2 ASC, col4_7 DESC) WHERE ((((((table4.col4_5 = (-1):::INT8) OR (table4.col4_2 <= 0:::INT8)) OR (table4.col4_9 = e'\U00002603':::STRING)) OR (table4.col4_1 != '-Infinity':::DECIMAL)) OR (table4.col4_6 != e'\'':::STRING)) OR (table4.col4_11 >= 2147483647:::INT8)) OR (table4.col4_10 >= (-128):::INT8), INVERTED INDEX (col4_5 ASC, col4_8 DESC, col4_6 DESC, col4_7 ASC) WHERE ((((((table4.col4_1 >= 'Infinity':::DECIMAL) OR (table4.col4_5 = (-128):::INT8)) OR (table4.col4_12 >= (-1):::INT8)) OR (table4.col4_10 > 0:::INT8)) OR (table4.col4_4 != '0001-01-01 00:00:00+00:00':::TIMESTAMPTZ)) OR (table4.col4_2 != (-1):::INT8)) OR (table4.col4_11 >= (-2147483648):::INT8));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1896063980568985159, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4321248987156156060}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 19242466915, "histo_buckets": [{"distinct_range": 0, "num_eq": 60000, "num_range": 0, "upper_bound": "\\\\x37000300010a"}, {"distinct_range": 7986449783317418000, "num_eq": 3418363690076749107, "num_range": 7986449783317418103, "upper_bound": "\\\\x370003000112666f6f0001"}, {"distinct_range": 4053.487147418769, "num_eq": 7054998606119861632, "num_range": 20000, "upper_bound": "\\\\x370003000138"}, {"distinct_range": 3647184663374510000, "num_eq": 0, "num_range": 3647184663374510008, "upper_bound": "\\\\x370003000300010a"}, {"distinct_range": 0, "num_eq": 7682914977275943631, "num_range": 0, "upper_bound": "\\\\x37000300030001296d434fa73599470c00"}, {"distinct_range": 0, "num_eq": 4055058395922136750, "num_range": 0, "upper_bound": "\\\\x370003000300012a0517b567957319b78200"}, {"distinct_range": 0, "num_eq": 0, "num_range": 20000000, "upper_bound": "\\\\x37000300030003000100"}, {"distinct_range": 374570018010904770, "num_eq": 4000000000, "num_range": 4992062981922731165, "upper_bound": "\\\\x3700030003000300010a"}, {"distinct_range": 3643175.4417379494, "num_eq": 2027795294292395902, "num_range": 4000000, "upper_bound": "\\\\x3700030003000300010b"}, {"distinct_range": 4211476958198611500, "num_eq": 4053175867485691278, "num_range": 4211476958198611362, "upper_bound": "\\\\x37000300030003000139"}, {"distinct_range": 700, "num_eq": 7000000, "num_range": 700, "upper_bound": "\\\\x370003000300030003000300012a034f9ba935433127ac00"}, {"distinct_range": 1850676813801677600, "num_eq": 9000, "num_range": 3360178051262634155, "upper_bound": "\\\\x37000300030003000362000139"}, {"distinct_range": 6670647147.03109, "num_eq": 3473911709595353107, "num_range": 7000000000, "upper_bound": "\\\\x370003000300030003666f6f626172000139"}, {"distinct_range": 0, "num_eq": 1195278961177638332, "num_range": 90000000000, "upper_bound": "\\\\x3700030003584171000100"}, {"distinct_range": 6485172.10046153, "num_eq": 90000000000, "num_range": 7000000, "upper_bound": "\\\\x370003626172000139"}, {"distinct_range": 4416746003626055000, "num_eq": 6970675822324762667, "num_range": 4506547317092641490, "upper_bound": "\\\\x37000363000138"}, {"distinct_range": 4724636402090777000, "num_eq": 946873246530552910, "num_range": 4724636402090776702, "upper_bound": "\\\\x3757605a6c47326b715d000265452a4b2900020003000138"}, {"distinct_range": 8828917.152947543, "num_eq": 30000, "num_range": 30000000, "upper_bound": "\\\\x3761000138"}, {"distinct_range": 0, "num_eq": 2756233520790929169, "num_range": 20, "upper_bound": "\\\\x376300023274637530000138"}, {"distinct_range": 2904512663989634600, "num_eq": 7666154001669535936, "num_range": 7925724632949872349, "upper_bound": "\\\\x3763000262617a00025b5b387c000100"}, {"distinct_range": 150383518531104900, "num_eq": 3764260347711132761, "num_range": 2060665544178304538, "upper_bound": "\\\\x37630002633e445a732c392a355e00020003000100"}, {"distinct_range": 35488741758340590, "num_eq": 60000000, "num_range": 2086503941485226784, "upper_bound": "\\\\x37630002633e445a732c392a355e00020003000139"}, {"distinct_range": 8231040778109353000, "num_eq": 6209646455058358362, "num_range": 8231040778109352801, "upper_bound": "\\\\x376b40454d6b675d3c000139"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 10457560240, "row_count": 40000000000}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4700413332, "histo_col_type": "", "name": "__auto__", "null_count": 9744211081, "row_count": 40000000000}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 36332900242, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 40000000000}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 23260450181, "histo_col_type": "", "name": "__auto__", "null_count": 35054710602, "row_count": 40000000000}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 654008311, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 40000000000}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31123018266, "histo_buckets": [{"distinct_range": 0, "num_eq": 7000, "num_range": 0, "upper_bound": "\\u0004\\u001czG"}, {"distinct_range": 4477258619189760500, "num_eq": 60000000, "num_range": 4477258619189760758, "upper_bound": "\\u000f\\u001ac\x7fZ"}, {"distinct_range": 6647057567663616000, "num_eq": 3000000000, "num_range": 6647057567663615880, "upper_bound": "!z"}, {"distinct_range": 139348896.90450108, "num_eq": 90000000, "num_range": 2000000000, "upper_bound": "-D"}, {"distinct_range": 5584030666788399000, "num_eq": 6202421010462981822, "num_range": 7253020328563471091, "upper_bound": "C\\u001d\\u0015t"}, {"distinct_range": 0, "num_eq": 4287052907210226516, "num_range": 300000000, "upper_bound": "b\\u0017k\\u0010\\u0007\\u001e"}, {"distinct_range": 0, "num_eq": 10000000, "num_range": 151240909456837290, "upper_bound": "u3&L@\\u0013\\u001d\\u0018"}], "histo_col_type": "VARCHAR", "name": "__auto__", "null_count": 0, "row_count": 40000000000}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS '[{"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 976671497893410641, "histo_buckets": [{"distinct_range": 0, "num_eq": 2368104248048898834, "num_range": 0, "upper_bound": "1648058232"}, {"distinct_range": 2054188645587017700, "num_eq": 3358157411110456675, "num_range": 2803290341249972603, "upper_bound": "1679081694"}], "histo_col_type": "OID", "name": "__auto__", "null_count": 0, "row_count": 2887767071252609901}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2691251985188188538, "histo_buckets": [{"distinct_range": 0, "num_eq": 40000000, "num_range": 0, "upper_bound": "00011001011001110"}, {"distinct_range": 4192774896456348700, "num_eq": 1316335089498944259, "num_range": 4192774896456348679, "upper_bound": "01101111010010010"}, {"distinct_range": 8000000000, "num_eq": 1000, "num_range": 8000000000, "upper_bound": "11100100001100111"}, {"distinct_range": 0, "num_eq": 3249659695071857091, "num_range": 0, "upper_bound": "11100100111101101"}], "histo_col_type": "BIT(17)", "name": "__auto__", "null_count": 0, "row_count": 2887767071252609901}, {"columns": ["col3_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1018215590543310803, "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 2887767071252609901}, {"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2865100149938928572, "histo_col_type": "", "name": "__auto__", "null_count": 804388935138426247, "row_count": 2887767071252609901}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 724682723355862580, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2887767071252609901}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1629524658446318680, "histo_col_type": "", "name": "__auto__", "null_count": 2052031449338595061, "row_count": 2887767071252609901}, {"columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1263193944094135461, "histo_col_type": "", "name": "__auto__", "null_count": 782329837659592925, "row_count": 2887767071252609901}, {"columns": ["col3_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2604640282427482281, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2887767071252609901}, {"columns": ["col3_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2766372497839868624, "histo_col_type": "", "name": "__auto__", "null_count": 2306216169442713576, "row_count": 2887767071252609901}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1325769237845948382, "histo_buckets": [{"distinct_range": 0, "num_eq": 20000000, "num_range": 0, "upper_bound": "1675574605"}], "histo_col_type": "OID", "name": "__auto__", "null_count": 2659368814227180477, "row_count": 2887767071252609901}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 910239789882505116, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2887767071252609901}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 249518257219263937, "histo_col_type": "", "name": "__auto__", "null_count": 104668693934990392, "row_count": 2887767071252609901}, {"columns": ["col3_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1459409835221992341, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2887767071252609901}, {"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2351950767714134216, "histo_buckets": [{"distinct_range": 0, "num_eq": 4488336833169190037, "num_range": 0, "upper_bound": "242284561"}, {"distinct_range": 126062.46528750916, "num_eq": 8000, "num_range": 300000, "upper_bound": "333259869"}, {"distinct_range": 0, "num_eq": 3056148124138695177, "num_range": 391227903271169759, "upper_bound": "1537958892"}, {"distinct_range": 50000000, "num_eq": 8585865094938853549, "num_range": 50000000, "upper_bound": "2401225192"}, {"distinct_range": 0, "num_eq": 5000000000, "num_range": 100000000, "upper_bound": "2416255436"}], "histo_col_type": "REGPROCEDURE", "name": "__auto__", "null_count": 7636991407773768, "row_count": 2887767071252609901}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2130144911921580770, "histo_col_type": "", "name": "__auto__", "null_count": 775097549292438964, "row_count": 2887767071252609901}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS e'[{"columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 482, "histo_buckets": [{"distinct_range": 0, "num_eq": 1766590504915777744, "num_range": 0, "upper_bound": ""}, {"distinct_range": 8383104847613516000, "num_eq": 5124511490869941783, "num_range": 8383104847613515789, "upper_bound": "\\u0006\\t.-\\u000f"}, {"distinct_range": 0, "num_eq": 3334291112116708395, "num_range": 0, "upper_bound": "*D"}, {"distinct_range": 30, "num_eq": 6465145348336069946, "num_range": 30, "upper_bound": "U\\u001baC\\u0002&3Eh"}, {"distinct_range": 850028104810066000, "num_eq": 50000000000, "num_range": 1242250618807675133, "upper_bound": "WUA{\\u0006"}, {"distinct_range": 27.815623320568832, "num_eq": 3000, "num_range": 200, "upper_bound": "lYI]1m"}, {"distinct_range": 151.54584665535836, "num_eq": 900000000, "num_range": 200, "upper_bound": "q9ypib,:"}, {"distinct_range": 2145938995.4572756, "num_eq": 2852151610235769359, "num_range": 5000000000, "upper_bound": "s\\u0004\\u0001N"}, {"distinct_range": 0, "num_eq": 8898233546167508635, "num_range": 5919844857242883439, "upper_bound": "u\\u000cp3}\\u0011"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 3000}, {"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1103, "histo_buckets": [{"distinct_range": 0, "num_eq": 20000, "num_range": 0, "upper_bound": "645020916"}, {"distinct_range": 200000, "num_eq": 30000, "num_range": 200000, "upper_bound": "2015082346"}, {"distinct_range": 6815520195118336000, "num_eq": 300, "num_range": 6815520195118336317, "upper_bound": "2082020393"}, {"distinct_range": 0, "num_eq": 5523022115838038279, "num_range": 1670486860035208020, "upper_bound": "3969591384"}], "histo_col_type": "OID", "name": "__auto__", "null_count": 1828, "row_count": 3000}, {"columns": ["col4_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 725, "histo_col_type": "", "name": "__auto__", "null_count": 2814, "row_count": 3000}, {"columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1414, "histo_col_type": "", "name": "__auto__", "null_count": 2721, "row_count": 3000}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1938, "histo_col_type": "", "name": "__auto__", "null_count": 2757, "row_count": 3000}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1940, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3000}, {"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1667, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 3000}, {"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 319, "histo_buckets": [{"distinct_range": 0, "num_eq": 400000, "num_range": 0, "upper_bound": "513886684"}, {"distinct_range": 0, "num_eq": 10000000, "num_range": 900000, "upper_bound": "534756846"}, {"distinct_range": 0, "num_eq": 3991010453578688845, "num_range": 700, "upper_bound": "625515665"}, {"distinct_range": 178336525470517630, "num_eq": 2830949616244704881, "num_range": 2665897299738609811, "upper_bound": "1310685245"}], "histo_col_type": "REGPROC", "name": "__auto__", "null_count": 0, "row_count": 3000}, {"columns": ["col4_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1836, "histo_buckets": [{"distinct_range": 0, "num_eq": 1773159571008471852, "num_range": 0, "upper_bound": "-32169"}, {"distinct_range": 0, "num_eq": 3338112297465805983, "num_range": 6000000, "upper_bound": "-17501"}, {"distinct_range": 700, "num_eq": 6544757562192742691, "num_range": 700, "upper_bound": "-10290"}, {"distinct_range": 0, "num_eq": 10000000, "num_range": 0, "upper_bound": "-8124"}, {"distinct_range": 800000000, "num_eq": 1172076889734364954, "num_range": 800000000, "upper_bound": "0"}, {"distinct_range": 1757235.1294143395, "num_eq": 1000, "num_range": 7000000, "upper_bound": "23185"}, {"distinct_range": 0, "num_eq": 6236000400754098578, "num_range": 0, "upper_bound": "23470"}], "histo_col_type": "INT2", "name": "__auto__", "null_count": 0, "row_count": 3000}, {"columns": ["col4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 119, "histo_col_type": "", "name": "__auto__", "null_count": 677, "row_count": 3000}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2418, "histo_col_type": "", "name": "__auto__", "null_count": 921, "row_count": 3000}, {"columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 115, "histo_buckets": [{"distinct_range": 0, "num_eq": 7996599190449798809, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 2900176314173305300, "num_eq": 100, "num_range": 2900176314173305127, "upper_bound": "410300461"}, {"distinct_range": 0, "num_eq": 40, "num_range": 5051520115304582571, "upper_bound": "1072298261"}, {"distinct_range": 3290822314017077000, "num_eq": 1968534400781797253, "num_range": 3290822314017077148, "upper_bound": "2080856596"}], "histo_col_type": "INT4", "name": "__auto__", "null_count": 117, "row_count": 3000}, {"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1792, "histo_buckets": [{"distinct_range": 0, "num_eq": 4197554154605126210, "num_range": 0, "upper_bound": "BOX(-1.8120564549062976 -0.7588853029537816,-0.6891050939096421 0.5774322803014795)"}, {"distinct_range": 453.49529211655226, "num_eq": 10000000, "num_range": 600, "upper_bound": "BOX(-1.7795327534527705 -1.2247701021893056,-1.4371829720020943 1.910737331022414)"}, {"distinct_range": 0, "num_eq": 10000000000, "num_range": 100, "upper_bound": "BOX(-1.3066407947656096 -0.9167435066406205,2.128390771644355 -0.23167666848939153)"}, {"distinct_range": 0, "num_eq": 60000, "num_range": 100000000, "upper_bound": "BOX(-0.444796780975934 -1.0829640614567573,0.02035792456246549 -0.09560061577393669)"}, {"distinct_range": 255578965.31703234, "num_eq": 60000000000, "num_range": 300000000, "upper_bound": "BOX(0.35480911056834114 0.12710568013412687,0.3753389773037105 0.3567065120342173)"}], "histo_col_type": "BOX2D", "name": "__auto__", "null_count": 0, "row_count": 3000}]':::JSONB;
        ALTER TABLE table1 ADD FOREIGN KEY (col1_0) REFERENCES table3 (col3_10) ON DELETE RESTRICT;
        CREATE TYPE rand_typ_0 AS ENUM ('pqcjo', 'oxbp', 'b');
        CREATE TYPE rand_typ_1 AS ENUM ('wr');
        ;
    rsg_test.go:595: 
        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:597: 
    rsg_test.go:598: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith024252242
--- FAIL: TestRandomSyntaxSQLSmith (300.75s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 4073f3f052c13d22cc25a74588ed05a6e08facc6:

        		AS (
        			SELECT
        				*
        			FROM
        				(
        					VALUES
        						('0.0.0.0/0':::INET),
        						('c622:49e:9a44:55dd:b0df:73c0:3b8e:2be3/56':::INET),
        						('c62:6ecf:f3f0:1eeb:a292:5c8b:5d88:dd1d/56':::INET),
        						('2cba:a9ae:32f5:f4f:39b9:aaf5:430c:eef3/73':::INET),
        						('912f:4f0a:3bb6:5107:2afa:afda:b0e0:778f/11':::INET),
        						('171.209.60.214/31':::INET)
        				)
        					AS tab_668628 (col_1491081)
        		),
        	with_273036 (col_1491082)
        		AS (
        			SELECT
        				'11:10:12.418048':::TIME AS col_1491082
        			FROM
        				defaultdb.public.table5@table5_col5_4_col5_3_col5_9_idx AS tab_668629
        		)
        SELECT
        	1668440635:::OID AS col_1491083,
        	tab_668630.col5_8 AS col_1491084,
        	tab_668630.crdb_internal_mvcc_timestamp AS col_1491085,
        	'0101000000C0D5F7DB26EBD241BAA6C866F5DCFCC1':::GEOMETRY AS col_1491086,
        	tab_668630.col5_9 AS col_1491087,
        	NULL AS col_1491088,
        	'1971-05-12':::DATE AS col_1491089,
        	2539597503:::OID AS col_1491091,
        	'"C3hPsQ)l"':::JSONB AS col_1491092,
        	e'\x04?':::STRING AS col_1491093,
        	tab_668630.col5_5 AS col_1491094,
        	tab_668630.col5_3 AS col_1491095
        FROM
        	defaultdb.public.table5@table5_col5_9_col5_4_col5_7_col5_8_col5_5_col5_1_col5_6_key AS tab_668630
        ORDER BY
        	tab_668630.col5_9 ASC, tab_668630.col5_8;
    rsg_test.go:585: ERROR: pq: index "table5_col5_8_col5_7_col5_5_col5_6_col5_9_idx" is a partial index that does not contain all the rows needed to execute this query
        caused by:
        SELECT
        	e'\'':::STRING AS col_1491370, tab_668760.col5_9 AS col_1491371
        FROM
        	defaultdb.public.table1@[0] AS tab_668759,
        	defaultdb.public.table5@table5_col5_8_col5_7_col5_5_col5_6_col5_9_idx AS tab_668760
        ORDER BY
        	tab_668760.col5_5 ASC
        LIMIT
        	65:::INT8;
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 55f6c679a1b87113bea998e15f991007a13c412f:

        CREATE TABLE table2 (col2_0 NAME, col2_1 REGCLASS NULL, col2_2 DECIMAL[] NULL, col2_3 REGCLASS NOT NULL, col2_4 INT2 NOT NULL, col2_5 INT4 NOT NULL, col2_6 VARCHAR NOT NULL, col2_7 BIT(20), col2_8 TIMESTAMPTZ NULL, col2_9 INT8 NULL, col2_10 REGCLASS NULL, col2_11 INTERVAL NOT NULL, col2_12 GEOGRAPHY NOT NULL, col2_13 FLOAT4, col2_14 INT4 NOT NULL, col2_15 STRING NOT NULL AS (lower(CAST(col2_11 AS STRING))) STORED, col2_16 STRING NOT NULL AS (lower(CAST(col2_7 AS STRING))) STORED, col2_17 INT2 NOT NULL AS (((col2_4 + col2_14) + col2_5) + col2_9) STORED, UNIQUE (col2_14, col2_5 ASC, col2_1 DESC, col2_10, col2_9 ASC, col2_8 DESC, col2_11, col2_4, col2_6 DESC) WHERE (((table2.col2_17 <= 0:::INT8) AND (table2.col2_5 = 32767:::INT8)) OR (table2.col2_16 <= e'\x00':::STRING)) OR (table2.col2_0 = '':::STRING), INDEX (col2_1 DESC, col2_11 DESC, col2_13 DESC) WHERE (((((((((table2.col2_6 > e'\'':::STRING) AND (table2.col2_16 = 'X':::STRING)) OR (table2.col2_8 > '3000-01-01 00:00:00+00:00':::TIMESTAMPTZ)) AND (table2.col2_4 >= 32767:::INT8)) OR (table2.col2_15 >= '':::STRING)) AND (table2.col2_0 <= e'\x00':::STRING)) AND (table2.col2_14 > (-1):::INT8)) OR (table2.col2_5 < (-1):::INT8)) AND (table2.col2_17 >= (-1):::INT8)) OR (table2.col2_13 <= 'NaN':::FLOAT8), UNIQUE (col2_4, col2_1 ASC, col2_5 ASC, col2_9 DESC, col2_15 DESC, col2_17 ASC, col2_11 ASC, col2_6 DESC, col2_16 DESC, col2_0 DESC, col2_13 ASC, col2_8) STORING (col2_2, col2_3, col2_10, col2_12) WHERE ((((((((((table2.col2_6 != e'\x00':::STRING) AND (table2.col2_8 = '-4713-11-24 00:00:00+00:00':::TIMESTAMPTZ)) AND (table2.col2_9 > (-9223372036854775807):::INT8)) AND (table2.col2_17 > (-1):::INT8)) OR (table2.col2_16 = e'\U00002603':::STRING)) OR (table2.col2_0 < 'X':::STRING)) OR (table2.col2_13 < 0.0:::FLOAT8)) OR (table2.col2_5 < (-1):::INT8)) OR (table2.col2_14 = 1:::INT8)) OR (table2.col2_15 != 'X':::STRING)) AND (table2.col2_4 = 1:::INT8));
        CREATE TABLE table3 (col3_0 REGNAMESPACE NOT NULL, col3_1 INT8 NOT NULL, col3_2 INET NOT NULL, col3_3 DATE NOT NULL, col3_4 DECIMAL NOT NULL, col3_5 VARCHAR NOT NULL, col3_6 STRING NOT NULL, col3_7 "char" NOT NULL, col3_8 OID NOT NULL, col3_9 JSONB NOT NULL, INDEX (col3_5, col3_1, col3_3), UNIQUE (col3_1 ASC) WHERE (table3.col3_5 >= '':::STRING) OR (table3.col3_3 <= '1970-01-01':::DATE), UNIQUE (col3_3 ASC) STORING (col3_0, col3_1, col3_6, col3_7, col3_8) WHERE ((table3.col3_4 != 0:::DECIMAL) OR (table3.col3_3 != '-infinity':::DATE)) OR (table3.col3_7 >= e'\x00':::STRING), FAMILY (col3_3), FAMILY (col3_2), FAMILY (col3_7), FAMILY (col3_8), FAMILY (col3_9), FAMILY (col3_5), FAMILY (col3_0, col3_4), FAMILY (col3_6, col3_1));
        CREATE TABLE table4 (col4_0 INET, col4_1 BIT(22) NULL, col4_2 GEOGRAPHY NULL, col4_3 "char" NOT NULL, col4_4 BYTES, col4_5 UUID, col4_6 INT2 NULL, col4_7 TIME NOT NULL, col4_8 TIMESTAMPTZ NOT NULL, col4_9 OID, col4_10 BIT(7) NOT NULL, col4_11 DECIMAL, col4_12 GEOMETRY, col4_13 REGPROC NOT NULL, col4_14 OID NULL, col4_15 BYTES, col4_16 REGCLASS NOT NULL, col4_17 JSONB, col4_18 STRING NOT NULL AS (CASE WHEN col4_4 IS NULL THEN e'?Q\'2}':::STRING ELSE e' );o\x11@~f':::STRING END) VIRTUAL, UNIQUE (col4_18 ASC, col4_11, col4_8 DESC, col4_9 ASC, col4_5 ASC, col4_1) STORING (col4_7, col4_13, col4_15, col4_16, col4_17) WHERE ((((((table4.col4_8 >= '-2000-01-01 00:00:00+00:00':::TIMESTAMPTZ) AND (table4.col4_3 >= e'\U00002603':::STRING)) AND (table4.col4_18 > e'\U00002603':::STRING)) AND (table4.col4_6 < (-1):::INT8)) AND (table4.col4_11 != 0:::DECIMAL)) OR (table4.col4_7 >= '24:00:00':::TIME)) OR (table4.col4_15 != '\x27':::BYTES), FAMILY (col4_16, col4_2), FAMILY (col4_13, col4_15), FAMILY (col4_3), FAMILY (col4_5), FAMILY (col4_1), FAMILY (col4_0, col4_8), FAMILY (col4_9), FAMILY (col4_7, col4_11), FAMILY (col4_10), FAMILY (col4_12, col4_17, col4_4), FAMILY (col4_6), FAMILY (col4_14));
        CREATE TABLE table5 (col5_0 VARCHAR[] NOT NULL, col5_1 INT8 NOT NULL, col5_2 DATE NULL, col5_3 TIMETZ NOT NULL, col5_4 INT4 NOT NULL, col5_5 REGNAMESPACE, col5_6 "char", col5_7 JSONB NOT NULL, col5_8 TIMESTAMPTZ NOT NULL, col5_9 INT8 NOT NULL AS (col5_1 + col5_4) STORED, col5_10 INT4 NULL AS (col5_4 + col5_1) STORED, col5_11 INT8 NULL AS (col5_1 + col5_4) VIRTUAL, col5_12 INT4 AS (col5_4 + col5_1) VIRTUAL, col5_13 INT8 NOT NULL AS (col5_1 + col5_4) VIRTUAL, col5_14 INT4 NOT NULL AS (col5_4 + col5_1) VIRTUAL, col5_15 STRING AS (lower(CAST(col5_2 AS STRING))) VIRTUAL, INDEX (col5_11, col5_15 ASC, col5_4), INDEX (col5_9 ASC, col5_4 DESC, col5_6 DESC) STORING (col5_1, col5_7, col5_10) WHERE (((((table5.col5_12 > 1:::INT8) AND (table5.col5_3 != '00:00:00+15:59:00':::TIMETZ)) OR (table5.col5_1 < 9223372036854775807:::INT8)) OR (table5.col5_14 < 2147483647:::INT8)) OR (table5.col5_11 <= 2147483647:::INT8)) AND (table5.col5_8 != '0001-01-01 00:00:00+00:00':::TIMESTAMPTZ), FAMILY (col5_7), FAMILY (col5_2), FAMILY (col5_6), FAMILY (col5_1), FAMILY (col5_9, col5_8, col5_5), FAMILY (col5_4, col5_3), FAMILY (col5_0), FAMILY (col5_10));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1033586144358936106, "histo_buckets": [{"distinct_range": 0, "num_eq": 70000000, "num_range": 0, "upper_bound": "168332007"}, {"distinct_range": 4861.426454528432, "num_eq": 4274779968319976084, "num_range": 8000, "upper_bound": "324509743"}, {"distinct_range": 4472609273002912300, "num_eq": 8071101449569889595, "num_range": 4472609273002912022, "upper_bound": "515146924"}, {"distinct_range": 100000000000, "num_eq": 1165989804849437292, "num_range": 100000000000, "upper_bound": "630241150"}, {"distinct_range": 0, "num_eq": 50, "num_range": 476612828204668003, "upper_bound": "1774575041"}, {"distinct_range": 0, "num_eq": 5750596915637164722, "num_range": 1000000, "upper_bound": "2548676997"}, {"distinct_range": 9011163946669225000, "num_eq": 0, "num_range": 9011163946669225358, "upper_bound": "2651640459"}, {"distinct_range": 5059695777788340000, "num_eq": 0, "num_range": 5060996190372407009, "upper_bound": "3575683966"}, {"distinct_range": 70, "num_eq": 7398635720226621092, "num_range": 70, "upper_bound": "3993753669"}], "histo_col_type": "REGCLASS", "name": "__auto__", "null_count": 3226162306783977431, "row_count": 4229296652510866448}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1833246444895878079, "histo_buckets": [{"distinct_range": 0, "num_eq": 9000, "num_range": 0, "upper_bound": "1095917126"}, {"distinct_range": 0, "num_eq": 5796191237342188350, "num_range": 2218252721822255444, "upper_bound": "2702172093"}, {"distinct_range": 10000000000, "num_eq": 600000, "num_range": 10000000000, "upper_bound": "2873075511"}, {"distinct_range": 8048849043811289000, "num_eq": 30, "num_range": 8821063250381294314, "upper_bound": "3030643610"}, {"distinct_range": 3703366.1097132224, "num_eq": 3572393020547403199, "num_range": 10000000, "upper_bound": "3146881773"}, {"distinct_range": 541169536302556200, "num_eq": 20000000000, "num_range": 3072638460576893479, "upper_bound": "4285385896"}], "histo_col_type": "REGPROC", "name": "__auto__", "null_count": 3255196181124847577, "row_count": 4229296652510866448}, {"columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 801743703092157842, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4229296652510866448}, {"columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2528126523541316972, "histo_col_type": "", "name": "__auto__", "null_count": 1147311246293521261, "row_count": 4229296652510866448}, {"columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3210870784617753334, "histo_col_type": "", "name": "__auto__", "null_count": 349410667320791226, "row_count": 4229296652510866448}, {"columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3232260584316793546, "histo_col_type": "", "name": "__auto__", "null_count": 966396752922661160, "row_count": 4229296652510866448}, {"columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 558685113070718787, "histo_col_type": "", "name": "__auto__", "null_count": 1997521428558500221, "row_count": 4229296652510866448}, {"columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 986989711764324489, "histo_col_type": "", "name": "__auto__", "null_count": 2808898831648008735, "row_count": 4229296652510866448}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2158023154141354705, "histo_col_type": "", "name": "__auto__", "null_count": 2445335928615755524, "row_count": 4229296652510866448}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3371970739701182358, "histo_col_type": "", "name": "__auto__", "null_count": 1480805288165484745, "row_count": 4229296652510866448}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 336101756874663060, "histo_buckets": [{"distinct_range": 0, "num_eq": 3454306605124078696, "num_range": 0, "upper_bound": "22edd24c-123d-4ff9-a186-4ae5726c66f4"}], "histo_col_type": "UUID", "name": "__auto__", "null_count": 1723858347253329736, "row_count": 4229296652510866448}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 844544545206487937, "histo_col_type": "", "name": "__auto__", "null_count": 350200890715961646, "row_count": 4229296652510866448}, {"columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 801109617257099420, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4229296652510866448}, {"columns": ["col1_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1903314682866402236, "histo_col_type": "", "name": "__auto__", "null_count": 3731294379630406715, "row_count": 4229296652510866448}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3819235334220677115, "histo_col_type": "", "name": "__auto__", "null_count": 2015439902143519387, "row_count": 4229296652510866448}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2043747750188287511, "histo_col_type": "", "name": "__auto__", "null_count": 496443844583200359, "row_count": 4229296652510866448}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1918345828409544692, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4229296652510866448}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1092984, "histo_buckets": [{"distinct_range": 0, "num_eq": 1000000, "num_range": 0, "upper_bound": "332429189"}, {"distinct_range": 80000, "num_eq": 680461827160978699, "num_range": 80000, "upper_bound": "1140920076"}, {"distinct_range": 0, "num_eq": 1000000, "num_range": 2010742541633562365, "upper_bound": "1565745416"}, {"distinct_range": 0, "num_eq": 1120091548437697605, "num_range": 7582109033836576870, "upper_bound": "2161222037"}, {"distinct_range": 5100344196093687000, "num_eq": 900000, "num_range": 5100344196093686396, "upper_bound": "2813580163"}, {"distinct_range": 200000000, "num_eq": 50000, "num_range": 200000000, "upper_bound": "2880542139"}, {"distinct_range": 0, "num_eq": 7624526168000368272, "num_range": 2642998540156627704, "upper_bound": "3228093114"}], "histo_col_type": "REGCLASS", "name": "__auto__", "null_count": 1147196, "row_count": 4000000}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 29314, "histo_col_type": "", "name": "__auto__", "null_count": 69315, "row_count": 4000000}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2039965, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000}, {"columns": ["col2_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2374179, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000}, {"columns": ["col2_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1387193, "histo_col_type": "", "name": "__auto__", "null_count": 3635073, "row_count": 4000000}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3546954, "histo_col_type": "", "name": "__auto__", "null_count": 54996, "row_count": 4000000}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1133311, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2342422, "histo_col_type": "", "name": "__auto__", "null_count": 1898359, "row_count": 4000000}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 432696, "histo_col_type": "", "name": "__auto__", "null_count": 1039534, "row_count": 4000000}, {"columns": ["col2_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1901274, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 459725, "histo_col_type": "", "name": "__auto__", "null_count": 2084488, "row_count": 4000000}, {"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1483147, "histo_col_type": "", "name": "__auto__", "null_count": 1263246, "row_count": 4000000}, {"columns": ["col2_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 697602, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000}, {"columns": ["col2_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2576543, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000}, {"columns": ["col2_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1655959, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1324813, "histo_buckets": [{"distinct_range": 0, "num_eq": 90000000000, "num_range": 0, "upper_bound": "-22527"}, {"distinct_range": 40000000000, "num_eq": 9000000, "num_range": 40000000000, "upper_bound": "17409"}], "histo_col_type": "INT2", "name": "__auto__", "null_count": 0, "row_count": 4000000}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2434190, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000}, {"columns": ["col2_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2761380, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 4000000}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS e'[{"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2032472253809013579, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 401777411953567982, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1067944170265169149, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2292870643409436036, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1553912417371829120, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1855269663966735789, "histo_buckets": [{"distinct_range": 0, "num_eq": 0, "num_range": 0, "upper_bound": "-5849629096185658953"}, {"distinct_range": 0, "num_eq": 7405690615673556262, "num_range": 4000000000, "upper_bound": "-2739495117581550884"}, {"distinct_range": 0, "num_eq": 4000000000, "num_range": 0, "upper_bound": "0"}, {"distinct_range": 4383502089991194000, "num_eq": 300, "num_range": 4383502089991194176, "upper_bound": "2602370010394001863"}, {"distinct_range": 0, "num_eq": 5638609219343912893, "num_range": 125372904516330265, "upper_bound": "2795414638530734640"}, {"distinct_range": 300000, "num_eq": 8000000000, "num_range": 300000, "upper_bound": "9185992909866461932"}], "histo_col_type": "INT8", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}, {"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2484431527653169736, "histo_buckets": [{"distinct_range": 0, "num_eq": 4000000, "num_range": 0, "upper_bound": "\\u0004"}, {"distinct_range": 2067661530068801300, "num_eq": 5831633620688511579, "num_range": 4237648302988623179, "upper_bound": "\\u000eQJ\\u0003\\u0011"}], "histo_col_type": "VARCHAR", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 705490840411256809, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2440941488849289050, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}, {"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1561099631622941836, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2871534579295519034}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS '[{"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_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}, {"columns": ["col4_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}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_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}, {"columns": ["col4_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}, {"columns": ["col4_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_18"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_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}, {"columns": ["col4_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}, {"columns": ["col4_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}, {"columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col4_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}]':::JSONB;
        ALTER TABLE table5 INJECT STATISTICS '[{"columns": ["col5_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 526112287, "histo_col_type": "", "name": "__auto__", "null_count": 1819655301, "row_count": 9000000000}, {"columns": ["col5_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1058351613, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 9000000000}, {"columns": ["col5_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2427743695, "histo_buckets": [{"distinct_range": 0, "num_eq": 6227751159500040463, "num_range": 0, "upper_bound": "-8638824708773781290"}, {"distinct_range": 1000000000, "num_eq": 5236758677076282753, "num_range": 1000000000, "upper_bound": "1334897927677913948"}, {"distinct_range": 2763127142020383000, "num_eq": 6940183943314012897, "num_range": 3211453821008674850, "upper_bound": "5402538326049176075"}, {"distinct_range": 756600497103105200, "num_eq": 500000000, "num_range": 2619850200597801452, "upper_bound": "6521801244914985074"}, {"distinct_range": 70000000000, "num_eq": 5775065278695896980, "num_range": 70000000000, "upper_bound": "7908246146703093369"}], "histo_col_type": "INT8", "name": "__auto__", "null_count": 6501776111, "row_count": 9000000000}, {"columns": ["col5_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1575117801, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 9000000000}, {"columns": ["col5_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 862699822, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 9000000000}, {"columns": ["col5_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8565050815, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 9000000000}, {"columns": ["col5_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5369152371, "histo_col_type": "", "name": "__auto__", "null_count": 4784023568, "row_count": 9000000000}, {"columns": ["col5_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3606047322, "histo_col_type": "", "name": "__auto__", "null_count": 2233541641, "row_count": 9000000000}, {"columns": ["col5_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1662396869, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 9000000000}, {"columns": ["col5_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1379694061, "histo_col_type": "", "name": "__auto__", "null_count": 3474952667, "row_count": 9000000000}, {"columns": ["col5_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2703470802, "histo_col_type": "", "name": "__auto__", "null_count": 3465406220, "row_count": 9000000000}, {"columns": ["col5_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1621374851, "histo_col_type": "", "name": "__auto__", "null_count": 865649472, "row_count": 9000000000}, {"columns": ["col5_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3257686224, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 9000000000}, {"columns": ["col5_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3330387900, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 9000000000}, {"columns": ["col5_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6884141119, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 9000000000}, {"columns": ["col5_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4684662416, "histo_buckets": [{"distinct_range": 0, "num_eq": 400, "num_range": 0, "upper_bound": "-6609166123190727019"}, {"distinct_range": 0, "num_eq": 6142422537360086514, "num_range": 8033479960898853231, "upper_bound": "-4735224115190710241"}, {"distinct_range": 0, "num_eq": 3797345310717043830, "num_range": 10000000000, "upper_bound": "-4373346009242722861"}, {"distinct_range": 0, "num_eq": 500000, "num_range": 7370872482872166955, "upper_bound": "-3268020527897548236"}, {"distinct_range": 0, "num_eq": 100000000, "num_range": 2130083661877222294, "upper_bound": "2646470960139399717"}, {"distinct_range": 0, "num_eq": 0, "num_range": 600, "upper_bound": "3158761095673767054"}, {"distinct_range": 379941.52585675975, "num_eq": 2155387324322412537, "num_range": 900000, "upper_bound": "5154938362981688591"}], "histo_col_type": "INT8", "name": "__auto__", "null_count": 0, "row_count": 9000000000}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('ak', 'xgf');
        CREATE TYPE rand_typ_1 AS ENUM ('ley', 'ijdy', 'lyy', 'dnfjai');
        CREATE TYPE rand_typ_2 AS ENUM ('zux');
        CREATE TYPE rand_typ_3 AS ENUM ('mv', 'hdnmc', 'veu', 'dgkwp', 'k');
        CREATE TYPE rand_typ_4 AS ENUM ('twd');
        ;
    rsg_test.go:595: 
        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:597: 
    rsg_test.go:598: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith368618169
--- FAIL: TestRandomSyntaxSQLSmith (300.59s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 2663b80c8bc3677ef509141bbe435de9e9781dbd:

    rsg_test.go:595: 
        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 INT4 NOT NULL, col1_1 VARCHAR NOT NULL, col1_2 JSONB NOT NULL, col1_3 GEOGRAPHY, col1_4 BIT(7), FAMILY (col1_0, col1_3, col1_2), FAMILY (col1_1), FAMILY (col1_4));
        CREATE TABLE table2 (col2_0 GEOGRAPHY NOT NULL, INVERTED INDEX (col2_0 ASC), INVERTED INDEX (col2_0 ASC), INVERTED INDEX (col2_0));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4787136494517638590, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7159493745196186106}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 601322276955507817, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7159493745196186106}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2582969226903412204, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 7159493745196186106}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2079947975639409975, "histo_col_type": "", "name": "__auto__", "null_count": 4408801314737154766, "row_count": 7159493745196186106}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 251830266700528360, "histo_col_type": "", "name": "__auto__", "null_count": 1815652443782958278, "row_count": 7159493745196186106}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 252, "histo_buckets": [{"distinct_range": 0, "num_eq": 7564549937218302945, "num_range": 0, "upper_bound": "\\\\x42fd100000000000000000c00921fb54442d18bff8a77d82fc5a09400921fb54442d183ff82e6a9083c35a"}, {"distinct_range": 500000000, "num_eq": 300000, "num_range": 500000000, "upper_bound": "\\\\x42fd11720fe2cf7a500300c005915291a72c3b3fd36d6b267c176f3fcdd919fb095b493ff729537e614e47"}, {"distinct_range": 464469902956464640, "num_eq": 2527561574731907680, "num_range": 464469902956464619, "upper_bound": "\\\\x42fd300000000000000000c00921fb54442d18bff8a77d82fc5a09400921fb54442d183ff82e6a9083c35a"}, {"distinct_range": 1973657700659883000, "num_eq": 1000000, "num_range": 1973657700659883083, "upper_bound": "\\\\x42fd3550000000000000004000cfec0080779bbff46c3157c509babff05bda42c910e63ff620949a3f9d4b"}, {"distinct_range": 0, "num_eq": 2062299873020284680, "num_range": 5913800967947211395, "upper_bound": "\\\\x42fd4eb7993c8e44a76f01bfe6a07bba0f1ef63ff206d6adef7ae6"}, {"distinct_range": 50, "num_eq": 7000, "num_range": 50, "upper_bound": "\\\\x42fd4f5d7b8117af31b500c005915291a72c3b3fd36d6b267c176f3fcdd919fb095b493ff729537e614e47"}, {"distinct_range": 5686765666044649000, "num_eq": 1475460146883502830, "num_range": 8327268668977346364, "upper_bound": "\\\\x42fd5000000000000000004000cfec0080779bbff46c3157c509babff05bda42c910e63ff620949a3f9d4b"}, {"distinct_range": 0, "num_eq": 4740489296819204477, "num_range": 0, "upper_bound": "\\\\x42fd500000000000000000c00921fb54442d18bff8a77d82fc5a09400921fb54442d183ff82e6a9083c35a"}, {"distinct_range": 6111898295133662000, "num_eq": 3904100360887392885, "num_range": 6111898295133662261, "upper_bound": "\\\\x42fd506dd5a87f61c09700c005915291a72c3b3fd36d6b267c176f3fcdd919fb095b493ff729537e614e47"}, {"distinct_range": 0, "num_eq": 6500229274673447519, "num_range": 20, "upper_bound": "\\\\x42fd5d55f57f17283287003ff96558a085c2163fd5444ee6138eb04002e44e3f1514c63fe921e3de4d17a4"}, {"distinct_range": 4558919.03032625, "num_eq": 792949423316843299, "num_range": 10000000, "upper_bound": "\\\\x42fd60a7c281143fdfcf003ff96558a085c2163fd5444ee6138eb04002e44e3f1514c63fe921e3de4d17a4"}, {"distinct_range": 700000000, "num_eq": 90, "num_range": 700000000, "upper_bound": "\\\\x42fd65577c8383edaf07004008ccb2cd79f128bff70fa56a9c8b85c005fc03768dc3cc3f89ca4e635e299f"}, {"distinct_range": 80000000, "num_eq": 1007653201020377499, "num_range": 80000000, "upper_bound": "\\\\x42fd7000000000000000004000cfec0080779bbff46c3157c509babff05bda42c910e63ff620949a3f9d4b"}, {"distinct_range": 1930513905479107600, "num_eq": 10000000, "num_range": 1930513905479107550, "upper_bound": "\\\\x42fd700000000000000000c00921fb54442d18bff8a77d82fc5a09400921fb54442d183ff82e6a9083c35a"}, {"distinct_range": 0, "num_eq": 100000, "num_range": 3000, "upper_bound": "\\\\x42fd900000000000000000c00921fb54442d18bff8a77d82fc5a09400921fb54442d183ff82e6a9083c35a"}, {"distinct_range": 0, "num_eq": 5000000, "num_range": 100000, "upper_bound": "\\\\x42fda56f1160058ef07b004008ccb2cd79f128bff70fa56a9c8b85c005fc03768dc3cc3f89ca4e635e299f"}, {"distinct_range": 0, "num_eq": 3000000, "num_range": 7689539019708679270, "upper_bound": "\\\\x42fda5725db04fdcb2a101c0054873dc3330c8bff69065962e5d6a"}, {"distinct_range": 447083696857348860, "num_eq": 6000, "num_range": 4226859684558652217, "upper_bound": "\\\\x42fdb000000000000000004000cfec0080779bbff46c3157c509babff05bda42c910e63ff620949a3f9d4b"}, {"distinct_range": 590.4442042588477, "num_eq": 10000000, "num_range": 800, "upper_bound": "\\\\x42fdb00000000000000000c00921fb54442d18bff8a77d82fc5a09400921fb54442d183ff82e6a9083c35a"}, {"distinct_range": 8713594627542016000, "num_eq": 5512941820426107613, "num_range": 8713594627542015559, "upper_bound": "\\\\x42fdb040000000000000003fd53ef347950919bff6b9be577fd74d3ff387b44f217ebcbff15778d838bcf6"}, {"distinct_range": 50, "num_eq": 5132877960583756827, "num_range": 50, "upper_bound": "\\\\x42fdb0d0000000000000003fd53ef347950919bff6b9be577fd74d3ff387b44f217ebcbff15778d838bcf6"}, {"distinct_range": 23832.55816983464, "num_eq": 0, "num_range": 90000, "upper_bound": "\\\\x42fdb0f0000000000000003fd53ef347950919bff6b9be577fd74d3ff387b44f217ebcbff15778d838bcf6"}, {"distinct_range": 0, "num_eq": 724723238691323176, "num_range": 1230257334641929886, "upper_bound": "\\\\x42fdb730000000000000003fd53ef347950919bff6b9be577fd74d3ff387b44f217ebcbff15778d838bcf6"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 3000}]':::JSONB;
        CREATE TYPE rand_typ_0 AS ENUM ('mnseaf');
        CREATE TYPE rand_typ_1 AS ENUM ('fkktwj', 'a', 'dfda', 'nbj', 'hmvest', 'wyzs');
        CREATE TYPE rand_typ_2 AS ENUM ('hklf', 'bizdd', 'up', 'dz', 'obc', 'acjrx');
        ;
    rsg_test.go:595: 
        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:597: 
    rsg_test.go:598: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith624989087
--- FAIL: TestRandomSyntaxSQLSmith (300.62s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 56744f6440827aea264ee1579bc60bf108c29fe5:

        		SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;
        		SET CLUSTER SETTING sql.defaults.interleaved_tables.enabled = true;
        	CREATE TABLE table1 (col1_0 GEOGRAPHY NULL, col1_1 UUID[], col1_2 OID NULL, col1_3 INT2, col1_4 INT2 NULL, col1_5 TIMETZ, col1_6 GEOGRAPHY NULL, col1_7 JSONB, col1_8 INT2 NOT NULL AS (col1_4 + col1_3) STORED, INVERTED INDEX (col1_1 DESC) WHERE ((table1.col1_5 < '00:00:00+15:59:00':::TIMETZ) AND (table1.col1_8 != (-1):::INT8)) AND (table1.col1_4 != 0:::INT8), INDEX (col1_4) STORING (col1_1, col1_2, col1_6) WHERE (((table1.col1_4 != (-128):::INT8) OR (table1.col1_8 >= (-1):::INT8)) AND (table1.col1_5 != '00:00:00+15:59:00':::TIMETZ)) AND (table1.col1_3 < 0:::INT8), UNIQUE (col1_3, col1_2));
        CREATE TABLE table2 (col2_0 TIMESTAMPTZ NULL, col2_1 TIMETZ, col2_2 OID, col2_3 "char" NOT NULL, col2_4 DECIMAL, col2_5 GEOMETRY NULL, col2_6 GEOGRAPHY, col2_7 BOX2D NOT NULL, col2_8 STRING NOT NULL AS (CASE WHEN col2_0 IS NULL THEN e'\'':::STRING ELSE 'X':::STRING END) STORED, col2_9 STRING NOT NULL AS (lower(CAST(col2_5 AS STRING))) STORED, col2_10 STRING AS (lower(col2_3)) STORED, UNIQUE (col2_7 DESC, col2_2 DESC) WHERE (((((table2.col2_1 = '00:00:00+15:59:00':::TIMETZ) OR (table2.col2_10 != e'\U00002603':::STRING)) OR (table2.col2_9 > e'\U00002603':::STRING)) AND (table2.col2_3 = e'\'':::STRING)) AND (table2.col2_4 >= 0:::DECIMAL)) OR (table2.col2_8 >= e'\x00':::STRING), UNIQUE (col2_7 ASC, col2_10, col2_0, col2_4 DESC, col2_8 ASC, col2_1 DESC, col2_9) WHERE ((((((table2.col2_9 < e'\U00002603':::STRING) OR (table2.col2_0 > '-4713-11-24 00:00:00+00:00':::TIMESTAMPTZ)) OR (table2.col2_1 <= '00:00:00+15:59:00':::TIMETZ)) AND (table2.col2_4 = 0:::DECIMAL)) OR (table2.col2_10 <= 'X':::STRING)) AND (table2.col2_3 < '"':::STRING)) AND (table2.col2_8 != '"':::STRING));
        CREATE TABLE table3 (col3_0 BIT(24) NOT NULL, col3_1 TIMETZ[] NULL, col3_2 OID, col3_3 CHAR NULL, col3_4 BIT NULL, col3_5 TIMESTAMP, col3_6 INET[] NULL, col3_7 FLOAT4 NOT NULL, col3_8 INTERVAL NULL, col3_9 TIME NULL, col3_10 UUID NULL, col3_11 INT2, col3_12 NAME, col3_13 INT2[] NOT NULL, col3_14 REGNAMESPACE, col3_15 STRING AS (lower(col3_12)) VIRTUAL, col3_16 STRING NOT NULL AS (lower(col3_12)) STORED, FAMILY (col3_13, col3_2), FAMILY (col3_0), FAMILY (col3_8, col3_9, col3_16, col3_14), FAMILY (col3_1, col3_10, col3_6), FAMILY (col3_11, col3_4, col3_12, col3_7), FAMILY (col3_5), FAMILY (col3_3), UNIQUE (col3_2, col3_0, col3_7, col3_5, col3_3));
        CREATE TABLE table4 (col4_0 GEOGRAPHY, col4_1 BIT(35), col4_2 FLOAT4 NOT NULL, col4_3 REGTYPE NOT NULL, col4_4 REGNAMESPACE NULL, col4_5 BYTES, col4_6 NAME, col4_7 TIMESTAMP NOT NULL, col4_8 STRING NULL AS (CASE WHEN col4_5 IS NULL THEN e'\x1fv\x03yy\nMgX':::STRING ELSE e'7\x0e\x10':::STRING END) VIRTUAL, col4_9 FLOAT4 NULL AS (col4_2 + 0.5668069124221802:::FLOAT8) VIRTUAL, col4_10 STRING NOT NULL AS (lower(col4_6)) STORED, col4_11 STRING AS (lower(CAST(col4_4 AS STRING))) STORED, col4_12 STRING NOT NULL AS (lower(CAST(col4_7 AS STRING))) VIRTUAL, col4_13 STRING NOT NULL AS (lower(CAST(col4_0 AS STRING))) VIRTUAL, col4_14 STRING AS (lower(CAST(col4_7 AS STRING))) STORED, UNIQUE (col4_14) WHERE ((((((table4.col4_13 = e'\x00':::STRING) AND (table4.col4_2 < '+Inf':::FLOAT8)) OR (table4.col4_10 = e'\'':::STRING)) OR (table4.col4_9 >= '+Inf':::FLOAT8)) AND (table4.col4_6 >= e'\x00':::STRING)) AND (table4.col4_7 <= '-2000-01-01 00:00:00':::TIMESTAMP)) OR (table4.col4_12 = e'\x00':::STRING), INDEX (col4_10 ASC, col4_2 DESC, col4_3 ASC, col4_8, col4_14, col4_4 ASC, col4_13 ASC, col4_5 ASC, col4_9 ASC, col4_11 ASC) STORING (col4_0, col4_7) WHERE table4.col4_5 <= '\x58':::BYTES, UNIQUE (col4_6) STORING (col4_0, col4_3, col4_7, col4_14), INDEX (col4_14 ASC) STORING (col4_3, col4_7, col4_10, col4_11), UNIQUE (col4_8, col4_9, col4_3, col4_12 ASC, col4_4 DESC, col4_6 DESC));
        ALTER TABLE table1 INJECT STATISTICS e'[{"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 379, "histo_col_type": "", "name": "__auto__", "null_count": 748, "row_count": 1000}, {"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 179, "histo_buckets": [{"distinct_range": 0, "num_eq": 4204703354050515249, "num_range": 0, "upper_bound": "\\\\x121df2a8a1598643108dbd4bf7073de9e10001"}, {"distinct_range": 383.63922626711377, "num_eq": 80000000000, "num_range": 500, "upper_bound": "\\\\x124c901a6f6bd54750a6c9276db1b6d6110001"}, {"distinct_range": 35529274.300249934, "num_eq": 10000, "num_range": 60000000, "upper_bound": "\\\\x12749d0268a92c4bcaae1d76eded4f9d1a0001"}, {"distinct_range": 0, "num_eq": 4000000000, "num_range": 6207673402675269477, "upper_bound": "\\\\x1289b362f9ae94452c905ffc4c94f4d2de0001"}, {"distinct_range": 0, "num_eq": 7000000, "num_range": 8278896982355097187, "upper_bound": "\\\\x129819359491f74a6fb9d3e8caf1a4a0320001"}, {"distinct_range": 0, "num_eq": 7000, "num_range": 3987611224343693551, "upper_bound": "\\\\x12c8d8513f5150478aa72ca9908d6afb1b0001"}, {"distinct_range": 56114537.569291115, "num_eq": 5965734491112279795, "num_range": 100000000, "upper_bound": "\\\\x12e816a788a2d84386b60af62b8cb394b70001"}, {"distinct_range": 7475634551557470000, "num_eq": 7827413017068814624, "num_range": 7475634551557470520, "upper_bound": "\\\\x12e869c0374a6e4017bf4aeb44c591f9f70001"}, {"distinct_range": 8742956345020879000, "num_eq": 4463619899801942981, "num_range": 8742956345020878881, "upper_bound": "\\\\x12ffffffffffffffffffffffffffffffff0001"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 625, "row_count": 1000}, {"columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 243, "histo_col_type": "", "name": "__auto__", "null_count": 474, "row_count": 1000}, {"columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 533, "histo_col_type": "", "name": "__auto__", "null_count": 527, "row_count": 1000}, {"columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 367, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 1000}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 566, "histo_col_type": "", "name": "__auto__", "null_count": 964, "row_count": 1000}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 999, "histo_col_type": "", "name": "__auto__", "null_count": 460, "row_count": 1000}, {"columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 861, "histo_buckets": [{"distinct_range": 0, "num_eq": 600000, "num_range": 0, "upper_bound": "-22619"}, {"distinct_range": 198485.11508521604, "num_eq": 70000000000, "num_range": 1000000, "upper_bound": "1"}, {"distinct_range": 0, "num_eq": 4320392667222324597, "num_range": 1718306195347443394, "upper_bound": "22684"}], "histo_col_type": "INT2", "name": "__auto__", "null_count": 443, "row_count": 1000}, {"columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 424, "histo_col_type": "", "name": "__auto__", "null_count": 721, "row_count": 1000}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS '[{"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 39548524733, "histo_col_type": "", "name": "__auto__", "null_count": 13952490857, "row_count": 60000000000}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8293113865, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 60000000000}, {"columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 18946625996, "histo_buckets": [{"distinct_range": 0, "num_eq": 1799776365735166995, "num_range": 0, "upper_bound": "BOX(-10 -10,10 10)"}, {"distinct_range": 6603724859896425000, "num_eq": 0, "num_range": 6603724859896425210, "upper_bound": "BOX(-1.7125298374916753 -0.65606221958186,-0.1413393767598805 -0.03784135127586408)"}, {"distinct_range": 100000000000, "num_eq": 5504473028781842711, "num_range": 100000000000, "upper_bound": "BOX(-0.6251068304011231 -0.07879221538978165,1.7403510555304536 0.6508977449581238)"}], "histo_col_type": "BOX2D", "name": "__auto__", "null_count": 0, "row_count": 60000000000}, {"columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7845616475, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 60000000000}, {"columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31557256544, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 60000000000}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 20903741624, "histo_col_type": "", "name": "__auto__", "null_count": 58346147918, "row_count": 60000000000}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31671649305, "histo_col_type": "", "name": "__auto__", "null_count": 21556942761, "row_count": 60000000000}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31337588805, "histo_col_type": "", "name": "__auto__", "null_count": 15336235466, "row_count": 60000000000}, {"columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31369650558, "histo_col_type": "", "name": "__auto__", "null_count": 48488651381, "row_count": 60000000000}, {"columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 57188828804, "histo_col_type": "", "name": "__auto__", "null_count": 21717816800, "row_count": 60000000000}, {"columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 46154872201, "histo_col_type": "", "name": "__auto__", "null_count": 34942263494, "row_count": 60000000000}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS '[{"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 34054, "histo_col_type": "", "name": "__auto__", "null_count": 68016, "row_count": 100000}, {"columns": ["col3_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 41347, "histo_col_type": "", "name": "__auto__", "null_count": 3507, "row_count": 100000}, {"columns": ["col3_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 29486, "histo_col_type": "", "name": "__auto__", "null_count": 95331, "row_count": 100000}, {"columns": ["col3_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 64351, "histo_col_type": "", "name": "__auto__", "null_count": 66923, "row_count": 100000}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 336, "histo_col_type": "", "name": "__auto__", "null_count": 91212, "row_count": 100000}, {"columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 44352, "histo_col_type": "", "name": "__auto__", "null_count": 87059, "row_count": 100000}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 57913, "histo_col_type": "", "name": "__auto__", "null_count": 84120, "row_count": 100000}, {"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 86300, "histo_col_type": "", "name": "__auto__", "null_count": 82140, "row_count": 100000}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 66146, "histo_col_type": "", "name": "__auto__", "null_count": 69416, "row_count": 100000}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 38123, "histo_col_type": "", "name": "__auto__", "null_count": 79015, "row_count": 100000}, {"columns": ["col3_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 24389, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 100000}, {"columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 26471, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 100000}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 63828, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 100000}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 78848, "histo_col_type": "", "name": "__auto__", "null_count": 87898, "row_count": 100000}, {"columns": ["col3_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 37027, "histo_col_type": "", "name": "__auto__", "null_count": 29303, "row_count": 100000}, {"columns": ["col3_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 67432, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 100000}, {"columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 47095, "histo_col_type": "", "name": "__auto__", "null_count": 45950, "row_count": 100000}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS e'[{"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 117213547008822959, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8058068136727249211}, {"columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6777454080622746623, "histo_buckets": [{"distinct_range": 0, "num_eq": 5163518078094025284, "num_range": 0, "upper_bound": ""}, {"distinct_range": 0, "num_eq": 237959876755135049, "num_range": 2907846504445023506, "upper_bound": "4PsQJ"}, {"distinct_range": 0, "num_eq": 50, "num_range": 0, "upper_bound": "9/\\u001f"}, {"distinct_range": 0, "num_eq": 200000000, "num_range": 5644471659210337888, "upper_bound": "F<P("}, {"distinct_range": 2643376004444100600, "num_eq": 7000000, "num_range": 7485820606126164665, "upper_bound": "T!\\u0007\\tK\'"}], "histo_col_type": "NAME", "name": "__auto__", "null_count": 6653378128438467426, "row_count": 8058068136727249211}, {"columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5387012056355594227, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8058068136727249211}, {"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1789154437678657521, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8058068136727249211}, {"columns": ["col4_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5407795341529770218, "histo_col_type": "", "name": "__auto__", "null_count": 1153190554549788946, "row_count": 8058068136727249211}, {"columns": ["col4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2172915123703922329, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8058068136727249211}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4547737708413865526, "histo_col_type": "", "name": "__auto__", "null_count": 2451894094564036112, "row_count": 8058068136727249211}, {"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5149065226736136608, "histo_buckets": [{"distinct_range": 0, "num_eq": 4857163891214637364, "num_range": 0, "upper_bound": ""}, {"distinct_range": 9133173613337938000, "num_eq": 1164907128704928875, "num_range": 9133173613337938253, "upper_bound": "1K&OF"}, {"distinct_range": 235222792841338140, "num_eq": 2000000, "num_range": 1213359574899844699, "upper_bound": ">"}, {"distinct_range": 0, "num_eq": 900000, "num_range": 9000000000, "upper_bound": "W>\'T/=E"}, {"distinct_range": 39061.89118144699, "num_eq": 1000000, "num_range": 80000, "upper_bound": "r\\\\\\u0006s\\u000c"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 2054881972404674743, "row_count": 8058068136727249211}, {"columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7410119160606739890, "histo_col_type": "", "name": "__auto__", "null_count": 2172391347587893222, "row_count": 8058068136727249211}, {"columns": ["col4_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5596305355136677495, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 8058068136727249211}, {"columns": ["col4_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7305645599371322851, "histo_buckets": [{"distinct_range": 0, "num_eq": 700, "num_range": 0, "upper_bound": "E"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 5805633753656205320, "row_count": 8058068136727249211}, {"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 3273758231077051417, "histo_col_type": "", "name": "__auto__", "null_count": 6631818241334177654, "row_count": 8058068136727249211}, {"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7894339599001599805, "histo_col_type": "", "name": "__auto__", "null_count": 1216586398235961893, "row_count": 8058068136727249211}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2728014842545429579, "histo_col_type": "", "name": "__auto__", "null_count": 4527006489292559274, "row_count": 8058068136727249211}, {"columns": ["col4_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6326176685634968829, "histo_buckets": [{"distinct_range": 0, "num_eq": 90000, "num_range": 0, "upper_bound": "\\u000f \\u0001};\\u0013"}, {"distinct_range": 27893568723.71206, "num_eq": 2655004749955447984, "num_range": 50000000000, "upper_bound": "dSng*t\\u0014"}, {"distinct_range": 0, "num_eq": 7000, "num_range": 8279673050977393672, "upper_bound": "gQH"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 8058068136727249211}]':::JSONB;
        ALTER TABLE table3 ADD FOREIGN KEY (col3_11, col3_2) REFERENCES table1 (col1_3, col1_2) ON UPDATE CASCADE;
        ALTER TABLE table4 ADD FOREIGN KEY (col4_3, col4_1, col4_2, col4_7, col4_6) REFERENCES table3 (col3_2, col3_0, col3_7, col3_5, col3_3);
        CREATE TYPE rand_typ_0 AS ENUM ('gz', 'iqnws', 'u');
        CREATE TYPE rand_typ_1 AS ENUM ('bgwde', 'r', 'tnku', 'drdhnl');
        ;
    rsg_test.go:595: 
        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:597: 
    rsg_test.go:598: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith288441599
--- FAIL: TestRandomSyntaxSQLSmith (300.79s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxSQLSmith failed with artifacts on release-21.1 @ 578ab3bbbd78a18e422d9c8cf9836e9d486b20d0:

        		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 INTERVAL NOT NULL, col1_1 JSONB NOT NULL, col1_2 BIT(13), col1_3 NAME NULL, INVERTED INDEX (col1_2 DESC, col1_1), INDEX (col1_2 ASC) STORING (col1_1), UNIQUE (col1_0 ASC), UNIQUE (col1_0, col1_2 DESC) STORING (col1_1), INDEX (col1_2 DESC, col1_3 ASC) STORING (col1_0), FAMILY (col1_0), FAMILY (col1_2, col1_3, col1_1));
        CREATE TABLE table2 (col2_0 BYTES NOT NULL, col2_1 FLOAT4 NOT NULL, col2_2 INT8 NOT NULL, col2_3 FLOAT8 NOT NULL, col2_4 GEOMETRY NULL, PRIMARY KEY (col2_0 DESC, col2_2 DESC), INVERTED INDEX (col2_4 DESC), INVERTED INDEX (col2_0, col2_3 DESC, col2_2 DESC, col2_4) WHERE table2.col2_0 < '\xff':::BYTES, INDEX (col2_1 DESC, col2_3 ASC) STORING (col2_4), UNIQUE (col2_1 ASC) STORING (col2_3, col2_4) WHERE table2.col2_2 < (-9223372036854775807):::INT8, INDEX (col2_1 ASC, col2_2, col2_3 ASC, col2_0), INDEX (col2_3, col2_2 DESC, col2_0 ASC) STORING (col2_1) WHERE ((table2.col2_3 >= 5e-324:::FLOAT8) AND (table2.col2_1 = '+Inf':::FLOAT8)) AND (table2.col2_2 > 9223372036854775807:::INT8), INVERTED INDEX (col2_2 DESC, col2_0 DESC, col2_1 DESC, col2_3 DESC, col2_4 ASC) WHERE table2.col2_1 = 0.0:::FLOAT8);
        CREATE TABLE table3 (col2_0 BYTES NOT NULL, col2_2 INT8 NOT NULL, col3_2 BIT(19), col3_3 INET, col3_4 TIMESTAMPTZ, col3_5 UUID NOT NULL, col3_6 REGTYPE NOT NULL, col3_7 BYTES, col3_8 NAME NOT NULL, col3_9 TIMETZ NOT NULL, col3_10 INTERVAL NOT NULL, col3_11 INET, col3_12 BIT(25) NOT NULL, col3_13 INET, col3_14 DATE NOT NULL, PRIMARY KEY (col2_0 DESC, col2_2 DESC, col3_11, col3_14 ASC, col3_9 ASC, col3_7 DESC, col3_8, col3_2 ASC, col3_10 DESC), INDEX (col3_14, col3_6 ASC, col3_7, col3_4, col3_2, col2_2, col3_9, col3_8 ASC, col3_5, col3_13 ASC, col2_0 DESC) WHERE ((((((table3.col3_9 = '00:00:00+15:59:00':::TIMETZ) OR (table3.col2_2 > (-1):::INT8)) AND (table3.col3_7 >= '\x22':::BYTES)) OR (table3.col2_0 >= '\x22':::BYTES)) OR (table3.col3_14 > '5874897-12-31':::DATE)) AND (table3.col3_4 < '-4713-11-24 00:00:00+00:00':::TIMESTAMPTZ)) AND (table3.col3_8 < '':::STRING), UNIQUE (col3_10 ASC, col3_8, col3_3, col3_14 ASC, col3_13 DESC, col3_11 DESC, col2_0 ASC, col3_2, col2_2 DESC, col3_7 DESC, col3_9, col3_6 DESC, col3_12 ASC, col3_5) WHERE ((((((table3.col3_7 != '\x00':::BYTES) AND (table3.col3_14 > 'infinity':::DATE)) AND (table3.col2_2 > 32767:::INT8)) AND (table3.col3_4 <= '-2000-01-01 00:00:00+00:00':::TIMESTAMPTZ)) AND (table3.col3_8 > e'\x00':::STRING)) OR (table3.col2_0 < '\x':::BYTES)) OR (table3.col3_9 >= '24:00:00-15:59:00':::TIMETZ), UNIQUE (col3_4, col3_6 ASC, col2_0 DESC, col3_7 DESC, col3_8, col3_13, col3_9 DESC, col3_5 ASC, col3_12 DESC), INDEX (col3_10, col3_4, col3_14, col3_13 ASC, col3_6, col3_11 ASC, col3_3 DESC, col3_8, col3_5 ASC, col3_2, col3_12 DESC, col3_9 DESC) WHERE (((table3.col3_14 != '-infinity':::DATE) AND (table3.col2_2 > 1:::INT8)) OR (table3.col3_9 != '00:00:00+15:59:00':::TIMETZ)) AND (table3.col3_4 = '-2000-01-01 00:00:00+00:00':::TIMESTAMPTZ), INDEX (col3_5 ASC, col3_4 DESC, col3_3 ASC, col3_2 ASC, col3_14 DESC, col3_10, col2_0, col3_7 DESC, col3_6 ASC, col3_8 ASC, col3_12, col3_11 ASC, col3_13 ASC, col3_9 ASC) WHERE ((((((table3.col3_7 >= '\x22':::BYTES) AND (table3.col3_14 != '5874897-12-31':::DATE)) AND (table3.col3_9 < '24:00:00-15:59:00':::TIMETZ)) AND (table3.col2_0 != '\xff':::BYTES)) OR (table3.col2_2 != (-2147483648):::INT8)) OR (table3.col3_8 > e'\'':::STRING)) OR (table3.col3_4 >= '3000-01-01 00:00:00+00:00':::TIMESTAMPTZ), INDEX (col3_5 DESC, col2_2 ASC, col3_4 ASC, col3_14 ASC), INDEX (col3_2 DESC, col3_8 DESC, col3_7, col3_11, col3_3 DESC, col3_4 ASC, col3_9 DESC, col3_5 DESC) STORING (col3_6), INDEX (col3_13 ASC, col3_5 DESC, col3_8 ASC, col3_2, col3_11, col3_6, col3_9 DESC, col3_7, col3_4, col3_3 ASC, col3_12 DESC, col3_14), INDEX (col3_12, col3_4, col3_9, col2_0, col3_8 DESC), UNIQUE (col3_6)) INTERLEAVE IN PARENT table2 (col2_0, col2_2);
        CREATE TABLE table4 (col4_0 INT8 NOT NULL, col4_1 INT8, col4_2 STRING[] NOT NULL, col4_3 INT2 NULL, col4_4 OID NULL, col4_5 BIT(6) NULL, col4_6 TIMESTAMP NOT NULL, col4_7 FLOAT8 NULL, col4_8 DECIMAL NOT NULL, col4_9 NAME, col4_10 TIME, col4_11 STRING NOT NULL AS (lower(col4_9)) VIRTUAL, col4_12 INT8 NOT NULL AS (col4_1 + col4_3) STORED, col4_13 STRING NULL AS (lower(CAST(col4_5 AS STRING))) STORED, col4_14 INT8 NOT NULL AS ((col4_1 + col4_3) + col4_0) VIRTUAL, col4_15 DECIMAL NULL AS (col4_8 + '-Infinity':::DECIMAL) VIRTUAL, col4_16 STRING NOT NULL AS (lower(col4_9)) STORED, col4_17 INT8 NOT NULL AS (col4_0 + col4_1) VIRTUAL, INDEX (col4_11, col4_5) WHERE (((((table4.col4_0 = (-32768):::INT8) OR (table4.col4_17 > (-2147483648):::INT8)) OR (table4.col4_9 >= '"':::STRING)) OR (table4.col4_7 >= '+Inf':::FLOAT8)) OR (table4.col4_11 != e'\U00002603':::STRING)) AND (table4.col4_15 < 'NaN':::DECIMAL), INVERTED INDEX (col4_12 ASC, col4_11 ASC, col4_13, col4_9 ASC, col4_0 DESC, col4_8, col4_14 DESC, col4_10 ASC, col4_7 DESC, col4_4 DESC, col4_6 DESC, col4_1 ASC, col4_2) WHERE (((table4.col4_17 <= (-128):::INT8) OR (table4.col4_1 = 32767:::INT8)) AND (table4.col4_9 > '':::STRING)) OR (table4.col4_8 >= 1:::DECIMAL), UNIQUE (col4_17 ASC, col4_16) STORING (col4_0, col4_2, col4_7, col4_9, col4_10), FAMILY (col4_12), FAMILY (col4_0, col4_3, col4_6, col4_8, col4_9, col4_7, col4_13), FAMILY (col4_1), FAMILY (col4_4), FAMILY (col4_16, col4_10), FAMILY (col4_2), FAMILY (col4_5));
        ALTER TABLE table1 INJECT STATISTICS '[{"columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2254669086322546284, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2683227932332400911}, {"columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1417728324955025528, "histo_buckets": [{"distinct_range": 0, "num_eq": 100, "num_range": 0, "upper_bound": "0011010100100"}], "histo_col_type": "BIT(13)", "name": "__auto__", "null_count": 678572427589359521, "row_count": 2683227932332400911}, {"columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1492328944942777080, "histo_col_type": "", "name": "__auto__", "null_count": 96557530037295641, "row_count": 2683227932332400911}, {"columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 252386387840606840, "histo_buckets": [{"distinct_range": 0, "num_eq": 1208847167341783095, "num_range": 0, "upper_bound": "-7 years -5 mons -575 days -09:24:20.634378"}], "histo_col_type": "INTERVAL", "name": "__auto__", "null_count": 0, "row_count": 2683227932332400911}]':::JSONB;
        ALTER TABLE table2 INJECT STATISTICS e'[{"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_buckets": [{"distinct_range": 0, "num_eq": 20000, "num_range": 0, "upper_bound": "\\\\xc2ef4685e1a32fc832"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_buckets": [{"distinct_range": 0, "num_eq": 10000000000, "num_range": 0, "upper_bound": "-1.429308533668518"}, {"distinct_range": 500000, "num_eq": 200, "num_range": 500000, "upper_bound": "-0.10258306562900543"}, {"distinct_range": 2298360150521285000, "num_eq": 4945960429137747751, "num_range": 3208150927524412599, "upper_bound": "1.401298464324817e-45"}], "histo_col_type": "FLOAT4", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_buckets": [{"distinct_range": 0, "num_eq": 600000000, "num_range": 0, "upper_bound": "-128"}, {"distinct_range": 635084694805500700, "num_eq": 5543177662138152902, "num_range": 4356361591358003471, "upper_bound": "1138264566632804872"}], "histo_col_type": "INT8", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_buckets": [{"distinct_range": 0, "num_eq": 4431234947030151158, "num_range": 0, "upper_bound": "-1.8101049309686092"}, {"distinct_range": 139160756193266190, "num_eq": 7000000000, "num_range": 1143123381607096699, "upper_bound": "-0.6823805519631954"}, {"distinct_range": 4784386932925213000, "num_eq": 7000000, "num_range": 4784386932925213134, "upper_bound": "-0.39054829949612413"}, {"distinct_range": 797.9815213098425, "num_eq": 3000000000, "num_range": 5000000, "upper_bound": "5e-324"}, {"distinct_range": 358179210225963260, "num_eq": 30, "num_range": 9137411096955260097, "upper_bound": "0.1042251913663943"}, {"distinct_range": 3555116119035397600, "num_eq": 1000000, "num_range": 4090689494667292693, "upper_bound": "1.222635327568871"}], "histo_col_type": "FLOAT8", "name": "__auto__", "null_count": 0, "row_count": 0}, {"columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 0, "histo_buckets": [{"distinct_range": 0, "num_eq": 50, "num_range": 0, "upper_bound": "\\\\x42fd010000000000000000c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 0, "num_eq": 50000000, "num_range": 90000000000, "upper_bound": "\\\\x42fd070000000000000000c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 100000000000, "num_eq": 8000000000, "num_range": 100000000000, "upper_bound": "\\\\x42fd090000000000000000c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 2000, "num_eq": 4000, "num_range": 2000, "upper_bound": "\\\\x42fd0b0000000000000000c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 0, "num_eq": 600, "num_range": 100000000, "upper_bound": "\\\\x42fd0cc000000000000000c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 723639.6950736833, "num_eq": 3000000000, "num_range": 1000000, "upper_bound": "\\\\x42fd100000000000000000c202128f061db6f4c20196fc81dde51641fa20d2f59555844201c4b7ef5a996e"}, {"distinct_range": 106038970.7860052, "num_eq": 900000000, "num_range": 300000000, "upper_bound": "\\\\x42fd100000000000000000c2027d23dec33c4dc201ad499e2cf16d420267f6fe272932420162dbe04d5010"}, {"distinct_range": 600000000, "num_eq": 7000, "num_range": 600000000, "upper_bound": "\\\\x42fd1d7f40000000000000c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 0, "num_eq": 900000, "num_range": 100000, "upper_bound": "\\\\x42fd1d9000000000000000c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 1431736512204077000, "num_eq": 8122742902171278907, "num_range": 1431736512204076989, "upper_bound": "\\\\x42fd1df000000000000000c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 3000000000, "num_eq": 1000, "num_range": 3000000000, "upper_bound": "\\\\x42fd1f0000000000000000c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 60000000000, "num_eq": 100, "num_range": 60000000000, "upper_bound": "\\\\x42fdffffffffffffffff00c202128f061db6f4c20196fc81dde51641fa20d2f59555844201c4b7ef5a996e"}, {"distinct_range": 36838361.82845393, "num_eq": 900000000, "num_range": 100000000, "upper_bound": "\\\\x42fdffffffffffffffff00c20225ba1a191ea8c20275f78fda86f242013a6242bab19c4202778ff872b25a"}, {"distinct_range": 36812.23181181466, "num_eq": 30000000000, "num_range": 60000, "upper_bound": "\\\\x42fdffffffffffffffff00c2027d23dec33c4dc201ad499e2cf16d420267f6fe272932420162dbe04d5010"}, {"distinct_range": 0, "num_eq": 600, "num_range": 0, "upper_bound": "\\\\x42fdffffffffffffffff01c1f4fa05578ff09cc1ef06f5e31c8d2e"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 0}]':::JSONB;
        ALTER TABLE table3 INJECT STATISTICS e'[{"columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4533, "histo_buckets": [{"distinct_range": 0, "num_eq": 5840730082287384279, "num_range": 0, "upper_bound": "0f8db40a-ca37-4b4e-82ab-6686da887452"}, {"distinct_range": 200, "num_eq": 4164089754874961057, "num_range": 200, "upper_bound": "1a54bcbb-8145-4406-9fd0-e35c34c6c72c"}, {"distinct_range": 0, "num_eq": 100000, "num_range": 0, "upper_bound": "2d48362f-7e69-468b-9b10-7a58a56091a0"}, {"distinct_range": 104.04176789435941, "num_eq": 601586737934077076, "num_range": 300, "upper_bound": "57530308-324c-47c4-966c-9221b777d4c8"}, {"distinct_range": 2181296709417740500, "num_eq": 1692953596181310721, "num_range": 4427040238448128362, "upper_bound": "7ce8973b-67e3-4e0f-bba2-963e3d2dbff2"}, {"distinct_range": 3324092755894892500, "num_eq": 300000000, "num_range": 3324092755894892293, "upper_bound": "fd2865e0-ca62-4c6d-8fe9-826d2683033e"}], "histo_col_type": "UUID", "name": "__auto__", "null_count": 0, "row_count": 20000}, {"columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 11745, "histo_buckets": [{"distinct_range": 0, "num_eq": 1849020682190298360, "num_range": 0, "upper_bound": "-36 years -4 mons -766 days -18:20:33.410435"}, {"distinct_range": 1602020486770910000, "num_eq": 70000000, "num_range": 1602020486770909862, "upper_bound": "-34 years -5 mons -249 days -12:03:40.230358"}, {"distinct_range": 0, "num_eq": 0, "num_range": 3859584732952252184, "upper_bound": "53 years 8 mons 702 days 21:08:52.451133"}], "histo_col_type": "INTERVAL", "name": "__auto__", "null_count": 0, "row_count": 20000}, {"columns": ["col3_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 18553, "histo_col_type": "", "name": "__auto__", "null_count": 18245, "row_count": 20000}, {"columns": ["col3_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 9775, "histo_col_type": "BIT(25)", "name": "__auto__", "null_count": 0, "row_count": 20000}, {"columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 12584, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20000}, {"columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5125, "histo_col_type": "TIMESTAMPTZ", "name": "__auto__", "null_count": 8903, "row_count": 20000}, {"columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1634, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20000}, {"columns": ["col3_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4339, "histo_buckets": [{"distinct_range": 0, "num_eq": 50000000, "num_range": 0, "upper_bound": "192.143.201.79/14"}, {"distinct_range": 0, "num_eq": 90000, "num_range": 20000000, "upper_bound": "224.71.150.8/28"}, {"distinct_range": 550116101122447600, "num_eq": 100000000, "num_range": 4545396879155149026, "upper_bound": "84.180.53.76/31"}, {"distinct_range": 2908523199222081500, "num_eq": 4232818022258176881, "num_range": 2908523199222081628, "upper_bound": "17da:fcc4:565c:cef8:2df6:7938:9e39:d875/40"}, {"distinct_range": 696038893476231800, "num_eq": 467563465446328991, "num_range": 1137005698726758521, "upper_bound": "720f:fd3b:a19d:d61:43d5:620b:ab2d:6b5e/63"}, {"distinct_range": 0, "num_eq": 30000000, "num_range": 0, "upper_bound": "55be:27b6:d305:6c42:1755:3e6e:5e42:f7ff/93"}, {"distinct_range": 0, "num_eq": 9000, "num_range": 100, "upper_bound": "64d3:c2f7:2863:42cd:db0c:cb0d:3ed8:c227/94"}, {"distinct_range": 90000, "num_eq": 1996760100369149843, "num_range": 90000, "upper_bound": "2a95:577f:dcc4:fde0:6baf:84e2:b433:f279/124"}, {"distinct_range": 0, "num_eq": 30000000, "num_range": 90, "upper_bound": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"}], "histo_col_type": "INET", "name": "__auto__", "null_count": 17743, "row_count": 20000}, {"columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 7618, "histo_buckets": [{"distinct_range": 0, "num_eq": 8000000, "num_range": 0, "upper_bound": "\\\\x354aaff1279f63"}, {"distinct_range": 0, "num_eq": 50000, "num_range": 0, "upper_bound": "\\\\xf32d"}], "histo_col_type": "BYTES", "name": "__auto__", "null_count": 0, "row_count": 20000}, {"columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 16813, "histo_col_type": "", "name": "__auto__", "null_count": 1076, "row_count": 20000}, {"columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 19314, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20000}, {"columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 683, "histo_col_type": "", "name": "__auto__", "null_count": 13821, "row_count": 20000}, {"columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 15464, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20000}, {"columns": ["col3_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 13725, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 20000}, {"columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6705, "histo_buckets": [{"distinct_range": 0, "num_eq": 5663088541092643347, "num_range": 0, "upper_bound": "0000010010100101011"}, {"distinct_range": 4982981100727333000, "num_eq": 5352323914337386784, "num_range": 4982981100727332402, "upper_bound": "0100111111010111100"}, {"distinct_range": 433317475604693800, "num_eq": 3000000, "num_range": 7214957983835243607, "upper_bound": "0111100111011110111"}, {"distinct_range": 0, "num_eq": 400, "num_range": 0, "upper_bound": "1010101101000000001"}, {"distinct_range": 0, "num_eq": 172723040169544575, "num_range": 900000, "upper_bound": "1111000111000100111"}, {"distinct_range": 5335164038841511000, "num_eq": 3000000000, "num_range": 8756304562291417220, "upper_bound": "1111111110101111110"}, {"distinct_range": 8000000, "num_eq": 4179399319706494310, "num_range": 8000000, "upper_bound": "1111111111110001001"}], "histo_col_type": "BIT(19)", "name": "__auto__", "null_count": 8398, "row_count": 20000}]':::JSONB;
        ALTER TABLE table4 INJECT STATISTICS '[{"columns": ["col4_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 315344904, "histo_col_type": "", "name": "__auto__", "null_count": 204124871, "row_count": 400000000}, {"columns": ["col4_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 139577481, "histo_col_type": "", "name": "__auto__", "null_count": 296811302, "row_count": 400000000}, {"columns": ["col4_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 359856830, "histo_col_type": "", "name": "__auto__", "null_count": 301795447, "row_count": 400000000}, {"columns": ["col4_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 40077172, "histo_col_type": "", "name": "__auto__", "null_count": 37422439, "row_count": 400000000}, {"columns": ["col4_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 193651080, "histo_col_type": "", "name": "__auto__", "null_count": 94456448, "row_count": 400000000}, {"columns": ["col4_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 31313920, "histo_col_type": "", "name": "__auto__", "null_count": 134203650, "row_count": 400000000}, {"columns": ["col4_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 56770924, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 400000000}, {"columns": ["col4_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 155433482, "histo_col_type": "", "name": "__auto__", "null_count": 398143928, "row_count": 400000000}, {"columns": ["col4_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 160108028, "histo_col_type": "INT8", "name": "__auto__", "null_count": 0, "row_count": 400000000}, {"columns": ["col4_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 197977598, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 400000000}, {"columns": ["col4_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 150961646, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 400000000}, {"columns": ["col4_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 346994266, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 400000000}, {"columns": ["col4_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 317025786, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 400000000}, {"columns": ["col4_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 298493126, "histo_col_type": "", "name": "__auto__", "null_count": 80206093, "row_count": 400000000}, {"columns": ["col4_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 373970800, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 400000000}, {"columns": ["col4_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 206820685, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 400000000}, {"columns": ["col4_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 4082791, "histo_col_type": "", "name": "__auto__", "null_count": 138937982, "row_count": 400000000}, {"columns": ["col4_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 189962390, "histo_buckets": [{"distinct_range": 0, "num_eq": 4818629319669337183, "num_range": 0, "upper_bound": "-8363188961038014301"}, {"distinct_range": 0, "num_eq": 318986081741658904, "num_range": 0, "upper_bound": "-5851760571736949458"}, {"distinct_range": 129996536.6518644, "num_eq": 50000, "num_range": 500000000, "upper_bound": "-5216133205134097577"}, {"distinct_range": 2547447134438927000, "num_eq": 80000000, "num_range": 9054689407914138816, "upper_bound": "-1632774521891545540"}, {"distinct_range": 0, "num_eq": 1485254799713118973, "num_range": 400, "upper_bound": "3782379327902414379"}, {"distinct_range": 4495578651139271700, "num_eq": 6602804546414870907, "num_range": 4495578651139271903, "upper_bound": "4813007708821485535"}, {"distinct_range": 471098.930603848, "num_eq": 2148324686089590726, "num_range": 500000, "upper_bound": "6522120562282542381"}, {"distinct_range": 0, "num_eq": 7839741327826200068, "num_range": 200000, "upper_bound": "9209803363229112698"}], "histo_col_type": "INT8", "name": "__auto__", "null_count": 0, "row_count": 400000000}]':::JSONB;
        ALTER TABLE table4 ADD FOREIGN KEY (col4_4) REFERENCES table3 (col3_6) ON DELETE RESTRICT;
        CREATE TYPE rand_typ_0 AS ENUM ('qruicv', 'vlbs');
        CREATE TYPE rand_typ_1 AS ENUM ('gbs', 'dh', 'utnuf', 'l', 'd', 'jdjhj');
        ;
    rsg_test.go:595: 
        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:597: 
    rsg_test.go:598: -- test log scope end --
test logs left over in: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestRandomSyntaxSQLSmith435916051
--- FAIL: TestRandomSyntaxSQLSmith (300.79s)
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 @cockroachdb/sql-experience @rafiss

This test on roachdash | Improve this report!

@cucaroach
Copy link
Contributor

The oldest incidence of this doesn't have logs, closing, pursuit adjourned to #70855

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. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

No branches or pull requests

2 participants