Skip to content

Commit 194d5e4

Browse files
authored
Merge pull request #161312 from DrewKimball/backport26.1-161273
2 parents 5e5112d + c70da75 commit 194d5e4

File tree

3 files changed

+845
-14
lines changed

3 files changed

+845
-14
lines changed

pkg/sql/conn_executor_exec.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,9 @@ func (ex *connExecutor) execStmtInOpenState(
531531
// Strip off the explain node to execute the inner statement.
532532
stmt.AST = e.Statement
533533
ast = e.Statement
534+
if e2, ok := stmt.ASTWithInjectedHints.(*tree.ExplainAnalyze); ok {
535+
stmt.ASTWithInjectedHints = e2.Statement
536+
}
534537
// TODO(radu): should we trim the "EXPLAIN ANALYZE (DEBUG)" part from
535538
// stmt.SQL?
536539

@@ -1433,6 +1436,9 @@ func (ex *connExecutor) execStmtInOpenStateWithPausablePortal(
14331436
// Strip off the explain node to execute the inner statement.
14341437
vars.stmt.AST = e.Statement
14351438
vars.ast = e.Statement
1439+
if e2, ok := vars.stmt.ASTWithInjectedHints.(*tree.ExplainAnalyze); ok {
1440+
vars.stmt.ASTWithInjectedHints = e2.Statement
1441+
}
14361442
// TODO(radu): should we trim the "EXPLAIN ANALYZE (DEBUG)" part from
14371443
// stmt.SQL?
14381444

0 commit comments

Comments
 (0)