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

LOAD INDEX INTO CACHE t [INDEX (…)] [IGNORE LEAVES], …: a request to preload the indexes of MyISAM tables into their key caches.

Mirrors PT_load_index_stmt and PT_load_index_partitions_stmt. Rule: MYSQL-LOAD-INDEX-001. Each table resolves by MYSQL-SERVER-TABLES-001 and its resolution is the relation fact of its PreloadedTable; a table named twice is NonUniqueTable. A table with a partition selection is the only table of the statement. The server returns one row per table, which describes server state no context holds. Source: https://dev.mysql.com/doc/refman/8.4/en/load-index.html. Status: Implemented.

Preloading indexesdoctest
$load = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('load index into cache t partition (all) ignore leaves');
    [$load->toString(), $load->statement->tables[0]->ignoreLeaves] // => ['LOAD INDEX INTO CACHE t PARTITION (ALL) IGNORE LEAVES', true]

Properties§

public list<PreloadedTable> $tables

Methods§

public function __construct(list<PreloadedTable> $tables)

Parameters

$tableslist<PreloadedTable>The tables in written order; at least one

Throws

InvalidConstruction When the list is empty, or a table with partitions is not the only one
Calls 4
public function deriveStatement(Derivation $derivation): void

Records the resolution of each table, reports a table named twice, and records the result rows.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 1

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