# Script pt-online-schema-change set new\_table\_name for all records in history table

**URL:** <https://forums.percona.com/t/script-pt-online-schema-change-set-new-table-name-for-all-records-in-history-table/39481>\
**Category:** Percona Toolkit\
**Created:** [October 1, 2025, 8:13am UTC](https://forums.percona.com/t/script-pt-online-schema-change-set-new-table-name-for-all-records-in-history-table/39481 "2025-10-01T08:13:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![infis](https://avatars.discourse-cdn.com/v4/letter/i/ecccb3/32.png) [@infis](https://forums.percona.com/u/infis)\
**Post date:** [October 1, 2025, 8:13am UTC](https://forums.percona.com/t/script-pt-online-schema-change-set-new-table-name-for-all-records-in-history-table/39481/1 "2025-10-01T08:13:08Z")

</div>

I execute multiple jobs and found in history table `pt_osc_history` all records with one value in `new_table_name` field.

In script I see:

```auto
$ tail -n +9797 pt-online-schema-change | head -n 6
   if ( $o->get('history') ) {
      my $sth = $cxn->dbh()->prepare(
         "UPDATE ${hist_table} SET new_table_name = ?"
      );
      $sth->execute($new_tbl->{tbl});
   }

```

Update operation set one value for all recors. This is not corrected. Or corrected?
