pt-table-sync does not work with generated columns

Description

Attempting to use pt-table-sync on a table with a GENERATED AS column fails because you cannot REPLACE/INSERT values into a GENERATED column.

--ignore-columns docs specifically says that if a REPLACE/INSERT is needed, all columns will be used.

pt-table-sync should either A) auto-detect GENERATED columns from tables and not add them to the REPLACE, or B) fix --ignore-columns so that even on REPLACE/INSERT the columns are ignored.

Environment

None

Activity

Show:

Aaditya Dubey August 28, 2024 at 5:25 PM

Hi

Thank you for the report.
It is verified as described.

Set up PS-8.0.36 replication using the below command:

Connect to the master/source node and create a sample table with the generated column:

Now, delete a row from one of the slave/replica nodes to make the slave/replica inconsistent.

Now, run pt-table-checksumon master/source node:

Now, run pt-table-syncon

Done

Details

Assignee

Reporter

Priority

Components

Affects versions

Fix versions

Needs QA

Yes

Smart Checklist

Created August 26, 2024 at 6:42 PM
Updated March 18, 2025 at 2:05 PM
Resolved January 14, 2025 at 3:27 PM