We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efa9b1c commit 061c2a5Copy full SHA for 061c2a5
1 file changed
sqlite3.go
@@ -1906,14 +1906,14 @@ func (c *SQLiteConn) dbConnOpen() bool {
1906
}
1907
1908
func (c *SQLiteConn) takeCachedStmt(query string) *SQLiteStmt {
1909
- if c == nil || query == "" {
+ if c == nil || query == "" || c.stmtCacheSize <= 0 {
1910
return nil
1911
1912
1913
c.mu.Lock()
1914
defer c.mu.Unlock()
1915
1916
- if c.db == nil || c.stmtCacheSize <= 0 {
+ if c.db == nil {
1917
1918
1919
stmts := c.stmtCache[query]
0 commit comments