Pt-online-schema-change not supporting multiple alter sql statement

pt-online-schema-change D=subscription,t=transaction_log,h=db.us-east-1.rds.amazonaws.com,u=root --execute --alter " DROP PRIMARY KEY, MODIFY created datetime NOT NULL DEFAULT 0, ADD PRIMARY KEY(id,created) PARTITION BY RANGE(YEAR(created))(PARTITION p2014 VALUES LESS THAN (2015) ,PARTITION p2015 VALUES LESS THAN (2016) , PARTITION p2016 VALUES LESS THAN (2017) ,PARTITION p2017 VALUES LESS THAN (2018) ,PARTITION p2018 VALUES LESS THAN (2019) , PARTITION p2019 VALUES LESS THAN (2020) ,PARTITION p2020 VALUES LESS THAN (2021) ,PARTITION p2021 VALUES LESS THAN (2022) ,PARTITION p2022 VALUES LESS THAN (2023) ,PARTITION pMAXVALUE VALUES LESS THAN (MAXVALUE) ); " --no-check-unique-key-change --no-check-alter --ask-pass
Execution Result

2022-01-03T17:06:31 Dropping triggers…

2022-01-03T17:06:31 Dropped triggers OK.

2022-01-03T17:06:31 Dropping new table…

2022-01-03T17:06:33 Dropped new table OK.

subscription.transaction_log was not altered.

    (in cleanup) 2022-01-03T17:06:31 Error copying rows from `subscription`.`transaction_log` to `subscription`.`_transaction_log_new`: 2022-01-03T17:06:31 Copying rows caused a MySQL error 1048: 

Level: Warning 

 Code: 1048 

Message: Column ‘created’ cannot be null

Query: INSERT LOW_PRIORITY IGNORE INTO `subscription`.`_transaction_log_new` (`id`, `subscription_id`, `site_id`, `user_id`, `session_id`, `session_ip`, `session_trans_id`, `type`, `action`, `paypal_token`, `query_str`, `request`, `response`, `external_calls`, `error_code`, `error_message`, `status`, `api_key`, `execution_time`, `created`, `updated`) SELECT `id`, `subscription_id`, `site_id`, `user_id`, `session_id`, `session_ip`, `session_trans_id`, `type`, `action`, `paypal_token`, `query_str`, `request`, `response`, `external_calls`, `error_code`, `error_message`, `status`, `api_key`, `execution_time`, `created`, `updated` FROM `subscription`.`transaction_log` FORCE INDEX(`PRIMARY`) WHERE ((`id` >= ?)) AND ((`id` <= ?)) LOCK IN SHARE MODE /*pt-online-schema-change 68184 copy nibble*/ 

2022-01-03T17:06:31 Error copying rows from subscription.transaction_log to subscription._transaction_log_new: 2022-01-03T17:06:31 Copying rows caused a MySQL error 1048:

Level: Warning 

 Code: 1048 

Message: Column ‘created’ cannot be null

Query: INSERT LOW_PRIORITY IGNORE INTO `subscription`.`_transaction_log_new` (`id`, `subscription_id`, `site_id`, `user_id`, `session_id`, `session_ip`, `session_trans_id`, `type`, `action`, `paypal_token`, `query_str`, `request`, `response`, `external_calls`, `error_code`, `error_message`, `status`, `api_key`, `execution_time`, `created`, `updated`) SELECT `id`, `subscription_id`, `site_id`, `user_id`, `session_id`, `session_ip`, `session_trans_id`, `type`, `action`, `paypal_token`, `query_str`, `request`, `response`, `external_calls`, `error_code`, `error_message`, `status`, `api_key`, `execution_time`, `created`, `updated` FROM `subscription`.`transaction_log` FORCE INDEX(`PRIMARY`) WHERE ((`id` >= ?)) AND ((`id` <= ?)) LOCK IN SHARE MODE /*pt-online-schema-change 68184 copy nibble*/
1 Like