pub enum AllowedMySqlQuery {
DigestSnapshot,
ThreadsSnapshot,
MetadataLocksSnapshot,
BufferPoolSnapshot,
}Expand description
Closed enumeration of every SQL statement the live-mysql adapter
will ever execute. Adding a variant is a reviewable change that
simultaneously breaks Self::sql_concat_for_lock and therefore
the allow-list lock test.
Variants§
DigestSnapshot
Per-digest cumulative latency / call / row counters.
Source: performance_schema.events_statements_summary_by_digest
(MySQL 5.6+; column names stable through 8.4).
Residual classes emitted: PlanRegression, WorkloadPhase.
ThreadsSnapshot
Per-thread wait-event sample.
Source: performance_schema.threads (MySQL 5.6+).
Residual class emitted: Contention.
MetadataLocksSnapshot
Per-object metadata-lock wait snapshot.
Source: performance_schema.metadata_locks (MySQL 5.7+).
Residual class emitted: Contention (no PostgreSQL analog).
BufferPoolSnapshot
Per-pool InnoDB buffer-pool cumulative counters.
Source: information_schema.innodb_buffer_pool_stats
(MySQL 5.6+).
Residual class emitted: CacheIo.
Implementations§
Source§impl AllowedMySqlQuery
impl AllowedMySqlQuery
Sourcepub const ALL: [AllowedMySqlQuery; 4]
pub const ALL: [AllowedMySqlQuery; 4]
Every variant the adapter knows about. Used by the lock test and by the scraper to enumerate a full poll cycle in a deterministic order.
Sourcepub fn sql(&self) -> &'static str
pub fn sql(&self) -> &'static str
Pinned SQL text for this variant. Every string is a SELECT
against performance_schema or information_schema. Any edit
invalidates the lock test and forces a paired paper update.
Sourcepub fn sql_concat_for_lock() -> String
pub fn sql_concat_for_lock() -> String
Concatenation of every variant’s SQL text, in ALL-order,
separated by a single newline. The SHA-256 of this string is
pinned by tests/live_query_allowlist_lock_mysql.rs.
Trait Implementations§
Source§impl Clone for AllowedMySqlQuery
impl Clone for AllowedMySqlQuery
Source§fn clone(&self) -> AllowedMySqlQuery
fn clone(&self) -> AllowedMySqlQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AllowedMySqlQuery
impl Debug for AllowedMySqlQuery
Source§impl Hash for AllowedMySqlQuery
impl Hash for AllowedMySqlQuery
Source§impl PartialEq for AllowedMySqlQuery
impl PartialEq for AllowedMySqlQuery
impl Copy for AllowedMySqlQuery
impl Eq for AllowedMySqlQuery
impl StructuralPartialEq for AllowedMySqlQuery
Auto Trait Implementations§
impl Freeze for AllowedMySqlQuery
impl RefUnwindSafe for AllowedMySqlQuery
impl Send for AllowedMySqlQuery
impl Sync for AllowedMySqlQuery
impl Unpin for AllowedMySqlQuery
impl UnsafeUnpin for AllowedMySqlQuery
impl UnwindSafe for AllowedMySqlQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.