From a8b72546c1c9bbe01e126104095be842022ca6ef Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Thu, 25 Mar 2021 10:17:57 +0800 Subject: [PATCH] Fix get database connection for prepared stmt, close #4214 --- prepare_stmt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prepare_stmt.go b/prepare_stmt.go index bc7ef180..122e98d2 100644 --- a/prepare_stmt.go +++ b/prepare_stmt.go @@ -18,7 +18,7 @@ type PreparedStmtDB struct { ConnPool } -func (db *PreparedStmtDB) GetDB() (*sql.DB, error) { +func (db *PreparedStmtDB) GetDBConn() (*sql.DB, error) { if dbConnector, ok := db.ConnPool.(GetDBConnector); ok && dbConnector != nil { return dbConnector.GetDBConn() }