final class Choices
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Checks the ALGORITHM and LOCK names of online data definition statements against the release.

Rule: MYSQL-ALTER-CHOICES-001. The server compares the name without regard to case with the values of its release: ALGORITHM INPLACE and COPY, INSTANT from 8.0 on, and DEFAULT as a name in 5.6 and 5.7 only; LOCK NONE, SHARED and EXCLUSIVE, and DEFAULT as a name in 5.6 and 5.7 only. The keyword DEFAULT is always accepted. Any other name is the diagnostic UnknownAlterChoice. Terminates: constant work. Source: https://github.com/mysql/mysql-server/blob/mysql-5.7.44/sql/sql_alter.cc (Alter_info::set_requested_algorithm, set_requested_lock), https://github.com/mysql/mysql-server/blob/mysql-8.4.7/sql/sql_yacc.yy (alter_algorithm_option_value, alter_lock_option_value). Status: Implemented.

Methods§

public function algorithm(?Name $name, Derivation $derivation): void
public function lock(?Name $name, Derivation $derivation): void
public function check(
    ?Name $name,
    list<string> $known,
    bool $lock,
    Derivation $derivation,
): void

Reports a name that is none of the known values.

Parameters

$name?Name
$knownlist<string>The values the server accepts, in upper case
$lockbool
$derivationDerivation
Called from 2
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 2
Method calls 2