MySQLConfigComparer

MySQLConfigComparer compares and diffs C<MySQLConfig> objects.

Summary
MySQLConfigComparerMySQLConfigComparer compares and diffs C<MySQLConfig> objects.
Variables
%alt_val_for
Functions
new
diffDiff the variable values of MySQLConfig objects.
missingReturn variables that aren’t in all the given MySQLConfig objects.
_normalize_value
_get_shared_vars
_d

Variables

%alt_val_for

my %alt_val_for

Functions

new

sub new

Parameters

%argsArguments

Optional Arguments

ignore_variablesArrayref of variables to ignore
numeric_variablesArrayref of variables to compare numerically
optional_value_variablesArrayref of vars whose val is optional
any_value_is_true_variablesArrayref of vars... see below
base_pathHashref of variable=>base_path

Returns

MySQLConfigComparer object

diff

sub diff

Diff the variable values of MySQLConfig objects.  Only the common set of variables (i.e. the vars that all configs have) are compared.

Parameters

%argsArguments

Required Arguments

configsArrayref of MySQLConfig objects

Returns

Hashref of variables that have different values, like

{
  max_connections => [ 100, 50 ]
}

The arrayref vals correspond to the C<MySQLConfig> objects, so $diff->{var}->[N] is $configs->[N]->value_of(var).

missing

sub missing

Return variables that aren’t in all the given MySQLConfig objects.

Parameters

%argsArguments

Required Arguments

configsArrayref of C<MySQLConfig> objects

Returns

Hashref of missing variables like,

{
  query_cache_size => [0, 1]
}

The arrayref vals correspond to the C<MySQLConfig> objects, so $missing->{var}->[N] is $configs->[N]; the values are boolean: 1 means the C<MySQLConfig> obj has the variable, 0 means it doesn’t.

_normalize_value

sub _normalize_value

_get_shared_vars

sub _get_shared_vars

_d

sub _d
my %alt_val_for
sub new
sub diff
Diff the variable values of MySQLConfig objects.
MySQLConfig parses and encapsulates system variables and values from SHOW VARIABLES, option files, mysqld --help --verbose or my_print_defaults.
sub missing
Return variables that aren’t in all the given MySQLConfig objects.
sub _normalize_value
sub _get_shared_vars
sub _d
Close