瀏覽代碼

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
 	}