Skip to content

Commit 7f2c7ae

Browse files
author
Jakub Adamus
committed
fix auth errors when username/password are too long (go-sql-driver#1482)
1 parent 2f15276 commit 7f2c7ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packets.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ func (mc *mysqlConn) writeHandshakeResponsePacket(authResp []byte, plugin string
394394
// http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchResponse
395395
func (mc *mysqlConn) writeAuthSwitchPacket(authData []byte) error {
396396
pktLen := 4 + len(authData)
397-
data, err := mc.buf.takeSmallBuffer(pktLen)
397+
data, err := mc.buf.takeBuffer(pktLen)
398398
if err != nil {
399399
// cannot take the buffer. Something must be wrong with the connection
400400
mc.log(err)

0 commit comments

Comments
 (0)