Skip to content

Commit

Permalink
solve the problem of reading long in more than one row
Browse files Browse the repository at this point in the history
  • Loading branch information
sijms committed Dec 3, 2020
1 parent 92d7f7a commit a425aac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 11 additions & 0 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ func (stmt *Stmt) read(dataSet *DataSet) error {
} else {
dataSet.currentRow[x] = stmt.connection.strConv.Decode(temp)
}

case NUMBER:
dataSet.currentRow[x] = converters.DecodeNumber(temp)
// if dataSet.Cols[x].Scale == 0 {
Expand Down Expand Up @@ -618,6 +619,16 @@ func (stmt *Stmt) read(dataSet *DataSet) error {
default:
dataSet.currentRow[x] = temp
}
if dataSet.Cols[x].DataType == LONG || dataSet.Cols[x].DataType == LongRaw {
_, err = session.GetInt(4, true, true)
if err != nil {
return err
}
_, err = session.GetInt(4, true, true)
if err != nil {
return err
}
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion network/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,6 @@ func (session *Session) GetClr() (output []byte, err error) {
var size1 uint8
size1, err = session.GetByte()
if err != nil || size1 == 0 {
_, err = session.GetBytes(2)
break
}
rb, err = session.read(int(size1))
Expand Down

0 comments on commit a425aac

Please sign in to comment.