소스 검색

conn: add missing remove prepared statement from cache on error (#1099)

Thomas Meson 7 년 전
부모
커밋
ef2238f502
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      conn.go

+ 1 - 0
conn.go

@@ -766,6 +766,7 @@ func (c *Conn) prepareStatement(ctx context.Context, stmt string, tracer Tracer)
 	if err != nil {
 		flight.err = err
 		flight.wg.Done()
+		c.session.stmtsLRU.remove(stmtCacheKey)
 		return nil, err
 	}