MSSQL: Fix memory leak when debug enabled (#19049)

* fix for #19049
This commit is contained in:
Brian Gann 2019-09-12 18:44:31 +02:00 committed by GitHub
parent 81c326b31a
commit 9eafc693b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,8 +68,9 @@ func (t *mssqlRowTransformer) Transform(columnTypes []*sql.ColumnType, rows *cor
values := make([]interface{}, len(columnTypes))
valuePtrs := make([]interface{}, len(columnTypes))
for i, stype := range columnTypes {
t.log.Debug("type", "type", stype)
for i := range columnTypes {
// debug output on large tables causes high memory utilization/leak
// t.log.Debug("type", "type", stype)
valuePtrs[i] = &values[i]
}