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

ALTER TABLESPACE name {READ_ONLY | READ_WRITE | NOT ACCESSIBLE}: a request to change the access mode of a tablespace (MySQL 5.6 and 5.7).

Mirrors the ALTER_ACCESS_MODE_TABLESPACE command of st_alter_tablespace. Rule: MYSQL-ALTER-TABLESPACE-ACCESS-001. No storage engine of these releases implements it. A tablespace is no relation, so the statement neither declares nor resolves one. Source: https://dev.mysql.com/doc/refman/5.7/en/alter-tablespace.html. Status: Implemented.

Making a tablespace read-onlydoctest
$alter = (new \SqlSemantics\Platform\MySql\Semantics('mysql-5.7.44'))->analyze('alter tablespace ts not accessible');
    [$alter->toString(), $alter->statement->access] // => ['ALTER TABLESPACE ts NOT ACCESSIBLE', \SqlSemantics\Platform\MySql\Statement\Server\Storage\Option\TablespaceAccess::NotAccessible]

Properties§

public Name $name

Methods§

public function __construct(public Name $name, public TablespaceAccess $access)

Parameters

$nameNameThe tablespace name
$accessTablespaceAccessThe access mode
public function deriveStatement(Derivation $derivation): void

Has nothing to derive: a tablespace is no relation.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 3

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