classAlterLogfileGroup
final class AlterLogfileGroup
implements Statement
uses Snapshot
@visibility public.ALTER LOGFILE GROUP name ADD {UNDOFILE | REDOFILE} 'file' [option …]: a request to add a log file to an NDB log file group.
Mirrors PT_alter_logfile_group and the ALTER_LOGFILE_GROUP command of st_alter_tablespace in MySQL 5.x. Rule: MYSQL-ALTER-LOGFILE-GROUP-001. REDOFILE is accepted by the MySQL 5.x grammar only. The options are checked, kept and written in order by MYSQL-STORAGE-OPTIONS-001. A log file group is no relation, so the statement neither declares nor resolves one. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-logfile-group.html. Status: Implemented.
$statement = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("alter logfile group lg add undofile 'v.log' wait");
[$statement->toString(), $statement->statement->file->kind] // => ["ALTER LOGFILE GROUP lg ADD UNDOFILE 'v.log' WAIT", \SqlSemantics\Platform\MySql\Statement\Server\Storage\Option\LogFileKind::Undo]Properties§
public list<StorageOption> $optionspublic Name $namepublic LogFile $fileMethods§
public function __construct(
public Name $name,
public LogFile $file,
list<StorageOption> $options = [],
)Parameters
$name | Name | The log file group name |
$file | LogFile | The log file |
$options | list<StorageOption> | The options in written order |
Calls 3
- method-call StorageOptions::checked() line 46
- new StorageOptions line 46
- class-const StorageOptions::ALTER_LOGFILE_GROUP() line 46
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 54
- new StorageOptions line 54
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 4
- method-call Output::keyword() line 62
- class-const NameUse::Identifier() line 62
- method-call StorageOptions::render() line 63
- new StorageOptions line 63
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
AlterLogfileGroupTestcalls