classCreateUndoTablespace
final class CreateUndoTablespace
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.CREATE UNDO TABLESPACE name ADD DATAFILE 'file' [option …]: a request to create an undo tablespace (MySQL 8.0.14 and later).
Mirrors PT_create_undo_tablespace (Sql_cmd_create_undo_tablespace). Rule: MYSQL-CREATE-UNDO-TABLESPACE-001. The data file name ends in .ibu. 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/create-tablespace.html. Status: Implemented.
$statement = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("create undo tablespace u add datafile 'u.ibu'");
[$statement->toString(), $statement->statement->datafile->value] // => ["CREATE UNDO TABLESPACE u ADD DATAFILE 'u.ibu'", 'u.ibu']Properties§
public list<StorageOption> $optionspublic Name $namepublic Text $datafileMethods§
public function __construct(
public Name $name,
public Text $datafile,
list<StorageOption> $options = [],
)Parameters
$name | Name | The tablespace name |
$datafile | Text | The data file |
$options | list<StorageOption> | The options in written order |
Calls 3
- method-call StorageOptions::checked() line 47
- new StorageOptions line 47
- class-const StorageOptions::UNDO_TABLESPACE() line 47
public function deriveStatement(Derivation $derivation): voidReports the options the server rejects while it parses the statement.
Parameters
$derivation | Derivation |
Calls 2
- method-call StorageOptions::derive() line 55
- new StorageOptions line 55
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 4
- method-call Output::keyword() line 63
- class-const NameUse::Identifier() line 63
- method-call StorageOptions::render() line 64
- new StorageOptions line 64
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
CreateUndoTablespaceTestcalls