支持lru缓存
This commit is contained in:
parent
e284eebbc5
commit
ecac72ad8b
@ -82,7 +82,9 @@ func (db *PreparedStmtDB) Close() {
|
|||||||
func (sdb *PreparedStmtDB) Reset() {
|
func (sdb *PreparedStmtDB) Reset() {
|
||||||
sdb.Mux.Lock()
|
sdb.Mux.Lock()
|
||||||
defer sdb.Mux.Unlock()
|
defer sdb.Mux.Unlock()
|
||||||
|
if sdb.Stmts == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
for _, stmt := range sdb.Stmts.AllMap() {
|
for _, stmt := range sdb.Stmts.AllMap() {
|
||||||
go func(s *Stmt) {
|
go func(s *Stmt) {
|
||||||
// make sure the stmt must finish preparation first
|
// make sure the stmt must finish preparation first
|
||||||
|
Loading…
x
Reference in New Issue
Block a user