Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3.6
-
None
Description
Dropping primary key in some cases fails because of foreign constraints on the table of the primary key, which makes no sense.
Test case:
create table test_a (id int primary key); |
create table test_b (id int primary key); |
create table test_a_b (a int not null, |
b int not null, |
constraint ref_a foreign key (a) references test_a (id), |
constraint ref_b foreign key (b) references test_b (id)); |
alter table test_a_b add constraint a_b_pk primary key (a, b); |
alter table test_a_b drop primary key; |
Note that the first four statements succeed, which means that both states without and with primary key on `test_a_b` are consistent. However, the last statement fails. In other words, the database doesn't let me to go from one consistent state to another.
Attachments
Issue Links
- relates to
-
MDEV-16417 Store Foreign Key metadata outside of InnoDB
-
- In Review
-
-
MDEV-17187 table doesn't exist in engine after ALTER other tables with CONSTRAINTs
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | Storage Engine - InnoDB [ 10129 ] | |
Fix Version/s | N/A [ 14700 ] | |
Assignee | Marko Mäkelä [ marko ] |
Link | This issue relates to MDEV-16417 [ MDEV-16417 ] |
Link |
This issue relates to |
Fix Version/s | N/A [ 14700 ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] |
Assignee | Marko Mäkelä [ marko ] | Oleksandr Byelkin [ sanja ] |
Workflow | MariaDB v3 [ 89200 ] | MariaDB v4 [ 140909 ] |
Fix Version/s | 10.3 [ 22126 ] |
Fix Version/s | 10.4 [ 22408 ] |