From aae5281714cfa870f26df4d1a06f611b943987e5 Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Wed, 30 Jun 2021 18:47:51 +0300 Subject: [PATCH] TT#108653 Add tables/mysql/global_priv/create_options exception Since Debian/bullseye there is diff: =================================== 17:11:02 not ok 1 Schema mysql, tables elements: global_priv.CREATE_OPTIONS are not equal: 17:11:02 --- 17:11:02 Schema1: transactional=1 17:11:02 Schema2: page_checksum=1 transactional=1 =================================== It's a harmless diff. It seems mysqldump adds page_checksum for each non innodb tables by default. So add tables/mysql/global_priv/create_options exception. Reformat output so it has the same format as exception so it's easier to add the future exceptions. Change-Id: I707b62b67016e2d67169de1c16e9e85e4f67671d (cherry picked from commit 5169b10f2c4a7137c5bb35048667ea00775cd319) --- helper/compare_dbs.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/helper/compare_dbs.pl b/helper/compare_dbs.pl index ad0b95f..882f996 100755 --- a/helper/compare_dbs.pl +++ b/helper/compare_dbs.pl @@ -20,6 +20,7 @@ use Carp; # columns/billing/table1_column1/is_nullable my @diff_exceptions = qw( views/ldap/ldap_entries/view_definition + tables/mysql/global_priv/create_options ); my @missing_sp1_exceptions = qw(); my @missing_sp2_exceptions = qw(); @@ -259,13 +260,13 @@ sub print_diff { foreach my $key ( sort( keys( %{$obj1} ) ) ) { unless ( exists($obj2->{$key}) ) { next if ( is_exception(\@missing_sp2_exceptions, $object_name, $schema, $key) ); - push( @{$result}, "Schema $schema, $object_name element: $key is missing in Schema2" ); + push( @{$result}, "Element: " . lc("$object_name/$schema/$key") . " is missing in Schema2" ); next; } foreach my $c_name ( sort( keys( %{ $obj1->{$key} } ) ) ) { unless ( exists($obj2->{$key}->{$c_name}) ) { next if ( is_exception(\@missing_sp2_exceptions, $object_name, $schema, $key, $c_name) ); - push( @{$result}, "Schema $schema, $object_name element: $key.$c_name is missing in Schema2" ); + push( @{$result}, "Element: " . lc("$object_name/$schema/$key/$c_name") . " is missing in Schema2" ); next; } @@ -277,7 +278,7 @@ sub print_diff { if ( $obj1->{$key}->{$c_name} ne $obj2->{$key}->{$c_name} ) { next if ( is_exception(\@diff_exceptions, $object_name, $schema, $key, $c_name) ); - push( @{$result}, "Schema $schema, $object_name elements: $key.$c_name are not equal:\n ---\n" + push( @{$result}, "Element: " . lc("$object_name/$schema/$key/$c_name") . " are not equal:\n ---\n" . " Schema1: $obj1->{$key}->{$c_name}\n" . " Schema2: $obj2->{$key}->{$c_name}" ); } @@ -287,13 +288,13 @@ sub print_diff { foreach my $key ( sort( keys( %{$obj2} ) ) ) { unless ( exists($obj1->{$key}) ) { next if ( is_exception(\@missing_sp1_exceptions, $object_name, $schema, $key) ); - push( @{$result}, "Schema $schema, $object_name element: $key is missing in Schema1" ); + push( @{$result}, "Element: " . lc("$object_name/$schema/$key") . " is missing in Schema1" ); next; } foreach my $c_name ( sort( keys( %{ $obj2->{$key} } ) ) ) { unless ( exists($obj1->{$key}->{$c_name}) ) { next if ( is_exception(\@missing_sp1_exceptions, $object_name, $schema, $key, $c_name) ); - push( @{$result}, "Schema $schema, $object_name element: $key.$c_name is missing in Schema1" ); + push( @{$result}, "Element: ". lc("$object_name/$schema/$key/$c_name") ." is missing in Schema1" ); next; } }