Commit c1fa64c0 authored by gwenn's avatar gwenn

Ensures bindings are cleared for cached stmts.

parent 60153e8a
......@@ -42,6 +42,9 @@ func (c *cache) find(sql string) *Stmt {
if s, ok := e.Value.(*Stmt); ok {
if s.SQL() == sql { // TODO s.SQL() may have been trimmed by SQLite
c.l.Remove(e)
if err := s.ClearBindings(); err != nil {
return nil
}
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