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

pt-online-schema-change aborts on --execute while --dry-run succeeds

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.0.3
    • Fix Version/s: 3.0.4
    • Component/s: None

      Description

      Launchpad: https://bugs.launchpad.net/percona-toolkit/+bug/1693614

      percona-toolkit 3.0.3-1.wheezy

      MariaDB 5.5.56 on this machine, one slave is also MariaDB 5.5.56 (in a master-master), the other is MariaDB 10.1.23. I've also tried this from the other master, where both slaves are MariaDB 5.5.56.

      Running pt-online-schema-change like so:
      -------------------
      pt-online-schema-change --recursion-method dsn="D=percona,t=dsns_master" --execute --alter "ADD COLUMN blocked_from_crawl BOOL DEFAULT FALSE" D=atoz,t=c_bibliographies
      -------------------

      Results in:
      -------------------
      Found 2 slaves:
      soft7 -> other-master:3307
      Use of uninitialized value in printf at /usr/bin/pt-online-schema-change line 8489.
      -------------------
      and exit code 255.

      Running the same thing (which has worked many many times in the past, by the way) with dry-run works just fine.

      -------------------
      pt-online-schema-change --recursion-method dsn="D=percona,t=dsns_master" --dry-run --alter "ADD COLUMN blocked_from_crawl BOOL DEFAULT FALSE" D=atoz,t=c_bibliographies
      Operation, tries, wait:
        analyze_table, 10, 1
        copy_rows, 10, 0.25
        create_triggers, 10, 1
        drop_triggers, 10, 1
        swap_tables, 10, 1
        update_foreign_keys, 10, 1
      Starting a dry run. `atoz`.`c_bibliographies` will not be altered. Specify --execute instead of --dry-run to alter the table.
      Creating new table...
      Created new table atoz._c_bibliographies_new OK.
      Altering new table...
      Altered `atoz`.`_c_bibliographies_new` OK.
      Not creating triggers because this is a dry run.
      Not copying rows because this is a dry run.
      Not swapping tables because this is a dry run.
      Not dropping old table because this is a dry run.
      Not dropping triggers because this is a dry run.
      2017-05-25T15:41:00 Dropping new table...
      2017-05-25T15:41:00 Dropped new table OK.
      Dry run complete. `atoz`.`c_bibliographies` was not altered.
      -------------------

      I'd like to try version 3.0.2, because I suspect this broke in the recent update, but it seems that the repository only has the latest version of the 3.x branch.
       
       

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                carlos.salguero Carlos Salguero
                Reporter:
                carlos.salguero Carlos Salguero
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: