pt-online-schema-change doesn't handle column renames

Bug #976109 reported by Baron Schwartz
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Daniel Nichter
2.1
Fix Released
Medium
Daniel Nichter

Bug Description

If we rename a column, it will be equivalent to dropping the old column and adding a new one. The data from the old column won't be copied to the new one.

We should document this limitation, at a minimum. And I propose that we may parse the ALTER statement in the future and recognize what has changed, and set up the triggers and INSERT/SELECT statement accordingly to copy the column into its renamed column.

Related branches

tags: added: docs pt-online-schema-change
Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Swany (greenlion) wrote :

I think that at least a simple regex over the expression should be run to detect RENAME and abort the tool to avoid accidental data loss.

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-512

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.