Skip to content

Commit

Permalink
Update packets.go
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Jan 5, 2024
1 parent f37f416 commit 9479b80
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions packets.go
Expand Up @@ -827,17 +827,8 @@ func (rows *textRows) readRow(dest []driver.Value) error {
dest[i] = buf
}

case fieldTypeTiny, fieldTypeShort, fieldTypeInt24, fieldTypeYear:
dest[i], err = strconv.ParseInt(string(buf), 10, 32)

case fieldTypeLong:
if rows.rs.columns[i].flags&flagUnsigned != 0 {
var d uint64
d, err = strconv.ParseUint(string(buf), 10, 32)
dest[i] = int64(d)
} else {
dest[i], err = strconv.ParseInt(string(buf), 10, 32)
}
case fieldTypeTiny, fieldTypeShort, fieldTypeInt24, fieldTypeYear, fieldTypeLong:
dest[i], err = strconv.ParseInt(string(buf), 10, 64)

case fieldTypeLongLong:
if rows.rs.columns[i].flags&flagUnsigned != 0 {
Expand Down

0 comments on commit 9479b80

Please sign in to comment.