pub enum ReplicationStatement {
ChangeSource {
options: ThinVec<ChangeReplicationSourceOption>,
channel: Option<Literal>,
meta: Meta,
},
ChangeFilter {
rules: ThinVec<ReplicationFilterRule>,
channel: Option<Literal>,
meta: Meta,
},
StartReplica {
threads: ThinVec<ReplicaThreadOption>,
until: ThinVec<ReplicaUntilCondition>,
user: Option<Literal>,
password: Option<Literal>,
default_auth: Option<Literal>,
plugin_dir: Option<Literal>,
channel: Option<Literal>,
meta: Meta,
},
StopReplica {
threads: ThinVec<ReplicaThreadOption>,
channel: Option<Literal>,
meta: Meta,
},
StartGroupReplication {
options: ThinVec<GroupReplicationOption>,
meta: Meta,
},
StopGroupReplication {
meta: Meta,
},
}Expand description
A MySQL replication-administration statement — the boxed payload of
Statement::Replication.
Six verbs across the five measured families ride one enum because they are one dialect
unit reached through the replication-specific leading-keyword sequences. START/STOP GROUP_REPLICATION are two variants (the two verbs carry different tails — only START
takes options) of the single GROUP REPLICATION family.
Variants§
ChangeSource
CHANGE REPLICATION SOURCE TO <option-list> [FOR CHANNEL '<ch>'].
The option list is non-empty (a bare CHANGE REPLICATION SOURCE TO is
ER_PARSE_ERROR on mysql:8.4.10) and comma-separated; each element is a
ChangeReplicationSourceOption. FOR CHANNEL is a trailing suffix, not a list
member — an option after the channel (… FOR CHANNEL 'c', SOURCE_PORT = 1) rejects.
Fields
options: ThinVec<ChangeReplicationSourceOption>The <name> = <value> options in source order; always non-empty.
ChangeFilter
CHANGE REPLICATION FILTER <rule-list> [FOR CHANNEL '<ch>'].
The rule list is non-empty and comma-separated; each element is a
ReplicationFilterRule.
Fields
rules: ThinVec<ReplicationFilterRule>The filter rules in source order; always non-empty.
StartReplica
START REPLICA [<thread-list>] [UNTIL <cond-list>] [USER='u'] [PASSWORD='p'] [DEFAULT_AUTH='a'] [PLUGIN_DIR='d'] [FOR CHANNEL '<ch>'].
The connection options are four independent fixed-order optionals (MySQL’s
opt_user_option … opt_plugin_dir_option, space-separated — not a comma list,
unlike StartGroupReplication). Each may appear alone
(START REPLICA PASSWORD = 'p' is grammar-valid on mysql:8.4.10).
Fields
threads: ThinVec<ReplicaThreadOption>The SQL_THREAD/IO_THREAD thread-type list (opt_replica_thread_option_list);
empty when none was written (start both threads).
until: ThinVec<ReplicaUntilCondition>The UNTIL <cond-list> stop condition (opt_replica_until); empty when no
UNTIL was written. See ReplicaUntilCondition.
StopReplica
STOP REPLICA [<thread-list>] [FOR CHANNEL '<ch>'].
Unlike StartReplica, STOP REPLICA takes no UNTIL or
connection tail — STOP REPLICA UNTIL … / STOP REPLICA USER = … is ER_PARSE_ERROR
on mysql:8.4.10.
Fields
threads: ThinVec<ReplicaThreadOption>The SQL_THREAD/IO_THREAD thread-type list; empty when none was written.
StartGroupReplication
START GROUP_REPLICATION [<option-list>].
The options are USER/PASSWORD/DEFAULT_AUTH in any order, comma-separated
(group_replication_start_options — the distinguishing difference from
StartReplica’s space-separated fixed-order tail), so they ride
an ordered list. Empty when none was written.
Fields
options: ThinVec<GroupReplicationOption>The connection options in source order; empty when none was written.
StopGroupReplication
STOP GROUP_REPLICATION — takes no options (STOP GROUP_REPLICATION USER = … is
ER_PARSE_ERROR on mysql:8.4.10).
Trait Implementations§
Source§impl Clone for ReplicationStatement
impl Clone for ReplicationStatement
Source§fn clone(&self) -> ReplicationStatement
fn clone(&self) -> ReplicationStatement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReplicationStatement
impl Debug for ReplicationStatement
Source§impl<'de> Deserialize<'de> for ReplicationStatement
impl<'de> Deserialize<'de> for ReplicationStatement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ReplicationStatement
Source§impl Hash for ReplicationStatement
impl Hash for ReplicationStatement
Source§impl PartialEq for ReplicationStatement
impl PartialEq for ReplicationStatement
Source§impl Render for ReplicationStatement
impl Render for ReplicationStatement
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Source§fn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses. Read moreSource§impl Serialize for ReplicationStatement
impl Serialize for ReplicationStatement
Source§impl Spanned for ReplicationStatement
impl Spanned for ReplicationStatement
impl StructuralPartialEq for ReplicationStatement
Auto Trait Implementations§
impl Freeze for ReplicationStatement
impl RefUnwindSafe for ReplicationStatement
impl Send for ReplicationStatement
impl Sync for ReplicationStatement
impl Unpin for ReplicationStatement
impl UnsafeUnpin for ReplicationStatement
impl UnwindSafe for ReplicationStatement
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DynAstExt for T
impl<T> DynAstExt for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&dyn Any for downcasting a node back to its concrete type.Source§fn dyn_clone(&self) -> Box<dyn DynAstExt>
fn dyn_clone(&self) -> Box<dyn DynAstExt>
Clone (whose
Self-returning signature cannot go through a vtable).Source§fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
PartialEq (whose &Self argument cannot go through a vtable). Equal
iff other holds the same concrete type and that type deems the values
equal; differently-typed nodes are never equal.