Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions column.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ func (c *BindableColumn) Value(h api.SQLHSTMT, idx int) (driver.Value, error) {
if !c.IsVariableWidth && int(c.Len) != c.Size {
panic(fmt.Errorf("wrong column #%d length %d returned, %d expected", idx, c.Len, c.Size))
}
if len(c.Buffer) < int(c.Len) {
return c.BaseColumn.Value(c.Buffer)
}
return c.BaseColumn.Value(c.Buffer[:c.Len])
}

Expand Down