@@ -29,7 +29,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
29
29
// Read packet header
30
30
data , err := mc .buf .readNext (4 )
31
31
if err != nil {
32
- errLog .Print (err . Error () )
32
+ errLog .Print (err )
33
33
mc .Close ()
34
34
return nil , driver .ErrBadConn
35
35
}
@@ -38,7 +38,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
38
38
pktLen := int (uint32 (data [0 ]) | uint32 (data [1 ])<< 8 | uint32 (data [2 ])<< 16 )
39
39
40
40
if pktLen < 1 {
41
- errLog .Print (errMalformPkt . Error () )
41
+ errLog .Print (errMalformPkt )
42
42
mc .Close ()
43
43
return nil , driver .ErrBadConn
44
44
}
@@ -56,7 +56,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
56
56
// Read packet body [pktLen bytes]
57
57
data , err = mc .buf .readNext (pktLen )
58
58
if err != nil {
59
- errLog .Print (err . Error () )
59
+ errLog .Print (err )
60
60
mc .Close ()
61
61
return nil , driver .ErrBadConn
62
62
}
@@ -113,9 +113,9 @@ func (mc *mysqlConn) writePacket(data []byte) error {
113
113
114
114
// Handle error
115
115
if err == nil { // n != len(data)
116
- errLog .Print (errMalformPkt . Error () )
116
+ errLog .Print (errMalformPkt )
117
117
} else {
118
- errLog .Print (err . Error () )
118
+ errLog .Print (err )
119
119
}
120
120
return driver .ErrBadConn
121
121
}
@@ -228,7 +228,7 @@ func (mc *mysqlConn) writeAuthPacket(cipher []byte) error {
228
228
data := mc .buf .takeSmallBuffer (pktLen + 4 )
229
229
if data == nil {
230
230
// can not take the buffer. Something must be wrong with the connection
231
- errLog .Print (errBusyBuffer . Error () )
231
+ errLog .Print (errBusyBuffer )
232
232
return driver .ErrBadConn
233
233
}
234
234
@@ -299,7 +299,7 @@ func (mc *mysqlConn) writeOldAuthPacket(cipher []byte) error {
299
299
data := mc .buf .takeSmallBuffer (pktLen + 4 )
300
300
if data == nil {
301
301
// can not take the buffer. Something must be wrong with the connection
302
- errLog .Print (errBusyBuffer . Error () )
302
+ errLog .Print (errBusyBuffer )
303
303
return driver .ErrBadConn
304
304
}
305
305
@@ -320,7 +320,7 @@ func (mc *mysqlConn) writeCommandPacket(command byte) error {
320
320
data := mc .buf .takeSmallBuffer (4 + 1 )
321
321
if data == nil {
322
322
// can not take the buffer. Something must be wrong with the connection
323
- errLog .Print (errBusyBuffer . Error () )
323
+ errLog .Print (errBusyBuffer )
324
324
return driver .ErrBadConn
325
325
}
326
326
@@ -339,7 +339,7 @@ func (mc *mysqlConn) writeCommandPacketStr(command byte, arg string) error {
339
339
data := mc .buf .takeBuffer (pktLen + 4 )
340
340
if data == nil {
341
341
// can not take the buffer. Something must be wrong with the connection
342
- errLog .Print (errBusyBuffer . Error () )
342
+ errLog .Print (errBusyBuffer )
343
343
return driver .ErrBadConn
344
344
}
345
345
@@ -360,7 +360,7 @@ func (mc *mysqlConn) writeCommandPacketUint32(command byte, arg uint32) error {
360
360
data := mc .buf .takeSmallBuffer (4 + 1 + 4 )
361
361
if data == nil {
362
362
// can not take the buffer. Something must be wrong with the connection
363
- errLog .Print (errBusyBuffer . Error () )
363
+ errLog .Print (errBusyBuffer )
364
364
return driver .ErrBadConn
365
365
}
366
366
@@ -751,7 +751,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
751
751
}
752
752
if data == nil {
753
753
// can not take the buffer. Something must be wrong with the connection
754
- errLog .Print (errBusyBuffer . Error () )
754
+ errLog .Print (errBusyBuffer )
755
755
return driver .ErrBadConn
756
756
}
757
757
0 commit comments