classStopReplica
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.
(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> $threadspublic Terminology $terminologypublic Text|null $channel = nullMethods§
public function __construct(
public Terminology $terminology,
list<ReplicaThread> $threads = [],
public Text|null $channel = null,
)Parameters
$terminology | Terminology | The spelling: STOP SLAVE or STOP REPLICA |
$threads | list<ReplicaThread> | The threads in written order; empty for both |
$channel | Text|null | The replication channel, when FOR CHANNEL is written |
Calls 2
- static-call Check::listOf() line 49
- class-const ReplicaThread::class() line 49
public function deriveStatement(Derivation $derivation): voidChecks the release and reports a refused channel name.
Parameters
$derivation | Derivation |
Calls 7
- static-call Check::input() line 58
- method-call Releases::replica() line 58
- new Releases line 58
- class-const Terminology::Legacy() line 58
- class-const GrammarRelease::MySql5651() line 59
- method-call SourceSettings::lineFeed() line 60
- new SourceSettings line 60
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 68
- class-const Terminology::Legacy() line 68
- method-call Output::symbol() line 71
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
- new SqlSemantics\Platform\MySql\Lowering\Replication\ReplicaRule::statement() packages/sql-semantics-mysql/src/Lowering/Replication/ReplicaRule.php:92
- new SqlSemantics\Platform\MySql\Lowering\Replication\ReplicaRule::statement() packages/sql-semantics-mysql/src/Lowering/Replication/ReplicaRule.php:93
- new SqlSemantics\Platform\MySql\Lowering\Replication\ReplicaRule::statement() packages/sql-semantics-mysql/src/Lowering/Replication/ReplicaRule.php:108
- new SqlSemantics\Platform\MySql\Lowering\Replication\ReplicaRule::statement() packages/sql-semantics-mysql/src/Lowering/Replication/ReplicaRule.php:113