mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-17376 Server fails to set ADD_PK_INDEX, DROP_PK_INDEX if unique index nominated as PK
Problem: ======== Server fails to notify the engine by not setting the ADD_PK_INDEX and DROP_PK_INDEX When there is a i) Change in candidate for primary key. ii) New candidate for primary key. Fix: ==== Server sets the ADD_PK_INDEX and DROP_PK_INDEX while doing alter for the above problematic case.
This commit is contained in:
@ -100,10 +100,6 @@ LOCK = SHARED, ALGORITHM = INPLACE;
|
||||
ALTER TABLE t1 ADD UNIQUE INDEX(c2),
|
||||
LOCK = EXCLUSIVE, ALGORITHM = INPLACE;
|
||||
|
||||
SHOW CREATE TABLE t1;
|
||||
# We do not support plain DROP_PK_INDEX without ADD_PK_INDEX.
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||
ALTER TABLE t1 DROP INDEX c2, ALGORITHM = INPLACE;
|
||||
SHOW CREATE TABLE t1;
|
||||
# Now the previous DEBUG_SYNC should kick in.
|
||||
--send
|
||||
|
Reference in New Issue
Block a user