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

internal/sqlsmith: TestRandTableInserts failed #112011

Closed
cockroach-teamcity opened this issue Oct 8, 2023 · 5 comments · Fixed by #112070
Closed

internal/sqlsmith: TestRandTableInserts failed #112011

cockroach-teamcity opened this issue Oct 8, 2023 · 5 comments · Fixed by #112070
Assignees
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Oct 8, 2023

internal/sqlsmith.TestRandTableInserts failed with artifacts on master @ 76a8d1077d3d29bcf020a48972efd1f77aa892c2:

=== RUN   TestRandTableInserts
    test_log_scope.go:170: test logs captured to: /artifacts/tmp/_tmp/24a1830a60e8c96e6a05506359144db7/logTestRandTableInserts3153392894
    test_log_scope.go:81: use -show-logs to present logs inline
    sqlsmith_test.go:58: ALTER TABLE "ta%50ble3" ADD FOREIGN KEY ("col.3_5") REFERENCES "tab'le4" (col4_2) ON DELETE RESTRICT
    sqlsmith_test.go:59: pq: validate fk constraint: unsupported comparison operator: refcursor IS NOT unknown
    panic.go:522: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/24a1830a60e8c96e6a05506359144db7/logTestRandTableInserts3153392894
--- FAIL: TestRandTableInserts (4.14s)

Parameters: TAGS=bazel,gss , stress=true

Help

See also: How To Investigate a Go Test Failure (internal)

/cc @cockroachdb/sql-queries

This test on roachdash | Improve this report!

Jira issue: CRDB-32188

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-queries SQL Queries Team labels Oct 8, 2023
@cockroach-teamcity cockroach-teamcity added this to the 23.2 milestone Oct 8, 2023
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Oct 8, 2023
@cockroach-teamcity
Copy link
Member Author

internal/sqlsmith.TestRandTableInserts failed with artifacts on master @ 76a8d1077d3d29bcf020a48972efd1f77aa892c2:

=== RUN   TestRandTableInserts
    test_log_scope.go:170: test logs captured to: /artifacts/tmp/_tmp/24a1830a60e8c96e6a05506359144db7/logTestRandTableInserts1008883411
    test_log_scope.go:81: use -show-logs to present logs inline
    test_server_shim.go:124: automatically injected virtual cluster under test; see comment at top of test_server_shim.go for details.
    sqlsmith_test.go:58: ALTER TABLE "t�a\\U00026F0Fb,le8" ADD FOREIGN KEY ("col?8_9") REFERENCES table10 (col10_8) ON UPDATE CASCADE
    sqlsmith_test.go:59: pq: validate fk constraint: unsupported comparison operator: refcursor IS NOT unknown
    panic.go:522: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/24a1830a60e8c96e6a05506359144db7/logTestRandTableInserts1008883411
--- FAIL: TestRandTableInserts (14.92s)

Parameters: TAGS=bazel,gss,deadlock , stress=true

Help

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

internal/sqlsmith.TestRandTableInserts failed with artifacts on master @ 76a8d1077d3d29bcf020a48972efd1f77aa892c2:

=== RUN   TestRandTableInserts
    test_log_scope.go:170: test logs captured to: /artifacts/tmp/_tmp/24a1830a60e8c96e6a05506359144db7/logTestRandTableInserts903639259
    test_log_scope.go:81: use -show-logs to present logs inline
    test_server_shim.go:124: automatically injected virtual cluster under test; see comment at top of test_server_shim.go for details.
    sqlsmith_test.go:58: ALTER TABLE "\\U0010B05Ct\\U0004E12Bable8" ADD FOREIGN KEY (".Co?""l8_0") REFERENCES " tabl%pe2" (co😐l2_10) ON DELETE SET DEFAULT ON UPDATE SET DEFAULT
    sqlsmith_test.go:59: pq: validate fk constraint: unsupported comparison operator: refcursor IS NOT unknown
    panic.go:540: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/24a1830a60e8c96e6a05506359144db7/logTestRandTableInserts903639259
--- FAIL: TestRandTableInserts (11.80s)

Parameters: TAGS=bazel,gss , stress=true

Help

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

internal/sqlsmith.TestRandTableInserts failed with artifacts on master @ 330500d0433bae42bc7c0d6842a427aab3b27f03:

=== RUN   TestRandTableInserts
    test_log_scope.go:170: test logs captured to: /artifacts/tmp/_tmp/24a1830a60e8c96e6a05506359144db7/logTestRandTableInserts2060113426
    test_log_scope.go:81: use -show-logs to present logs inline
    test_server_shim.go:124: automatically injected virtual cluster under test; see comment at top of test_server_shim.go for details.
    sqlsmith_test.go:58: ALTER TABLE table8 ADD FOREIGN KEY ("c ol8_1", "}co😗l8_0") REFERENCES "t able5" ("Col5_7", col5_9) ON UPDATE CASCADE
    sqlsmith_test.go:59: pq: validate fk constraint: unsupported comparison operator: refcursor IS NOT unknown
    panic.go:522: -- test log scope end --
--- FAIL: TestRandTableInserts (15.27s)

Parameters: TAGS=bazel,gss,deadlock , stress=true

Help

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

internal/sqlsmith.TestRandTableInserts failed with artifacts on master @ 330500d0433bae42bc7c0d6842a427aab3b27f03:

