mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 02:34:19 +00:00
PT-2422 Fix unconstrained UPDATE to pt_osc_history table
Ensure that entries in the history table are updated by job_id instead of updating ALL instances of jobs in the history table.
This commit is contained in:
@@ -9797,9 +9797,9 @@ sub main {
|
|||||||
|
|
||||||
if ( $o->get('history') ) {
|
if ( $o->get('history') ) {
|
||||||
my $sth = $cxn->dbh()->prepare(
|
my $sth = $cxn->dbh()->prepare(
|
||||||
"UPDATE ${hist_table} SET new_table_name = ?"
|
"UPDATE ${hist_table} SET new_table_name = ? WHERE job_id = ?"
|
||||||
);
|
);
|
||||||
$sth->execute($new_tbl->{tbl});
|
$sth->execute($new_tbl->{tbl}, $job_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
# If the new table still exists, drop it unless the tool was interrupted.
|
# If the new table still exists, drop it unless the tool was interrupted.
|
||||||
|
Reference in New Issue
Block a user