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