Browse Source

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

Thomas Meson 7 years ago
parent
commit
ef2238f502
1 changed files with 1 additions and 0 deletions
  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
 	}