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

ALTER UNDO TABLESPACE name SET {ACTIVE | INACTIVE} [option …]: a request to activate or deactivate an undo tablespace (MySQL 8.0.14 and later).

Mirrors PT_alter_undo_tablespace (Sql_cmd_alter_undo_tablespace). Rule: MYSQL-ALTER-UNDO-TABLESPACE-001. An inactive undo tablespace can be dropped. The options are checked, kept and written in order by MYSQL-STORAGE-OPTIONS-001. A tablespace is no relation, so the statement neither declares nor resolves one. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-tablespace.html. Status: Implemented.

Deactivating an undo tablespacedoctest
$statement = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("alter undo tablespace u set inactive");
    [$statement->toString(), $statement->statement->active] // => ["ALTER UNDO TABLESPACE u SET INACTIVE", false]

Properties§

public list<StorageOption> $options
public Name $name
public bool $active

Methods§

public function __construct(
    public Name $name,
    public bool $active,
    list<StorageOption> $options = [],
)

Parameters

$nameNameThe tablespace name
$activeboolWhether ACTIVE (true) or INACTIVE (false) is written
$optionslist<StorageOption>The options in written order
Calls 3
public function deriveStatement(Derivation $derivation): void

Reports the options the server rejects while it parses the statement.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 4

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