Skip to main content

Module protocol

Module protocol 

Source
Expand description

MySQL wire protocol implementation.

MySQL packets have a 4-byte header:

  • 3 bytes: payload length (little-endian)
  • 1 byte: sequence number

Maximum packet payload is 2^24 - 1 (16MB - 1). Larger payloads are split into multiple packets.

Re-exports§

pub use prepared::PreparedStatement;
pub use prepared::StmtPrepareOk;
pub use prepared::build_stmt_close_packet;
pub use prepared::build_stmt_execute_packet;
pub use prepared::build_stmt_prepare_packet;
pub use prepared::build_stmt_reset_packet;
pub use prepared::parse_stmt_prepare_ok;
pub use reader::PacketReader;
pub use writer::PacketWriter;

Modules§

capabilities
MySQL capability flags (client and server).
charset
MySQL character set codes.
prepared
MySQL prepared statement (binary protocol) implementation.
reader
MySQL packet reading utilities.
server_status
MySQL server status flags.
writer
MySQL packet writing utilities.

Structs§

EofPacket
Parsed EOF packet (deprecated in newer MySQL versions).
ErrPacket
Parsed Error packet.
OkPacket
Parsed OK packet.
PacketHeader
A MySQL packet header.

Enums§

Command
MySQL command codes (COM_xxx).
PacketType
Server response packet types.

Constants§

MAX_PACKET_SIZE
Maximum payload size for a single MySQL packet (2^24 - 1 bytes).