Skip to content

Commit 80e7191

Browse files
author
Jakub Adamus
committed
fix auth errors when username/password are too long (#1482)
1 parent 2f15276 commit 80e7191

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ ICHINOSE Shogo <shogo82148 at gmail.com>
5151
Ilia Cimpoes <ichimpoesh at gmail.com>
5252
INADA Naoki <songofacandy at gmail.com>
5353
Jacek Szwec <szwec.jacek at gmail.com>
54+
Jakub Adamus <kratky at zobak.cz>
5455
James Harr <james.harr at gmail.com>
5556
Janek Vedock <janekvedock at comcast.net>
5657
Jason Ng <oblitorum at gmail.com>

Diff for: 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)