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

BEFORE triggers are dropped after pt-online-schema-change run

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Duplicate
    • None
    • 3.3.1
    • None

    Description

      Create a table with 4 triggers BEFORE and AFTER; INSERT and UPDATE.
      There is no FK.

      PXC 5.7.30
      pt-online-schema-change h=127.0.0.1,D=d,t=t --user=root --password=secret --preserve-triggers --alter "CHANGE COLUMN a a varchar(25) DEFAULT NULL" --alter-foreign-keys-method=auto --max-lag=10s --execute

      After pt-osc run just two triggers left (only AFTER).

      I can force pt-osc to keep all 4 triggers at:
      create_triggers:
      Comment out:
      . " AND ACTION_TIMING = ? "
      and $trigger_info->

      {time}

      ,

      For
      my $trigger_sql = "SELECT TRIGGER_SCHEMA, TRIGGER_NAME, DEFINER, ACTION_STATEMENT, SQL_MODE, "
      . " CHARACTER_SET_CLIENT, COLLATION_CONNECTION, EVENT_MANIPULATION, ACTION_TIMING "
      . " FROM INFORMATION_SCHEMA.TRIGGERS "
      . " WHERE EVENT_MANIPULATION = ? "
      . " AND ACTION_TIMING = ? "
      . " AND TRIGGER_SCHEMA = ? "
      . " AND EVENT_OBJECT_TABLE = ?";

      Attachments

        Issue Links

          Activity

            People

              carlos.salguero Carlos Salguero (Inactive)
              nickolay.ihalainen Nickolay Ihalainen
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist