final class NameConversion
    implements MissingInput
    uses Snapshot
Public API: explicitly declared with @visibility public.

The conversion MySQL applies to the text of an introduced string from the character set of its introducer to the system character set.

Rule: MYSQL-SELECT-ITEM-NAME-001. The server names an unaliased string literal after its value converted from the character set of the literal to the system character set (utf8mb3), keeping at most 255 bytes of whole characters. For an introducer whose characters are not ASCII bytes (ucs2, utf16, utf16le, utf32), and for text with bytes outside ASCII in a character set other than binary, utf8mb3 and utf8mb4, the name depends on the server's conversion table of that character set, which the profile does not carry. A text read in the client character set depends on the session state character_set_client instead. Source: sql/item.cc (Name_string::copy) and sql/thr_malloc.cc (sql_strmake_with_convert) of each release, https://dev.mysql.com/doc/refman/8.4/en/charset-introducer.html. Status: Implemented.

Reading why a column of a derived table cannot be decided by namedoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SELECT x FROM (SELECT _latin2'é') AS d", []);
    $query->field('x')->type->missing[0]->describe() // => 'the conversion MySQL applies to text in the character set latin2 when it names a column after it'

Properties§

public string $charset

Methods§

public function __construct(public string $charset)

Parameters

$charsetstringThe character set of the introducer, as written in lower case
public function describe(): string

Describes the missing input.

Returns

string
Test cases 1

Test cases 7§

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

Dedicated tests 3
Other tests reaching this symbol 4

Relations§

Instantiated in 3
Type declarations 1