Expand description
MySQL utility library.
Re-exports§
pub use schemas::MySqlTableSchema;
pub use schemas::QualifiedTableRef;
pub use schemas::SYSTEM_SCHEMAS;
pub use schemas::SchemaRequest;
pub use schemas::schema_info;
pub use privileges::validate_source_privileges;
pub use decoding::pack_mysql_row;
Modules§
Structs§
- Config
- Configuration for MySQL connections.
- Missing
Privilege - MySql
Column Desc - MySql
Conn - A MySQL connection with an optional SSH tunnel handle.
- MySql
KeyDesc - MySql
Table Desc - Proto
MySql Column Desc - Proto
MySql KeyDesc - Proto
MySql Table Desc - Timeout
Config - Unsupported
Data Type
Enums§
- MySql
Error - Tunnel
Config - Configures an optional tunnel for use when connecting to a MySQL database.
Constants§
- DEFAULT_
CONNECT_ TIMEOUT - DEFAULT_
SNAPSHOT_ LOCK_ WAIT_ TIMEOUT - DEFAULT_
SNAPSHOT_ MAX_ EXECUTION_ TIME - DEFAULT_
TCP_ KEEPALIVE - ER_
NO_ SUCH_ TABLE - ER_
SOURCE_ FATAL_ ERROR_ READING_ BINLOG_ CODE
Functions§
- ensure_
full_ row_ binlog_ format - ensure_
gtid_ consistency - ensure_
replication_ commit_ order - In case this is a MySQL replica, we ensure that the replication settings are such that
the replica would commit all transactions in the order they were committed on the primary.
We don’t really know that this is a replica, but if the settings indicate multi-threaded
replication and the preserve-commit-order setting is not on, then it could be a replica
with correctness issues.
We used to check
performance_schema.replication_connection_configuration
to determine if this was in-fact a replica but that requires non-standard privileges. Before MySQL 8.0.27, single-threaded was default and preserve-commit-order was not, and after 8.0.27 multi-threaded is default and preserve-commit-order is default on. So both of those default scenarios are fine. Unfortunately on some versions of MySQL on RDS, the default parameters use multi-threading without the preserve-commit-order setting on. - query_
sys_ var - Query a MySQL System Variable
- quote_
identifier - Quotes MySQL identifiers. See MySQL quote_identifier()