Confirming this patch helps with this. Thanks Frank!
agustin.gallego@bm-support01:~/tmp$ ./pt-online-schema-change --execute --alter "ADD COLUMN created_at non_existent_datatype" S=/tmp/mysql_sandbox5542.sock,u=msandbox,p=msandbox,D=test,t=t2
[...]
2015-04-23T18:43:41 Dropping new table...
2015-04-23T18:43:41 Dropped new table OK.
`test`.`t2` was not altered.
Error altering new table `test`.`_t2_new`: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'non_existent_datatype' at line 1 [for Statement "ALTER TABLE `test`.`_t2_new` ADD COLUMN created_at non_existent_datatype"] at ./pt-online-schema-change line 8821.
agustin.gallego@bm-support01:~/tmp$ ./pt-online-schema-change --execute --alter "ADD COLUMN created_at DATETIME DEFAULT now()" S=/tmp/mysql_sandbox5542.sock,u=msandbox,p=msandbox,D=test,t=t2
[...]
2015-04-23T18:46:31 Dropping new table...
2015-04-23T18:46:31 Dropped new table OK.
`test`.`t2` was not altered.
Error altering new table `test`.`_t2_new`: DBD::mysql::db do failed: Invalid default value for 'created_at' [for Statement "ALTER TABLE `test`.`_t2_new` ADD COLUMN created_at DATETIME DEFAULT now()"] at ./pt-online-schema-change line 8821.
Confirming this patch helps with this. Thanks Frank!
agustin. gallego@ bm-support01: ~/tmp$ ./pt-online- schema- change --execute --alter "ADD COLUMN created_at non_existent_ datatype" S=/tmp/ mysql_sandbox55 42.sock, u=msandbox, p=msandbox, D=test, t=t2 datatype' at line 1 [for Statement "ALTER TABLE `test`.`_t2_new` ADD COLUMN created_at non_existent_ datatype" ] at ./pt-online- schema- change line 8821.
[...]
2015-04-23T18:43:41 Dropping new table...
2015-04-23T18:43:41 Dropped new table OK.
`test`.`t2` was not altered.
Error altering new table `test`.`_t2_new`: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'non_existent_
agustin. gallego@ bm-support01: ~/tmp$ ./pt-online- schema- change --execute --alter "ADD COLUMN created_at DATETIME DEFAULT now()" S=/tmp/ mysql_sandbox55 42.sock, u=msandbox, p=msandbox, D=test, t=t2 schema- change line 8821.
[...]
2015-04-23T18:46:31 Dropping new table...
2015-04-23T18:46:31 Dropped new table OK.
`test`.`t2` was not altered.
Error altering new table `test`.`_t2_new`: DBD::mysql::db do failed: Invalid default value for 'created_at' [for Statement "ALTER TABLE `test`.`_t2_new` ADD COLUMN created_at DATETIME DEFAULT now()"] at ./pt-online-