final class ResetReplica
    implements ResetTarget
    uses Snapshot
Public API: explicitly declared with @visibility public.

RESET REPLICA [ALL] [FOR CHANNEL 'name'], written RESET SLAVE in the legacy vocabulary.

Mirrors the REFRESH_REPLICA flag of SQLCOM_RESET with LEX::reset_replica_info. The vocabulary is the one of the release (MYSQL-REPLICATION-RELEASE-001): RESET SLAVE of 8.0 to 8.3 is read as its synonym RESET REPLICA. A channel needs MySQL 5.7 or later. Facts: a line feed in the channel name is a RefusedSetting diagnostic. Source: https://dev.mysql.com/doc/refman/8.4/en/reset-replica.html, https://dev.mysql.com/doc/refman/8.0/en/reset-slave.html.

Reading RESET SLAVE as its synonymdoctest
(new \SqlSemantics\Platform\MySql\Semantics('mysql-8.0.44'))->analyze('reset slave all')->toString() // => 'RESET REPLICA ALL'

Properties§

public Terminology $terminology
public bool $all = false
public Text|null $channel = null

Methods§

public function __construct(
    public Terminology $terminology,
    public bool $all = false,
    public Text|null $channel = null,
)

Parameters

$terminologyTerminologyThe vocabulary of the release
$allboolWhether ALL is written: the connection settings are removed too
$channelText|nullThe replication channel, when FOR CHANNEL is written
public function deriveTarget(Derivation $derivation): void

Checks the vocabulary and the channel against the release.

Parameters

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

Writes the item.

Parameters

$outOutput
Calls 2

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 1