Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
feat: restore the original blank line
  • Loading branch information
chanxuehong committed Jun 1, 2020
commit 9b49409905757f35d8b8045b5879a95bf3ee7e13
3 changes: 3 additions & 0 deletions packets.go
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {

var a [64]byte
var b = a[:0]

if v.IsZero() {
b = append(b, "0000-00-00"...)
} else {
Expand All @@ -1120,10 +1121,12 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
return err
}
}

paramValues = appendLengthEncodedInteger(paramValues,
uint64(len(b)),
)
paramValues = append(paramValues, b...)

default:
return fmt.Errorf("cannot convert type: %T", arg)
}
Expand Down