https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_packets_protocol_auth_switch_response.html
(authData []byte)
| 416 | |
| 417 | // https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_packets_protocol_auth_switch_response.html |
| 418 | func (mc *mysqlConn) writeAuthSwitchPacket(authData []byte) error { |
| 419 | pktLen := 4 + len(authData) |
| 420 | data, err := mc.buf.takeBuffer(pktLen) |
| 421 | if err != nil { |
| 422 | mc.cleanup() |
| 423 | return err |
| 424 | } |
| 425 | |
| 426 | // Add the auth data [EOF] |
| 427 | copy(data[4:], authData) |
| 428 | return mc.writePacket(data) |
| 429 | } |
| 430 | |
| 431 | /****************************************************************************** |
| 432 | * Command Packets * |
no test coverage detected