Closed j82w closed 1 year ago
Are you sure that #103259 caused this issue? Are you sure EXPLAIN ANALYZE
was working in DataGrip before that PR? According to #98731, executing a prepared EXPLAIN ANALYZE
was not working prior to #103259.
@j82w we believe we were able to PREPARE EXPLAIN ANALYZE
before, but not execute it after preparing, so we don't think this worked even before #103259.
@michae2 and @mgartner I'm not sure which commit caused the issue. I know in v22.1 and v23.1.6 explain analyze select * from system.statement_statistics;
works in DataGrip. Building and executing the same query on master today fails with [42601] ERROR: EXPLAIN ANALYZE can only be used as a top-level statement
@michae2 and @mgartner I confirmed it's from commit feb9c43eff5cdd16b5e4a50a1ecac3fffaf5a436
which is from PR https://github.com/cockroachdb/cockroach/pull/103259. If I build master it fails, but if I do git revert feb9c43eff5cdd16b5e4a50a1ecac3fffaf5a436
it succeeds.
Thanks for confirming @j82w. It sounds like our assumption was wrong. We will investigate.
Let me know if you want to pair and/or anything else to help with the investigation.
With the current master build if you try to run any
EXPLAIN ANALYZE
statement in DataGrip always fails with[42601] ERROR: EXPLAIN ANALYZE can only be used as a top-level statement
. It seems to be caused by the following change: https://github.com/cockroachdb/cockroach/pull/103259.EXPLAIN ANALYZE
so it is the top-level statement.slack thread: https://cockroachlabs.slack.com/archives/C0168LW5THS/p1690822395401319
Jira issue: CRDB-30249