pt-online-schema-change segfault with syntax error on alter

Bug #1589972 reported by Kenny Gryp
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Expired
Undecided
Unassigned

Bug Description

If I make a syntax error with this alter table, then pt-osc segfaults::

pt-online-schema-change --alter "ADD INDEX idx_profile_id_id (profile_id, id), DROP INDEX (idx_profile_id)" D=prod,t=table --user management --ask-pass --dry-run

Enter MySQL password:
Enter MySQL password:
Operation, tries, wait:
  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. `prod`.`table` will not be altered. Specify --execute instead of --dry-run to alter the table.
Creating new table...
Created new table prod._table_new OK.
Altering new table...
2016-06-07T14:49:57 Dropping new table...
2016-06-07T14:49:57 Dropped new table OK.
Dry run complete. `prod`.`table` was not altered.
Segmentation fault (core dumped)

If I do it correctly, it works:

pt-online-schema-change --alter "ADD INDEX idx_profile_id_id (profile_id, id), DROP INDEX idx_profile_id" D=prod,t=table --user management --ask-pass --dry-run
Enter MySQL password:
Enter MySQL password:
Operation, tries, wait:
  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. `prod`.`table` will not be altered. Specify --execute instead of --dry-run to alter the table.
Creating new table...
Created new table prod._table_new OK.
Altering new table...
Altered `prod`.`_table_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.
2016-06-07T14:50:31 Dropping new table...
2016-06-07T14:50:31 Dropped new table OK.
Dry run complete. `prod`.`table` was not altered.

Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Thank you for the report.

I cannot repeat described behavior with version 2.2.16 and up. Please specify which version of pt-table-checksum and Percona Server you use.

tags: added: pt-online-schema-change
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

s/pt-table-checksum/pt-online-schema-change/

Changed in percona-toolkit:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona Toolkit because there has been no activity for 60 days.]

Changed in percona-toolkit:
status: Incomplete → Expired
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1353

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.