classChangeRule
final class ChangeRule
Lowers CHANGE MASTER TO, CHANGE REPLICATION SOURCE TO and CHANGE REPLICATION FILTER of every release.
Rule: MYSQL-CHANGE-001. Scope: change (5.6 to 8.3), change_replication_stmt (8.4 and later), change_replication_source, master_defs, source_defs. The 5.x statement is written in the legacy vocabulary; from 8.0 the statement is in the current one, CHANGE MASTER of 8.0 to 8.3 being its synonym (change_replication_source: MASTER_SYM fills the same LEX command and only adds a deprecation warning). The options are lowered by MYSQL-SOURCE-OPTION-001, the filters by MYSQL-FILTER-001 and the channel by the entry rule. Constructs: ChangeReplicationSource, ChangeReplicationFilter. Terminates: the option lists are flattened iteratively. 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, https://dev.mysql.com/doc/refman/8.4/en/change-replication-filter.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers one CHANGE statement.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 17
- function-call
countline 79 - method-call Form::node() line 79
- class-const ChangeRule::FILTERS() line 80
- new ChangeReplicationFilter line 81
- method-call FilterRule::filters() line 81
- new FilterRule line 81
- class-const ChangeRule::SOURCES() line 83
- static-call ImplementationGap::production() line 83
- method-call Lowering::form() line 86
- function-call
in_arrayline 87 - class-const ChangeRule::SPELLINGS() line 87
- new SourceOptionRule line 93
- method-call Spine::items() line 95
- new Spine line 95
- class-const ChangeRule::LISTS() line 95
- method-call SourceOptionRule::option() line 96
- new ChangeReplicationSource line 99
Private surface 5§
Implementation details, listed for orientation only.
private const SOURCES = ['change: CHANGE MASTER_SYM TO_SYM master_defs' => \SqlSemantics\Platform\MySql…private const FILTERS = ['change: CHANGE REPLICATION FILTER_SYM filter_defs' => true, 'change: CHANGE R…private const LISTS = ['master_defs: master_def', 'master_defs: master_defs , master_def', 'source_de…private const SPELLINGS = ['change_replication_source: MASTER_SYM', 'change_replication_source: REPLICATI…private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ChangeRuleTestcalls