[MDEV-32840] Drop PK issues FK error (poorly), but is still is doing an alter table Created: 2023-11-19 Updated: 2023-12-01 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Affects Version/s: | 11.1.2 |
| Fix Version/s: | 10.4, 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Nikita Malyavin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 10 22H2 using MariaDB v. 11.1.2 with docker compose Image information (uname -a): |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Hi everyone, I am encountering the following problem:
This works just fine. As a user can also subscribe to the same abonnement multiple times (after the first subscription has ended), I want to add "validFrom" to the primary key such that the columns userID, abonnementID, and validFrom are considered as the primary key. However, when trying to drop the current primary key (userID, abonnementID) of the table, the MariaDB-Server crashes (see docker.log) while executing the following query:
I think the server should return an error, stating that the primary key not be dropped because it is used for foreign keys instead of letting the server crash. |
| Comments |
| Comment by Daniel Black [ 2023-11-19 ] | |||||||
|
nikitamalyavin fyi keeping this cloned task as the ALTER TABLE problem and using the original reporters one to extract what is wrong under WSL to generate assertion. On the alter removing the PK.
|