final class Kill
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

KILL [CONNECTION | QUERY] processlist_id: a request to end a connection or the statement it runs.

Mirrors SQLCOM_KILL with LEX::kill_value_list. Rule: MYSQL-KILL-001. The identifier is an expression the server evaluates where no relation is visible; its facts are derived there. The statement returns no rows. Source: https://dev.mysql.com/doc/refman/8.4/en/kill.html. Status: Implemented.

Ending the statement of a connectiondoctest
$kill = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('kill query 42');
    [$kill->toString(), $kill->statement->scope] // => ['KILL QUERY 42', \SqlSemantics\Platform\MySql\Statement\Server\Instance\KillScope::Query]

Properties§

public KillScope|null $scope
public Scalar $process

Methods§

public function __construct(public KillScope|null $scope, public Scalar $process)

Parameters

$scopeKillScope|nullCONNECTION or QUERY, when written
$processScalarThe processlist identifier
public function deriveStatement(Derivation $derivation): void

Derives the identifier where no relation is visible.

Parameters

$derivationDerivation
Calls 2
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 2

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