Skip to content

Commit 071989a

Browse files
committed
Fix OldAuthSwitchRequest support
Fixes go-sql-driver#844
1 parent 361f66e commit 071989a

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
@@ -479,7 +479,7 @@ func (mc *mysqlConn) readAuthResult() ([]byte, string, error) {
479479
return data[1:], "", err
480480

481481
case iEOF:
482-
if len(data) < 1 {
482+
if len(data) == 1 {
483483
// https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::OldAuthSwitchRequest
484484
return nil, "mysql_old_password", nil
485485
}

0 commit comments

Comments
 (0)