支持lru缓存

This commit is contained in:
xiezhaodong 2025-04-14 20:17:41 +08:00
parent e284eebbc5
commit ecac72ad8b

View File

@ -82,7 +82,9 @@ func (db *PreparedStmtDB) Close() {
func (sdb *PreparedStmtDB) Reset() {
sdb.Mux.Lock()
defer sdb.Mux.Unlock()
if sdb.Stmts == nil {
return
}
for _, stmt := range sdb.Stmts.AllMap() {
go func(s *Stmt) {
// make sure the stmt must finish preparation first