Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-1217

LP #1306378: [Feature Request] Skip some columns when copying rows to new table.

    XMLWordPrintable

    Details

      Description

      **Reported in Launchpad by Matt last update 26-08-2014 08:08:49

      Hi.
      Thanks for your useful tools, especially pt-online-schema-change.
      I have a small feature request which really useful when not to copy some columns to new table.

      Let's say we have below table and some rows.

      CREATE TABLE test (id int primary key, fd1 char(1) not null default 'Y');
      ==> and this table's most of row have 'Y' value on fd1 column.

      On this table, If I want to change "DEFAULT 'N'" on fd1 column and want to set 'N' to fd1 column of all rows.
      This is possible when I use ALTER TABLE command like this.
      ==> ALTER TABLE test DROP fd1, ADD fd1 CHAR(1) NOT NULL DEFAULT 'N';

      But, with pt-online-schema-change, this is not possible.

      So, pt-online-schema-change tool skip some columns when copy rows or create trigger, then this request could be accomplished,
      If pt-online-schema-change tool support option lIke below example. ^^

      shell> pt-online-schema-change --skip-copy-columns="fd1" ...

      I believe you can easily implement it. And some people really want to this feature.
      Thanks again.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Smart Checklist