Skip to content

Commit

Permalink
fix auth errors when username/password are too long (go-sql-driver#1482)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Adamus committed Aug 20, 2024
1 parent 2f15276 commit 7f2c7ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packets.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func (mc *mysqlConn) writeHandshakeResponsePacket(authResp []byte, plugin string
// http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchResponse
func (mc *mysqlConn) writeAuthSwitchPacket(authData []byte) error {
pktLen := 4 + len(authData)
data, err := mc.buf.takeSmallBuffer(pktLen)
data, err := mc.buf.takeBuffer(pktLen)
if err != nil {
// cannot take the buffer. Something must be wrong with the connection
mc.log(err)
Expand Down

0 comments on commit 7f2c7ae

Please sign in to comment.