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

LP #1428812: pt-online-schema-change foreign key

    XMLWordPrintable

    Details

      Description

      **Reported in Launchpad by Kenny Gryp last update 31-05-2017 14:27:27

      When you run pt-osc and it fails, in some cases the _new_table file will still exist (mind the underscore file).
      The pt-osc knows that and actually creates __new_table the next run. (That's why we love percona toolkit!)

      A similar mechanism happens when you have foreign keys, as they are unique in name as well.
      An underscore is added to the foreign key name when you create such table.

      HOWEVER, when that _new_table is still there, the foreign key name with the underscore still exists. pt-osc does not try to find a unique foreign key name by adding for example another underscore.

      In the end you get a very weird error 121 which actually means that there's a duplicate FK name.

      Please talk to me if you need a test. As it's quite late, I have no energy left to perform tests, apologies!

        Attachments

          Issue Links

            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