fixed memory leak in func (stmt *Statement) ParseWithSpecialTableName

This commit is contained in:
Nikitin Aleksandr 2025-04-14 13:02:08 +03:00
parent 5d5f13686b
commit a94c905875

View File

@ -495,10 +495,10 @@ func (stmt *Statement) ParseWithSpecialTableName(value interface{}, specialTable
if len(tables) == 2 { if len(tables) == 2 {
stmt.TableExpr = &clause.Expr{SQL: stmt.Quote(stmt.Schema.Table)} stmt.TableExpr = &clause.Expr{SQL: stmt.Quote(stmt.Schema.Table)}
stmt.Table = tables[1] stmt.Table = tables[1]
tables = nil //tables = nil
return return
} }
tables = nil //tables = nil
stmt.Table = stmt.Schema.Table stmt.Table = stmt.Schema.Table
} }