Skip to content

Commit

Permalink
sql: fix missed error handling when parsing internal query
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
rafiss committed Sep 23, 2022
1 parent e8872da commit b18a95c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/sql/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -900,10 +900,10 @@ func (ie *InternalExecutor) execInternal(
timeReceived := timeutil.Now()
parseStart := timeReceived
parsed, err := parser.ParseOne(stmt)
if err := ie.checkIfStmtIsAllowed(parsed.AST, txn); err != nil {
if err != nil {
return nil, err
}
if err != nil {
if err := ie.checkIfStmtIsAllowed(parsed.AST, txn); err != nil {
return nil, err
}
parseEnd := timeutil.Now()
Expand Down

0 comments on commit b18a95c

Please sign in to comment.