classLoadIndex
final class LoadIndex
implements Statement
uses Snapshot
@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.
$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> $tablesMethods§
public function __construct(list<PreloadedTable> $tables)Parameters
$tables | list<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 oneCalls 4
- static-call Check::listOf() line 48
- class-const PreloadedTable::class() line 48
- static-call Check::input() line 50
- function-call
countline 50
public function deriveStatement(Derivation $derivation): voidRecords the resolution of each table, reports a table named twice, and records the result rows.
Parameters
$derivation | Derivation |
Calls 4
- method-call TableNames::record() line 63
- new TableNames line 63
- method-call AdminRows::admin() line 64
- new AdminRows line 64
public function render(Output $out): voidTest 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
- new SqlSemantics\Platform\MySql\Lowering\Server\Maintenance\KeyCacheRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Maintenance/KeyCacheRule.php:86
- new SqlSemantics\Platform\MySql\Lowering\Server\Maintenance\KeyCacheRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Maintenance/KeyCacheRule.php:87