From 82a2ac7a40ddbadeb97fc0e1d3eb2036adbe8f77 Mon Sep 17 00:00:00 2001 From: Sveta Smirnova Date: Wed, 13 Aug 2025 17:03:29 +0300 Subject: [PATCH] PR-989 - Fix script crashing with precedence error - Fixed typo in the tool code - Added more diagnostic information into test for pt-1919 --- bin/pt-online-schema-change | 2 +- t/pt-online-schema-change/pt-1919.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index 5e1fca5e..c56bb829 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -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') ne "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"); diff --git a/t/pt-online-schema-change/pt-1919.t b/t/pt-online-schema-change/pt-1919.t index 97e353a7..bec1fb37 100644 --- a/t/pt-online-schema-change/pt-1919.t +++ b/t/pt-online-schema-change/pt-1919.t @@ -312,7 +312,7 @@ sub test_alter_table { $orig_triggers, $new_triggers, 'Triggers should remain in place', - ); + ) or diag($output); return; }