``pt-online-schema-change`` allowed the name of a constraint to exceed 64 characters when ``--alter-foreign-keys-method=rebuild_constraints`` was used.

Description

The maxium possible length of a constraint name is 64. When --alter-foreign-keys-method=rebuild_constraints used, pt-online-schema-change just adds `_`-character following the below logic:

if ($fk =~ /^__/) { ($new_fk = $fk) =~ s/^__//; } else { $new_fk = '_'.$fk; }

Environment

None

AFFECTED CS IDs

274782

Smart Checklist

Activity

Iwo Panowicz April 10, 2020 at 9:49 AM

Done

Details

Assignee

Reporter

Priority

Affects versions

Fix versions

Needs Review

Yes

Story Points

Sprint

Smart Checklist

Created April 10, 2020 at 9:45 AM
Updated February 29, 2024 at 9:00 PM
Resolved April 16, 2020 at 7:15 PM

Flag notifications