=== RUN   TestRandTableInserts
    test_log_scope.go:170: test logs captured to: /artifacts/tmp/_tmp/24a1830a60e8c96e6a05506359144db7/logTestRandTableInserts2898086231
    test_log_scope.go:81: use -show-logs to present logs inline
    test_server_shim.go:124: automatically injected virtual cluster under test; see comment at top of test_server_shim.go for details.
    sqlsmith_test.go:58: ALTER TABLE table4 ADD FOREIGN KEY ("col4_ 5", col4_0) REFERENCES "\\U0009C118t%ecable10" (col10_0, "col1\\U0002A26F0_6") ON DELETE RESTRICT
    sqlsmith_test.go:59: pq: validate fk constraint: unsupported comparison operator: refcursor IS NOT unknown
    panic.go:540: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/24a1830a60e8c96e6a05506359144db7/logTestRandTableInserts2898086231
--- FAIL: TestRandTableInserts (14.13s)

Parameters: TAGS=bazel,gss , stress=true

Help

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

@mgartner
Copy link
Collaborator

mgartner commented Oct 9, 2023

This looks similar to #112010, but I'm not sure if it's an exact duplicate because the error message is slightly different. Assigning to @DrewKimball for now.

DrewKimball added a commit to DrewKimball/cockroach that referenced this issue Oct 9, 2023
Most comparisons are disallowed for the REFCURSOR data type. For example,
the following is not allowed in postgres:
```
SELECT 'foo'::REFCURSOR = 'bar'::REFCURSOR;
```
However, postgres does allow using `IS [NOT] DISTINCT FROM NULL` and
`IS [NOT] NULL` with a refcursor-typed expression os the left operand.
There are a few places where CRDB internally expects this comparison to
be valid as well, so disallowing these comparisons has caused test
failures.

This patch removes the refcursor-specific check for invalid comparisons
during type checking, and relies on execution-time checks as is done for
other comparisons. This means that `IsNull` and `IsNotNull` expressions
can now be executed. In addition, the `IS DISTINCT FROM NULL` comparison
is now supported only for the case of type `REFCURSOR` as the left operand,
and `UNKNOWN` (NULL) as the right operand.

Fixes cockroachdb#112010
Fixes cockroachdb#112011

Release note: None
DrewKimball added a commit to DrewKimball/cockroach that referenced this issue Oct 9, 2023
Most comparisons are disallowed for the REFCURSOR data type. For example,
the following is not allowed in postgres:
```
SELECT 'foo'::REFCURSOR = 'bar'::REFCURSOR;
```
However, postgres does allow using `IS [NOT] DISTINCT FROM NULL` and
`IS [NOT] NULL` with a refcursor-typed expression os the left operand.
There are a few places where CRDB internally expects this comparison to
be valid as well, so disallowing these comparisons has caused test
failures.

This patch removes the refcursor-specific check for invalid comparisons
during type checking, and relies on execution-time checks as is done for
other comparisons. This means that `IsNull` and `IsNotNull` expressions
can now be executed. In addition, the `IS DISTINCT FROM NULL` comparison
is now supported only for the case of type `REFCURSOR` as the left operand,
and `UNKNOWN` (NULL) as the right operand.

Fixes cockroachdb#112010
Fixes cockroachdb#112011

Release note: None
craig bot pushed a commit that referenced this issue Oct 9, 2023
110901: ui: decouple SQL execution requests on databases page r=zachlite a=zachlite

Previously, SQL execution requests for database details and span stats were done in the same HTTP request. The consequence of this coupling was that no information could be displayed until span stats were collected. Since span stats are much slower to collect than database details, this resulted in the potential for a very bad user experience.

This commit separates span stats and database details into distinct HTTP requests, and updates the DatabasesPage component so that database details and span stats (and their associated network and query errors) can all be displayed independently.

Here is a screenshot of a simulated span stats error, and a simulated index recommendations error. Notice how the columns `Tables` and `Regions/Nodes` can still be displayed. 
![Screenshot 2023-09-15 at 9 49 19 AM](https://github.com/cockroachdb/cockroach/assets/5423191/0a6c353b-43b0-471a-8024-72ce10fe5a1f)


Epic: none
Release note (ui change): Added progressive loading functionality to the databases page.

112070: sql: allow refcursor comparison with NULL values r=DrewKimball a=DrewKimball

Most comparisons are disallowed for the REFCURSOR data type. For example, the following is not allowed in postgres:
```
SELECT 'foo'::REFCURSOR = 'bar'::REFCURSOR;
```
However, postgres does allow using `IS [NOT] DISTINCT FROM NULL` and `IS [NOT] NULL` with a refcursor-typed expression os the left operand. There are a few places where CRDB internally expects this comparison to be valid as well, so disallowing these comparisons has caused test failures.

This patch removes the refcursor-specific check for invalid comparisons during type checking, and relies on execution-time checks as is done for other comparisons. This means that `IsNull` and `IsNotNull` expressions can now be executed. In addition, the `IS DISTINCT FROM NULL` comparison is now supported only for the case of type `REFCURSOR` as the left operand, and `UNKNOWN` (NULL) as the right operand.

Fixes #112010
Fixes #112011

Release note: None

Co-authored-by: Zach Lite <[email protected]>
Co-authored-by: Drew Kimball <[email protected]>
@craig craig bot closed this as completed in 1c2d813 Oct 10, 2023
@github-project-automation github-project-automation bot moved this from Triage to Done in SQL Queries Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants