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

Lowers one option of CHANGE MASTER TO or CHANGE REPLICATION SOURCE TO, or one log position of UNTIL.

Rule: MYSQL-SOURCE-OPTION-001. Scope: master_def, master_file_def (5.6, 5.7), source_def, source_file_def, source_log_file, source_log_pos and the change_replication_source_* keyword rules (8.0 and later). Each option production names one field of LEX_SOURCE_INFO (SourceOptionKind); from 8.0 to 8.3 an option keyword is a rule of its own whose MASTER_ and SOURCE_ alternatives are synonyms (the parser fills the same field and adds a deprecation warning for the MASTER_ one), so the option takes the vocabulary of the statement, which is the one of the release. The value is lowered by the leaf rules or by MYSQL-SOURCE-VALUE-001. Constructs: SourceOption. Terminates: unit productions over strict subtrees. Source: https://dev.mysql.com/doc/refman/8.4/en/change-replication-source-to.html, https://dev.mysql.com/doc/refman/8.0/en/change-master-to.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function keyword(Node $keyword): SourceOptionKind

Private surface 4§

Implementation details, listed for orientation only.

private const KEYWORDS = ['change_replication_source_auto_position: MASTER_AUTO_POSITION_SYM' => \SqlSem…
private const OPTIONS = ['master_def: IGNORE_SERVER_IDS_SYM EQ ( ignore_server_id_list )' => \SqlSemant…
private const FORWARD = ['master_def: master_file_def' => true, 'source_def: source_file_def' => true]
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 2
Method calls 3