Fix script crashing with precedence error

On Perl v5.42.0 the process exits with status 255 and error: Possible precedence problem between ! and string eq at pt-online-schema-change line 10633.
This commit is contained in:
Viktoras Agejevas
2025-08-06 16:40:33 +03:00
parent 0b91854014
commit 58cebefdcc

View File

@@ -10630,7 +10630,7 @@ sub main {
$plugin->after_copy_rows();
}
if ( $o->get('preserve-triggers') ) {
if ( !$o->get('swap-tables') && $o->get('drop-new-table') && !$o->get('alter-foreign-keys-method') eq "drop-swap" ) {
if ( !$o->get('swap-tables') && $o->get('drop-new-table') && $o->get('alter-foreign-keys-method') ne "drop-swap" ) {
print ts("Skipping triggers creation since --no-swap-tables was specified along with --drop-new-table\n");
} else {
print ts("Adding original triggers to new table.\n");