[MDEV-30034] UNIQUE USING HASH accepts duplicate entries for tricky collations Created: 2022-11-18 Updated: 2023-04-24 Resolved: 2023-04-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.4 |
| Fix Version/s: | 10.11.3, 10.4.29, 10.5.20, 10.6.13, 10.8.8, 10.9.6, 10.10.4 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Description |
|
If I use a traditional unique constraint, the table correctly rejects the second record:
Now if I do the same thing with UNIQUE USING HASH, it accepts the duplicate record:
This is wrong. The second record should be rejected. |
| Comments |
| Comment by Alexander Barkov [ 2023-01-24 ] |
|
It seems the problem is related to broken Field_varstring::cmp_prefix(). See a similar bug: Was likely caused by: |