final class ReplicaRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql\Lowering\Replication". Code outside that scope must not name this declaration.

Lowers START SLAVE, START REPLICA, STOP SLAVE and STOP REPLICA of every release.

Rule: MYSQL-REPLICA-001. Scope: slave, slave_start, start_slave_opts, slave_connection_opts, slave_user_name_opt, slave_user_pass_opt, slave_plugin_auth_opt, slave_plugin_dir_opt (5.6, 5.7), start_replica_stmt, stop_replica_stmt, replica, opt_user_option, opt_password_option, opt_default_auth_option, opt_plugin_dir_option (8.0 and later), and the thread lists opt_slave_thread_option_list, slave_thread_option_list, slave_thread_option, opt_replica_thread_option_list, replica_thread_option_list, replica_thread_option. The spelling SLAVE or REPLICA is kept; the UNTIL clause is lowered by MYSQL-REPLICA-UNTIL-002. Constructs: StartReplica, StopReplica. Terminates: the thread lists are flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/start-replica.html, https://dev.mysql.com/doc/refman/8.4/en/stop-replica.html, https://dev.mysql.com/doc/refman/5.7/en/start-slave.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function legacyStart(Form $form): StartReplica

Lowers the START SLAVE of 5.7, whose parts are split over slave_start and start_slave_opts.

Parameters

$formForm

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 6
public function connection(Node $options): list<Node>
public function option(Node $option): ?Text

Lowers one connection option; an absent option is null.

Parameters

$optionNode

Returns

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 4

Private surface 4§

Implementation details, listed for orientation only.

private const THREADS = ['slave_thread_option: SQL_THREAD' => \SqlSemantics\Platform\MySql\Statement\Re…
private const THREAD_LISTS = ['opt_slave_thread_option_list: slave_thread_option_list' => ['slave_thread_opt…
private const CONNECTION = ['slave_user_name_opt:' => null, 'slave_user_name_opt: USER EQ TEXT_STRING_sys'…
private Lowering $lowering

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 1
Method calls 1