Fix scan into decimal.Decimal, close #4457

This commit is contained in:
Jinzhu 2021-07-13 19:59:31 +08:00
parent b616d810eb
commit c73fe96cfd
1 changed files with 2 additions and 0 deletions

View File

@ -208,6 +208,8 @@ func Scan(rows *sql.Rows, db *DB, initialized bool) {
} }
} }
values[idx] = &sql.RawBytes{} values[idx] = &sql.RawBytes{}
} else if len(columns) == 1 {
values[idx] = dest
} else { } else {
values[idx] = &sql.RawBytes{} values[idx] = &sql.RawBytes{}
} }