pt-online-schema-change doesn't handle column renames
Bug #976109 reported by
Baron Schwartz
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
lp:~percona-toolkit-dev/percona-toolkit/doc-osc-limitation-bug-976109
- Daniel Nichter: Approve
-
Diff: 25 lines (+15/-1)1 file modifiedbin/pt-online-schema-change (+15/-1)
tags: | added: docs pt-online-schema-change |
Changed in percona-toolkit: | |
status: | New → Confirmed |
To post a comment you must log in.
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.