@@ -239,7 +239,7 @@ func (mc *mysqlConn) writeAuthPacket(cipher []byte) error {
239
239
}
240
240
241
241
// Calculate packet length and get buffer with that size
242
- data := mc .buf .smallWriteBuffer (pktLen + 4 )
242
+ data := mc .buf .takeSmallBuffer (pktLen + 4 )
243
243
if data == nil {
244
244
// can not take the buffer. Something must be wrong with the connection
245
245
errLog .Print ("Busy buffer" )
@@ -322,7 +322,7 @@ func (mc *mysqlConn) writeOldAuthPacket(cipher []byte) error {
322
322
323
323
// Calculate the packet lenght and add a tailing 0
324
324
pktLen := len (scrambleBuff ) + 1
325
- data := mc .buf .smallWriteBuffer (pktLen + 4 )
325
+ data := mc .buf .takeSmallBuffer (pktLen + 4 )
326
326
if data == nil {
327
327
// can not take the buffer. Something must be wrong with the connection
328
328
errLog .Print ("Busy buffer" )
@@ -349,7 +349,7 @@ func (mc *mysqlConn) writeCommandPacket(command byte) error {
349
349
// Reset Packet Sequence
350
350
mc .sequence = 0
351
351
352
- data := mc .buf .smallWriteBuffer (4 + 1 )
352
+ data := mc .buf .takeSmallBuffer (4 + 1 )
353
353
if data == nil {
354
354
// can not take the buffer. Something must be wrong with the connection
355
355
errLog .Print ("Busy buffer" )
@@ -374,7 +374,7 @@ func (mc *mysqlConn) writeCommandPacketStr(command byte, arg string) error {
374
374
mc .sequence = 0
375
375
376
376
pktLen := 1 + len (arg )
377
- data := mc .buf .writeBuffer (pktLen + 4 )
377
+ data := mc .buf .takeBuffer (pktLen + 4 )
378
378
if data == nil {
379
379
// can not take the buffer. Something must be wrong with the connection
380
380
errLog .Print ("Busy buffer" )
@@ -401,7 +401,7 @@ func (mc *mysqlConn) writeCommandPacketUint32(command byte, arg uint32) error {
401
401
// Reset Packet Sequence
402
402
mc .sequence = 0
403
403
404
- data := mc .buf .smallWriteBuffer (4 + 1 + 4 )
404
+ data := mc .buf .takeSmallBuffer (4 + 1 + 4 )
405
405
if data == nil {
406
406
// can not take the buffer. Something must be wrong with the connection
407
407
errLog .Print ("Busy buffer" )
@@ -795,7 +795,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
795
795
796
796
if len (args ) == 0 {
797
797
const pktLen = 1 + 4 + 1 + 4
798
- data = mc .buf .writeBuffer (4 + pktLen )
798
+ data = mc .buf .takeBuffer (4 + pktLen )
799
799
if data == nil {
800
800
// can not take the buffer. Something must be wrong with the connection
801
801
errLog .Print ("Busy buffer" )
0 commit comments