classStartGroupReplication
final class StartGroupReplication
implements Statement
uses Snapshot
@visibility public.START GROUP_REPLICATION [USER = …, PASSWORD = …, DEFAULT_AUTH = …]: starts group replication (MySQL 5.7 and later).
Mirrors SQLCOM_START_GROUP_REPLICATION with LEX::replica_connection; the options are kept in written order, an option possibly written twice. The options need MySQL 8.0 or later. Rule: MYSQL-GROUP-REPLICATION-001. Facts: a line feed in a value, or a password longer than 32 bytes (ER_GROUP_REPLICATION_PASSWORD_LENGTH), is a RefusedSetting diagnostic. Source: https://dev.mysql.com/doc/refman/8.4/en/start-group-replication.html. Status: Implemented.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze("start group_replication user = 'u', password = 'p'")->toString() // => "START GROUP_REPLICATION USER = 'u', PASSWORD = 'p'"Properties§
public list<CredentialOption> $optionsMethods§
public function __construct(list<CredentialOption> $options = [])Parameters
$options | list<CredentialOption> | The options in written order |
Calls 2
- static-call Check::listOf() line 52
- class-const CredentialOption::class() line 52
public function deriveStatement(Derivation $derivation): voidChecks the release and reports refused values.
Parameters
$derivation | Derivation |
Calls 12
- static-call Check::input() line 61
- class-const GrammarRelease::MySql5651() line 61
- method-call Releases::legacy() line 62
- new Releases line 62
- method-call SourceSettings::lineFeed() line 64
- new SourceSettings line 64
- class-const Credential::Password() line 65
- function-call
strlenline 65 - class-const StartGroupReplication::PASSWORD() line 65
- method-call Derivation::report() line 66
- new RefusedSetting line 66
- class-const ReplicationError::GroupPasswordTooLong() line 66
public function render(Output $out): voidPrivate surface 1§
Implementation details, listed for orientation only.
private const PASSWORD = 32Test 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\Replication\LogRule::group() packages/sql-semantics-mysql/src/Lowering/Replication/LogRule.php:112
- new SqlSemantics\Platform\MySql\Lowering\Replication\LogRule::start() packages/sql-semantics-mysql/src/Lowering/Replication/LogRule.php:132
- new SqlSemantics\Platform\MySql\Lowering\Replication\LogRule::start() packages/sql-semantics-mysql/src/Lowering/Replication/LogRule.php:143