*: Address comment

This commit is contained in:
shenli
2015-11-11 15:09:26 +08:00
parent dff8503ca1
commit d5cf283f91

View File

@ -218,7 +218,10 @@ func runStmt(ctx context.Context, s stmt.Statement, args ...interface{}) (rset.R
err = ctx.FinishTxn(false)
// We should retry for autocommit
if terror.ErrorEqual(err, kv.ErrConditionNotMatch) {
return nil, ctx.(Session).Retry()
se, ok := ctx.(Session)
if ok {
return nil, se.Retry()
}
}
}
return rs, errors.Trace(err)