From 1bec1fdde8254a5295ec6f1390d0164f34cb02b1 Mon Sep 17 00:00:00 2001 From: Sveta Smirnova Date: Tue, 31 Dec 2024 20:14:16 +0300 Subject: [PATCH] Remove unused variable force_concat_enums - Removed variable - Adjusted utils/update-modules, so it does not process symlinks --- bin/pt-online-schema-change | 2 -- bin/pt-table-checksum | 2 -- lib/NibbleIterator.pm | 4 ---- util/update-modules | 4 ++++ 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index e107983d9..f219d36a2 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -5862,8 +5862,6 @@ sub _nibble_params { ); PTDEBUG && _d('Ascend params:', Dumper($asc)); - my $force_concat_enums; - my $from = "$tbl->{name} FORCE INDEX(`$index`)"; my $order_by = join(', ', map {$q->quote($_)} @{$index_cols}); diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index f77689f42..364d85e99 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -6683,8 +6683,6 @@ sub _nibble_params { ); PTDEBUG && _d('Ascend params:', Dumper($asc)); - my $force_concat_enums; - my $from = "$tbl->{name} FORCE INDEX(`$index`)"; my $order_by = join(', ', map {$q->quote($_)} @{$index_cols}); diff --git a/lib/NibbleIterator.pm b/lib/NibbleIterator.pm index 50b66da28..6ba90983c 100644 --- a/lib/NibbleIterator.pm +++ b/lib/NibbleIterator.pm @@ -208,10 +208,6 @@ sub _nibble_params { ); PTDEBUG && _d('Ascend params:', Dumper($asc)); - # Check if enum fields items are sorted or not. - # If they are sorted we can skip adding CONCAT to improve the queries eficiency. - my $force_concat_enums; - # Make SQL statements, prepared on first call to next(). FROM and # ORDER BY are the same for all statements. FORCE IDNEX and ORDER BY # are needed to ensure deterministic nibbling. diff --git a/util/update-modules b/util/update-modules index bbba29580..54956e915 100755 --- a/util/update-modules +++ b/util/update-modules @@ -137,6 +137,10 @@ if [ ! -f $tool_file ]; then die "$tool_file does not exist" fi +if [ -h $tool_file ]; then + die "$tool_file is a symbolic link" +fi + if [ -n "$(head -n 1 $tool_file | grep perl)" ]; then tool_lang="perl" else