Commit Graph

3 Commits

Author SHA1 Message Date
Sveta Smirnova
1d0487cf2f PT-2418 - pt-online-schema-change 3.7.0 lost data when exe alter xxx rename column xxx
- Added instructions to skip the test if server version is less than 8.0
2025-07-21 18:25:30 +03:00
Sveta Smirnova
8f068a9d59 PT-2418 - pt-online-schema-change 3.7.0 lost data when exe alter xxx rename column xxx
- Added clean up to the test
- Added test for enabled option --check-alter
- Removed extra spaces
2025-07-21 16:45:10 +03:00
Marek Knappe
4a9a4bb903 PT-2418: Fix column data loss during RENAME COLUMN operations
The pt-online-schema-change tool was not properly handling RENAME COLUMN
syntax (MySQL 8.0+), causing renamed columns to be excluded from the
data copy operation. This resulted in NULL values for renamed columns
after the schema change.

The issue was in the find_renamed_cols() function which only supported
CHANGE COLUMN syntax but not RENAME COLUMN syntax. Added support for
RENAME COLUMN parsing to properly detect column renames and include
them in the common_cols list for data copying.

Fixes: PT-2418
2025-07-02 12:45:00 +10:00