Skip to content

Commit

Permalink
fix execute with missed stmtID panic
Browse files Browse the repository at this point in the history
  • Loading branch information
lysu committed Mar 14, 2019
1 parent 7164340 commit f0c096a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,10 @@ func ResetContextOfStmt(ctx sessionctx.Context, s ast.StmtNode) (err error) {
if err != nil {
return errors.Trace(err)
}
sc.OriginalSQL = s.Text()
if s != nil {
// execute missed stmtID uses empty sql
sc.OriginalSQL = s.Text()
}
vars.StmtCtx = sc
return
}

0 comments on commit f0c096a

Please sign in to comment.