final class ResetBinaryLogs
    implements ResetTarget
    uses Snapshot
Public API: explicitly declared with @visibility public.

RESET BINARY LOGS AND GTIDS [TO n], written RESET MASTER in the legacy vocabulary.

Mirrors the REFRESH_SOURCE flag of SQLCOM_RESET with LEX::next_binlog_file_nr. The vocabulary is the one of the release (MYSQL-REPLICATION-RELEASE-001): RESET MASTER up to 8.1, RESET BINARY LOGS AND GTIDS from 8.2, where 8.2 and 8.3 read RESET MASTER as its synonym. TO needs MySQL 8.0 or later. Facts: a TO number with a fraction (ER_ONLY_INTEGERS_ALLOWED), or 0 or greater than 2000000000 (ER_RESET_SOURCE_TO_VALUE_OUT_OF_RANGE), is a RefusedSetting diagnostic. Source: https://dev.mysql.com/doc/refman/8.4/en/reset-binary-logs-and-gtids.html, https://dev.mysql.com/doc/refman/8.0/en/reset-master.html, https://dev.mysql.com/doc/relnotes/mysql/8.2/en/news-8-2-0.html.

Reading RESET MASTER as its synonymdoctest
(new \SqlSemantics\Platform\MySql\Semantics('mysql-8.3.0'))->analyze('reset master to 5')->toString() // => 'RESET BINARY LOGS AND GTIDS TO 5'

Properties§

public Terminology $terminology
public Numeral|null $first = null

Methods§

public function __construct(public Terminology $terminology, public Numeral|null $first = null)

Parameters

$terminologyTerminologyThe vocabulary of the release
$firstNumeral|nullThe number of the first new binary log file, when TO is written
public function deriveTarget(Derivation $derivation): void

Checks the vocabulary and TO against the release and reports a refused file number.

Parameters

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

Writes the item.

Parameters

$outOutput
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private const LAST = 2000000000

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1