Merge pull request #1002 from Shopify/PT-2015_fix_comparing_unsorted_flags

PT-2015 Fix pt-config-diff not sorting flags
This commit is contained in:
Sveta Smirnova
2025-09-02 14:56:24 +03:00
committed by GitHub
3 changed files with 32 additions and 0 deletions

View File

@@ -369,6 +369,30 @@ $c2 = new MySQLConfig(
) or print Dumper($diff);
}
# ############################################################################
# PS-2015 pt-config-diff doesn't diff ordered flags
# ############################################################################
$c1 = new MySQLConfig(
result_set => [['log_slow_verbosity', 'innodb,microtime']],
format => 'show_variables',
);
$c2 = new MySQLConfig(
result_set => [['log_slow_verbosity', 'microtime,innodb']],
format => 'show_variables',
);
{
$diff = $cc->diff(
configs => [$c1, $c2],
);
is_deeply(
$diff,
undef,
"Values are same regardless of order"
) or diag(Dumper($diff));
}
# ############################################################################
# https://bugs.launchpad.net/percona-toolkit/+bug/889739
# pt-config-diff doesn't diff quoted strings properly