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

Lowers RESET with its items and RESET PERSIST.

Rule: MYSQL-RESET-002. Scope: reset, reset_options, reset_option, slave_reset_options, opt_replica_reset_options, source_reset_options, master_or_binary_logs_and_gtids, opt_if_exists_ident, persisted_variable_ident. RESET SLAVE is legacy in 5.x and, from 8.0 to 8.3, the synonym of RESET REPLICA (the parser sets the same REFRESH_REPLICA flag and adds a deprecation warning); RESET MASTER is legacy up to 8.1 and, in 8.2 and 8.3, the synonym of RESET BINARY LOGS AND GTIDS. DEFAULT.variable names the component default. Constructs: Reset, ResetReplica, ResetBinaryLogs, ResetQueryCache, ResetPersist. Terminates: the item list is flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/reset.html, https://dev.mysql.com/doc/refman/8.4/en/reset-persist.html, https://dev.mysql.com/doc/relnotes/mysql/8.2/en/news-8-2-0.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function first(Node $clause): ?Numeral

Lowers the TO clause of RESET BINARY LOGS AND GTIDS; an absent clause is null.

Parameters

$clauseNode

Returns

Throws

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

Private surface 4§

Implementation details, listed for orientation only.

private const REPLICAS = ['reset_option: SLAVE slave_reset_options' => \SqlSemantics\Platform\MySql\Stat…
private const BINARY_LOGS = ['reset_option: MASTER_SYM' => \SqlSemantics\Platform\MySql\Statement\Replicati…
private const ALL = ['slave_reset_options:' => false, 'slave_reset_options: ALL' => true, 'opt_repl…
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