|
--source include/have_innodb.inc
|
CREATE TABLE t1 (t TEXT, PRIMARY KEY (t(1))) ENGINE=InnoDB;
|
INSERT INTO t1 SET t='aa';
|
ALTER TABLE t1 ADD COLUMN b INT;
|
UPDATE t1 SET b = 1;
|
INSERT INTO t1 SET t='ab';
|
SELECT * FROM t1;
|
DROP TABLE t1;
|
The second INSERT should fail due to the duplicate column prefix key 'a', but instead the record will be inserted. With ROW_FORMAT=REDUNDANT the operation will fail as expected:
mysqltest: At line 6: query 'INSERT INTO t1 SET t='ab'' failed: 1062: Duplicate entry 'a' for key 'PRIMARY'
|
|