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

Lowers KILL, SHUTDOWN, RESTART, CLONE and ALTER INSTANCE.

Rule: MYSQL-INSTANCE-001. Scope: kill, kill_option, shutdown_stmt, restart_server_stmt, clone_stmt, opt_datadir_ssl, opt_ssl, alter_instance_stmt, alter_instance_action. The KILL identifier goes through the expression family. The equals sign of DATA DIRECTORY is optional (LeafNoise). The server raises a syntax error in the grammar actions, rejected as such here, when a space surrounds the colon between the CLONE account and port, when ROTATE names another key than INNODB (or, from MySQL 8.0, BINLOG), and when ENABLE or DISABLE names other than INNODB REDO_LOG. Constructs: Kill, Shutdown, Restart, CloneLocal, CloneInstance, AlterInstance with RotateMasterKey, ReloadTls, RedoLogSwitch, ReloadKeyring. Terminates: every child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/kill.html, https://dev.mysql.com/doc/refman/8.4/en/clone.html, https://dev.mysql.com/doc/refman/8.4/en/alter-instance.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function statement(Form $form): Statement

Lowers an instance statement.

Parameters

$formForm

Returns

Throws

ImplementationGap When a production has no rule
AnalysisException When the server rejects the statement while it parses it
Called from 1
Calls 10
public function scope(Node $option): ?KillScope

Lowers the modifier of KILL: a node of kill_option.

Parameters

$optionNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 4
public function local(Form $form): CloneLocal
public function directory(Form $form): array{Text, bool|null}

Lowers the data directory and the SSL choice of CLONE INSTANCE.

Parameters

$formForm

Returns

array{Text, bool|null}

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 2
public function action(Node $action): InstanceAction

Lowers the action of ALTER INSTANCE: a node of alter_instance_action.

Parameters

$actionNode

Throws

ImplementationGap When a production has no rule
AnalysisException When a name is not the one the server expects
Called from 1
Calls 7
public function rotate(Node $name): RotateMasterKey

Lowers ROTATE … MASTER KEY from its name: a node of ident_or_text.

Parameters

$nameNode

Throws

ImplementationGap When a production has no rule
AnalysisException When the name is not one the release accepts
Called from 1
Calls 6

Private surface 2§

Implementation details, listed for orientation only.

private const RELOADS = ['alter_instance_action: RELOAD TLS_SYM' => [null, false], 'alter_instance_acti…
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