@@ -29,7 +29,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
2929 // Read packet header
3030 data , err := mc .buf .readNext (4 )
3131 if err != nil {
32- errLog .Print (err . Error () )
32+ errLog .Print (err )
3333 mc .Close ()
3434 return nil , driver .ErrBadConn
3535 }
@@ -38,7 +38,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
3838 pktLen := int (uint32 (data [0 ]) | uint32 (data [1 ])<< 8 | uint32 (data [2 ])<< 16 )
3939
4040 if pktLen < 1 {
41- errLog .Print (errMalformPkt . Error () )
41+ errLog .Print (errMalformPkt )
4242 mc .Close ()
4343 return nil , driver .ErrBadConn
4444 }
@@ -56,7 +56,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
5656 // Read packet body [pktLen bytes]
5757 data , err = mc .buf .readNext (pktLen )
5858 if err != nil {
59- errLog .Print (err . Error () )
59+ errLog .Print (err )
6060 mc .Close ()
6161 return nil , driver .ErrBadConn
6262 }
@@ -113,9 +113,9 @@ func (mc *mysqlConn) writePacket(data []byte) error {
113113
114114 // Handle error
115115 if err == nil { // n != len(data)
116- errLog .Print (errMalformPkt . Error () )
116+ errLog .Print (errMalformPkt )
117117 } else {
118- errLog .Print (err . Error () )
118+ errLog .Print (err )
119119 }
120120 return driver .ErrBadConn
121121 }
@@ -228,7 +228,7 @@ func (mc *mysqlConn) writeAuthPacket(cipher []byte) error {
228228 data := mc .buf .takeSmallBuffer (pktLen + 4 )
229229 if data == nil {
230230 // can not take the buffer. Something must be wrong with the connection
231- errLog .Print (errBusyBuffer . Error () )
231+ errLog .Print (errBusyBuffer )
232232 return driver .ErrBadConn
233233 }
234234
@@ -299,7 +299,7 @@ func (mc *mysqlConn) writeOldAuthPacket(cipher []byte) error {
299299 data := mc .buf .takeSmallBuffer (pktLen + 4 )
300300 if data == nil {
301301 // can not take the buffer. Something must be wrong with the connection
302- errLog .Print (errBusyBuffer . Error () )
302+ errLog .Print (errBusyBuffer )
303303 return driver .ErrBadConn
304304 }
305305
@@ -320,7 +320,7 @@ func (mc *mysqlConn) writeCommandPacket(command byte) error {
320320 data := mc .buf .takeSmallBuffer (4 + 1 )
321321 if data == nil {
322322 // can not take the buffer. Something must be wrong with the connection
323- errLog .Print (errBusyBuffer . Error () )
323+ errLog .Print (errBusyBuffer )
324324 return driver .ErrBadConn
325325 }
326326
@@ -339,7 +339,7 @@ func (mc *mysqlConn) writeCommandPacketStr(command byte, arg string) error {
339339 data := mc .buf .takeBuffer (pktLen + 4 )
340340 if data == nil {
341341 // can not take the buffer. Something must be wrong with the connection
342- errLog .Print (errBusyBuffer . Error () )
342+ errLog .Print (errBusyBuffer )
343343 return driver .ErrBadConn
344344 }
345345
@@ -360,7 +360,7 @@ func (mc *mysqlConn) writeCommandPacketUint32(command byte, arg uint32) error {
360360 data := mc .buf .takeSmallBuffer (4 + 1 + 4 )
361361 if data == nil {
362362 // can not take the buffer. Something must be wrong with the connection
363- errLog .Print (errBusyBuffer . Error () )
363+ errLog .Print (errBusyBuffer )
364364 return driver .ErrBadConn
365365 }
366366
@@ -751,7 +751,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
751751 }
752752 if data == nil {
753753 // can not take the buffer. Something must be wrong with the connection
754- errLog .Print (errBusyBuffer . Error () )
754+ errLog .Print (errBusyBuffer )
755755 return driver .ErrBadConn
756756 }
757757
0 commit comments