We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcd52dd commit 25a9fdbCopy full SHA for 25a9fdb
packets.go
@@ -797,9 +797,17 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
797
pos++
798
799
// type of each parameter [len(args)*2 bytes]
800
- paramTypes := data[pos:]
+ oldPos := pos
801
pos += (len(args) << 1)
802
803
+ // extend data as necessary
804
+ if pos > len(data) {
805
+ data = append(data, make([]byte, pos-len(data))...)
806
+ mc.buf.buf = data
807
+ }
808
+
809
+ paramTypes := data[oldPos:]
810
811
// value of each parameter [n bytes]
812
paramValues := data[pos:pos]
813
valuesCap := cap(paramValues)
0 commit comments