Commit a3ac1eca authored by gwenn's avatar gwenn

Ensures cached stmt is finalized when not reusable.

parent c1fa64c0
...@@ -43,6 +43,7 @@ func (c *cache) find(sql string) *Stmt { ...@@ -43,6 +43,7 @@ func (c *cache) find(sql string) *Stmt {
if s.SQL() == sql { // TODO s.SQL() may have been trimmed by SQLite if s.SQL() == sql { // TODO s.SQL() may have been trimmed by SQLite
c.l.Remove(e) c.l.Remove(e)
if err := s.ClearBindings(); err != nil { if err := s.ClearBindings(); err != nil {
s.finalize()
return nil return nil
} }
return s return s
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment