Skip to main content

Module mysql

Module mysql 

Source
Expand description

MySQL wire protocol parser (client command packets)

MySQL packet format: [3-byte length][1-byte seq][payload] Command byte is the first byte of payload.

Structs§

MysqlPacket
Parsed MySQL packet

Enums§

MysqlCommand
MysqlResponse
MySQL response type (simplified)

Functions§

mysql_response_complete
Check if a MySQL response buffer is complete (ends with OK/EOF/ERR packet).
parse_mysql_request
Parse a MySQL client command packet. Returns summary string if parseable. Only returns Some for actual command packets (seq=0, known command byte).
parse_mysql_response
Parse a MySQL server response packet (first packet of response). Only parses responses to commands (seq >= 1).