classPartitionEntry
final class PartitionEntry
implements Statement
uses Snapshot
@visibility public.A statement that is only a partitioning clause, PARTITION BY … (5.6 and 5.7).
Rule: MYSQL-PARTITION-ENTRY-001. The grammar of 5.6 and 5.7 has this statement so that the server can read the partitioning stored in a table definition file; sent by a client it fails with ER_PARTITION_ENTRY_ERROR, which is the diagnostic PartitionEntryRefused. No table is partitioned, so the clause is derived in a scope with no visible relation. The statement changes and provides no declaration. Source: https://github.com/mysql/mysql-server/blob/mysql-5.7.44/sql/sql_yacc.yy (rule partition_entry). Status: Implemented.
(new \SqlSemantics\Platform\MySql\Semantics('mysql-5.7.44'))->analyze('PARTITION BY KEY () PARTITIONS 2') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: A partitioning clause is not a statement a client can send.Properties§
public PartitionClause $partitioningMethods§
public function __construct(public PartitionClause $partitioning)Parameters
$partitioning | PartitionClause | The partitioning clause |
public function deriveStatement(Derivation $derivation): voidReports the refusal and derives the clause without a table.
Parameters
$derivation | Derivation |
Calls 4
- method-call Derivation::report() line 45
- new PartitionEntryRefused line 45
- method-call PartitionClause::derivePartitioning() line 46
- method-call Derivation::environment() line 46
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
PartitionEntryTestcalls