pt-online-schema-change --history updates new_table_name for all rows in the history table, not just the current one

Description

In line 9691 of pt-online-schema-change v3.6.0 there's an update statement that will change the new_table_name value for every row in the table. It should be filtering by job_id.

{{if ( $o->get('history') ) {
my $sth = $cxn->dbh()->prepare(
"UPDATE ${hist_table} SET new_table_name = ?"
);
$sth->execute($new_tbl->{tbl});
}}}

Environment

Activity

Show:

Aaditya Dubey February 3, 2025 at 12:25 PM

Hi

This issue is duplicated by and it should be fixed in the upcoming PT release.

Aaditya Dubey December 25, 2024 at 12:53 PM

Hi

Thank you for the report and feedback.

Duplicate

Details

Assignee

Reporter

Priority

Labels

Needs QA

Yes

Smart Checklist

Created November 25, 2024 at 7:15 PM
Updated February 3, 2025 at 12:25 PM
Resolved February 3, 2025 at 12:25 PM