[MDEV-22184] UNIQUE key with USING HASH clause changes logic for partitioned tables Created: 2020-04-07 Updated: 2020-09-10 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Create Table, Partitioning |
| Affects Version/s: | 10.4, 10.5 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Starting from 10.4, the following CREATE statement works:
Without USING HASH it fails as it probably should:
It also fails with and without USING HASH in earlier versions. If it's something that was implemented intentionally in 10.4, it needs to be documented. Reproducible with at least InnoDB, MyISAM. |
| Comments |
| Comment by Sergei Golubchik [ 2020-09-10 ] |
|
I think it not only needs to be documented, I'd even say that USING HASH should be automatically applied to any UNIQUE constraint in a partitioned table (unless there's explicit USING BTREE). Not having unique constraints in a partitioned table was a long-time limitation, and it's good that it's lifted now. |