Skip to content

Commit

Permalink
tiny fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jackysp committed Mar 25, 2019
1 parent 41c9073 commit 6f7d381
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions session/tidb.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ func runStmt(ctx context.Context, sctx sessionctx.Context, s sqlexec.Statement)
sessVars := se.GetSessionVars()
// All the history should be added here.
sessVars.TxnCtx.StatementCount++
isReadOnly, err := s.IsReadOnly(sessVars)
if err != nil {
return nil, err
isReadOnly, errNotFound := s.IsReadOnly(sessVars)
if errNotFound != nil {
log.Error(errNotFound)
}
if !isReadOnly {
if err == nil {
Expand Down

0 comments on commit 6f7d381

Please sign in to comment.