1CREATE TABLE t1 (a INT, b VARCHAR(10)) ENGINE=InnoDB 2PARTITION BY RANGE(a) 3(PARTITION pa VALUES LESS THAN (3), 4PARTITION pb VALUES LESS THAN (5)); 5INSERT INTO t1 VALUES(2,'two'),(2,'two'),(4,'four'); 6connect ddl,localhost,root,,test; 7SET DEBUG_SYNC = 'inplace_after_index_build SIGNAL go WAIT_FOR done'; 8ALTER TABLE t1 ADD UNIQUE KEY (a,b(3)); 9connection default; 10SET DEBUG_SYNC = 'now WAIT_FOR go'; 11BEGIN; 12SELECT * FROM t1 FOR UPDATE; 13a b 142 two 152 two 164 four 17SET DEBUG_SYNC = 'now SIGNAL done'; 18connection ddl; 19ERROR 23000: Duplicate entry '2-two' for key 'a' 20connection default; 21DELETE FROM t1; 22disconnect ddl; 23SET DEBUG_SYNC = 'RESET'; 24CHECK TABLE t1; 25Table Op Msg_type Msg_text 26test.t1 check status OK 27DROP TABLE t1; 28