From e233e7c1955fd5f418fbc319e7ca7bd5da58b7e8 Mon Sep 17 00:00:00 2001 From: xiezhaodong Date: Thu, 24 Apr 2025 16:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E4=BD=BF=E7=94=A8lru?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prepare_stmt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prepare_stmt.go b/prepare_stmt.go index 9a87ebed..cf6d2864 100644 --- a/prepare_stmt.go +++ b/prepare_stmt.go @@ -45,7 +45,7 @@ func newPrepareStmtCache(PrepareStmtMaxSize int, var lru_size = DEFAULT_MAX_SIZE var lru_ttl = DEFAULT_TTL var stmts StmtStore - if PrepareStmtMaxSize <= 0 { + if PrepareStmtMaxSize < 0 { panic("PrepareStmtMaxSize must > 0") } if PrepareStmtMaxSize != 0 {