Details
-
Bug
-
Status: Done
-
High
-
Resolution: Fixed
-
None
-
None
-
None
Description
Launchpad: https://bugs.launchpad.net/percona-toolkit/+bug/1705998
Test schema:
CREATE TABLE `mydb`.`t1` ( `c1` int(10) unsigned NOT NULL, `c2` varchar(255) NOT NULL, `Last_referenced` datetime NOT NULL, `c3` int(10) unsigned NOT NULL, `c4` int(10) unsigned NOT NULL DEFAULT '0', `c5` varchar(255) NOT NULL DEFAULT '', `c6` varchar(255) NOT NULL DEFAULT '', `c7` varchar(255) NOT NULL DEFAULT '', `c8` varchar(255) DEFAULT '', `c9` varchar(255) DEFAULT '', `c10` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`c1`,`c2`), KEY `Last_Referenced_c6_Index` (`Last_referenced`,`c6`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
Test command:
pt-online-schema-change --alter 'CHANGE COLUMN `Last_referenced` `c11` datetime NOT NULL' --ask-pass --noswap-tables --nodrop-triggers --chunk-time 0.1 --nodrop-new-table --no-check-alter --execute D=mydb,t=t1,h=mydbhost,P=3306
As the result, the column Last_referenced is lost.