final class StopReplica
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

STOP REPLICA [threads] [FOR CHANNEL 'name'], or STOP SLAVE.

Mirrors SQLCOM_REPLICA_STOP: the thread flags in written order (none means both threads). The spelling SLAVE or REPLICA is kept (MYSQL-REPLICATION-RELEASE-001). A channel needs MySQL 5.7 or later. Rule: MYSQL-STOP-REPLICA-001. Facts: a line feed in the channel name is a RefusedSetting diagnostic. Source: https://dev.mysql.com/doc/refman/8.4/en/stop-replica.html. Status: Implemented.

Stopping the applier thread of a channeldoctest
(new \SqlSemantics\Platform\MySql\Semantics('mysql-5.7.44'))->analyze("stop slave sql_thread for channel 'c'")->toString() // => "STOP SLAVE SQL_THREAD FOR CHANNEL 'c'"

Properties§

public list<ReplicaThread> $threads
public Terminology $terminology
public Text|null $channel = null

Methods§

public function __construct(
    public Terminology $terminology,
    list<ReplicaThread> $threads = [],
    public Text|null $channel = null,
)

Parameters

$terminologyTerminologyThe spelling: STOP SLAVE or STOP REPLICA
$threadslist<ReplicaThread>The threads in written order; empty for both
$channelText|nullThe replication channel, when FOR CHANNEL is written
Calls 2
public function deriveStatement(Derivation $derivation): void

Checks the release and reports a refused channel name.

Parameters

$derivationDerivation
Calls 7
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 3

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 4