moondb

waxing crescent · a statute of moondb

moonmysql

The MySQL / MariaDB implementation of the Driver contract — text and binary protocols, three auth plugins, multi-result sets, and parameters streamed past a packet.

Enactment

What it is

moonmysql connects to a MySQL or MariaDB server and implements Driver against it. It speaks the ? placeholder token and binds parameters out-of-band where the protocol allows.

i

Install

moon add moonbitstack/moonmysql

ii

Binding

? positional. A statement with parameters goes over COM_STMT_PREPARE/COM_STMT_EXECUTE, so values travel in the binary protocol and the SQL text is never built; the text protocol only carries a statement with no parameters.

iii

Long parameters

A parameter of one mebibyte or more is streamed with COM_STMT_SEND_LONG_DATA, one chunk per packet, and the execute packet that follows binds the pieces without repeating them. max_allowed_packet caps a packet, not a value, so a blob larger than it now binds; the caller does nothing.

iv

Auth

mysql_native_password caching_sha2_password (RSA-OAEP full auth) MariaDB client_ed25519 TLS.

v

Beyond the contract

Prepared handles with bind_named, more than one result set per statement, a configurable connection charset, and INT UNSIGNED above 2^31-1 read as Int64 rather than a negative number.

vi

Coverage

execute query transaction close prepare query_stream dialect streamed long parameters ping (default).

moonmysql implements Driver placeholder ? backend MySQL / MariaDB
See the family The contract it obeys