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

CREATE LOGFILE GROUP name ADD {UNDOFILE | REDOFILE} 'file' [option …]: a request to create an NDB log file group.

Mirrors PT_create_logfile_group and the CREATE_LOGFILE_GROUP command of st_alter_tablespace in MySQL 5.x. Rule: MYSQL-CREATE-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/create-logfile-group.html. Status: Implemented.

Creating a log file groupdoctest
$statement = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("create logfile group lg add undofile 'u.log' undo_buffer_size = 8M engine = ndb");
    [$statement->toString(), $statement->statement->file->file->value] // => ["CREATE LOGFILE GROUP lg ADD UNDOFILE 'u.log' UNDO_BUFFER_SIZE `8M` ENGINE `ndb`", 'u.log']

Properties§

public list<StorageOption> $options
public Name $name
public LogFile $file

Methods§

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

Parameters

$nameNameThe log file group name
$fileLogFileThe log file
$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