Candidate rows are accepted or rejected by the same key rule.
highlighted = computed this step
Try insert candidates
A candidate row is checked against the existing UNIQUE keys.
candidate check
Accepted candidate
The first candidate is accepted because it does not collide with an existing key.
candidate accepted
UNIQUE constraint examples are tiny finite table checks; SQL dialect completeness, index implementation, locking, optimizer behavior, product behavior, and performance claims are out of scope.
Rejected candidate
The second candidate is rejected because its key collides.
candidate rejected
UNIQUE constraint examples are tiny finite table checks; SQL dialect completeness, index implementation, locking, optimizer behavior, product behavior, and performance claims are out of scope.
Summary
The candidate check uses the same recomputed key comparison.