-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: add support for EXPLAIN ANALYZE in SQL shell and a builtin
This commit fixes a possible crash that could happen whenever the internal executor is used to run EXPLAIN ANALYZE statement (the crash happened because we'd attempt to call `ResetStmtType` on `streamingCommandResult` which is unimplemented). This commit makes this method a no-op since we don't care about the stmt type. This affects the UI SQL shell as well as `crdb_internal.execute_internally` builtin. It additionally audits all methods of `streamingCommandResult` that panic. `AddBatch` is ok to not be implemented given that we have `SupportsBatch` always return `false`. Another panic is removed in `BufferedResultsLen` (used under read committed) where it's ok to be a no-op. This commit also moves the code around a bit to have better layout. Release note (sql change): EXPLAIN ANALYZE statements are now supported when executed via UI SQL shell.
- Loading branch information
1 parent
9e2e4fb
commit 0b643f4
Showing
5 changed files
with
60 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters