classShowReplicaStatus
final class ShowReplicaStatus
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.SHOW REPLICA STATUS (SHOW SLAVE STATUS): the state of the replication threads.
Rule: MYSQL-SHOW-REPLICA-STATUS-001. The two spellings are kept: they name the columns differently (Slave_IO_State, Master_Host against Replica_IO_State, Source_Host), and each release accepts only some of them. FOR CHANNEL (5.7 and later) selects a channel. The columns are those of the layout of MYSQL-SHOW-ROWS-001 for the spelling and release. Terminates: a fixed layout. Source: https://dev.mysql.com/doc/refman/8.4/en/show-replica-status.html. Status: Implemented.
$show = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SHOW REPLICA STATUS FOR CHANNEL 'c'");
[$show->field(0)->name?->value, $show->toString()] // => ['Replica_IO_State', "SHOW REPLICA STATUS FOR CHANNEL 'c'"]Properties§
public Terminology $terminologypublic ?Text $channel = nullMethods§
public function __construct(public Terminology $terminology, public ?Text $channel = null)Parameters
$terminology | Terminology | Whether SLAVE or REPLICA is written |
$channel | ?Text | The channel after FOR CHANNEL |
public function deriveStatement(Derivation $derivation): voidDerives the rows.
Parameters
$derivation | Derivation |
Calls 5
- method-call ShowFacts::rows() line 50
- new ShowFacts line 50
- class-const Terminology::Legacy() line 50
- class-const Report::SlaveStatus() line 50
- class-const Report::ReplicaStatus() line 50
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 3
- class-const Terminology::Legacy() line 59
- method-call Output::keyword() line 59
- class-const Terminology::Current() line 60
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Relations§
Instantiated in 3
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyShowRule::session() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyShowRule.php:110
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ShowRule::replication() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ShowRule.php:102
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ShowRule::replication() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ShowRule.php:104