mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-18 08:24:06 +00:00
War on typos Act 1 (#655)
* Fix typos in lib/ directory * Update generated bin/ files * PR 655 - War on typos Act 1 #655 - Updated modules in tools that were not updated - Fixed tests to reflect proposed changes --------- Co-authored-by: Sveta Smirnova <sveta.smirnova@percona.com>
This commit is contained in:
@@ -342,7 +342,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -532,7 +532,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -5209,7 +5209,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -5775,7 +5775,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -5843,7 +5843,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -5869,7 +5869,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -5912,7 +5912,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -340,7 +340,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -530,7 +530,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -3086,7 +3086,7 @@ sub _parse_config_output {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output TextResultSetParser);
|
my @required_args = qw(output TextResultSetParser);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
PTDEBUG && _d("Parsing config output");
|
PTDEBUG && _d("Parsing config output");
|
||||||
@@ -3137,7 +3137,7 @@ sub detect_config_output_format {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3173,7 +3173,7 @@ sub parse_show_variables {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output TextResultSetParser);
|
my @required_args = qw(output TextResultSetParser);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output, $trp) = @args{@required_args};
|
my ($output, $trp) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3188,7 +3188,7 @@ sub parse_mysqld {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3222,7 +3222,7 @@ sub parse_my_print_defaults {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3238,7 +3238,7 @@ sub parse_option_file {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3349,7 +3349,7 @@ sub _mimic_show_variables {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(vars format);
|
my @required_args = qw(vars format);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($vars, $format) = @args{@required_args};
|
my ($vars, $format) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4525,7 +4525,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -5091,7 +5091,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -5159,7 +5159,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -5185,7 +5185,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -5228,7 +5228,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -1450,7 +1450,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -1640,7 +1640,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -3572,7 +3572,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -4138,7 +4138,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -4206,7 +4206,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4232,7 +4232,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4275,7 +4275,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -4039,7 +4039,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -4605,7 +4605,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -4673,7 +4673,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4699,7 +4699,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4742,7 +4742,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -4117,7 +4117,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -4683,7 +4683,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -4751,7 +4751,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4777,7 +4777,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4820,7 +4820,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
10
bin/pt-find
10
bin/pt-find
@@ -2882,7 +2882,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -3448,7 +3448,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -3516,7 +3516,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3542,7 +3542,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3585,7 +3585,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -1757,7 +1757,7 @@ sub distill_verbs {
|
|||||||
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
||||||
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
||||||
$obj = uc $obj if $obj;
|
$obj = uc $obj if $obj;
|
||||||
PTDEBUG && _d('Data def statment:', $dds, 'obj:', $obj);
|
PTDEBUG && _d('Data def statement:', $dds, 'obj:', $obj);
|
||||||
my ($db_or_tbl)
|
my ($db_or_tbl)
|
||||||
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
||||||
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
||||||
|
@@ -3079,7 +3079,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -3645,7 +3645,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -3713,7 +3713,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3739,7 +3739,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3782,7 +3782,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -2281,7 +2281,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -2471,7 +2471,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -4802,7 +4802,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -5368,7 +5368,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -5436,7 +5436,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -5462,7 +5462,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -5505,7 +5505,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -2626,7 +2626,7 @@ sub distill_verbs {
|
|||||||
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
||||||
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
||||||
$obj = uc $obj if $obj;
|
$obj = uc $obj if $obj;
|
||||||
PTDEBUG && _d('Data def statment:', $dds, 'obj:', $obj);
|
PTDEBUG && _d('Data def statement:', $dds, 'obj:', $obj);
|
||||||
my ($db_or_tbl)
|
my ($db_or_tbl)
|
||||||
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
||||||
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
||||||
@@ -5530,7 +5530,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -6096,7 +6096,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -6164,7 +6164,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -6190,7 +6190,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -6233,7 +6233,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
16
bin/pt-kill
16
bin/pt-kill
@@ -1455,7 +1455,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -1645,7 +1645,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -5075,7 +5075,7 @@ sub distill_verbs {
|
|||||||
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
||||||
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
||||||
$obj = uc $obj if $obj;
|
$obj = uc $obj if $obj;
|
||||||
PTDEBUG && _d('Data def statment:', $dds, 'obj:', $obj);
|
PTDEBUG && _d('Data def statement:', $dds, 'obj:', $obj);
|
||||||
my ($db_or_tbl)
|
my ($db_or_tbl)
|
||||||
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
||||||
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
||||||
@@ -6023,7 +6023,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -6589,7 +6589,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -6657,7 +6657,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -6683,7 +6683,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -6726,7 +6726,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -774,10 +774,10 @@ get_oom_of_pid () {
|
|||||||
if [ -n "${pid}" -a -e /proc/cpuinfo ]; then
|
if [ -n "${pid}" -a -e /proc/cpuinfo ]; then
|
||||||
if [ -s "/proc/$pid/oom_score_adj" ]; then
|
if [ -s "/proc/$pid/oom_score_adj" ]; then
|
||||||
oom_adj=$(cat "/proc/$pid/oom_score_adj" 2>/dev/null)
|
oom_adj=$(cat "/proc/$pid/oom_score_adj" 2>/dev/null)
|
||||||
_d "For $pid, the oom value is $oom_adj, retreived from oom_score_adj"
|
_d "For $pid, the oom value is $oom_adj, retrieved from oom_score_adj"
|
||||||
else
|
else
|
||||||
oom_adj=$(cat "/proc/$pid/oom_adj" 2>/dev/null)
|
oom_adj=$(cat "/proc/$pid/oom_adj" 2>/dev/null)
|
||||||
_d "For $pid, the oom value is $oom_adj, retreived from oom_adj"
|
_d "For $pid, the oom value is $oom_adj, retrieved from oom_adj"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1633,9 +1633,9 @@ find_max_trx_time() {
|
|||||||
}' "${file}"
|
}' "${file}"
|
||||||
}
|
}
|
||||||
|
|
||||||
find_transation_states () {
|
find_transaction_states () {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
local tmpfile="$PT_TMPDIR/find_transation_states.tmp"
|
local tmpfile="$PT_TMPDIR/find_transaction_states.tmp"
|
||||||
|
|
||||||
[ -e "$file" ] || return
|
[ -e "$file" ] || return
|
||||||
|
|
||||||
@@ -1660,7 +1660,7 @@ format_innodb_status () {
|
|||||||
name_val "Pending I/O Reads" "$(find_pending_io_reads "${file}")"
|
name_val "Pending I/O Reads" "$(find_pending_io_reads "${file}")"
|
||||||
name_val "Pending I/O Writes" "$(find_pending_io_writes "${file}")"
|
name_val "Pending I/O Writes" "$(find_pending_io_writes "${file}")"
|
||||||
name_val "Pending I/O Flushes" "$(find_pending_io_flushes "${file}")"
|
name_val "Pending I/O Flushes" "$(find_pending_io_flushes "${file}")"
|
||||||
name_val "Transaction States" "$(find_transation_states "${file}" )"
|
name_val "Transaction States" "$(find_transaction_states "${file}" )"
|
||||||
if grep 'TABLE LOCK table' "${file}" >/dev/null ; then
|
if grep 'TABLE LOCK table' "${file}" >/dev/null ; then
|
||||||
echo "Tables Locked"
|
echo "Tables Locked"
|
||||||
awk '/^TABLE LOCK table/{print $4}' "${file}" \
|
awk '/^TABLE LOCK table/{print $4}' "${file}" \
|
||||||
@@ -2346,9 +2346,9 @@ report_jemalloc_enabled() {
|
|||||||
local GENERAL_JEMALLOC_STATUS=0
|
local GENERAL_JEMALLOC_STATUS=0
|
||||||
|
|
||||||
for pid in $(grep '/mysqld ' "$instances_file" | awk '{print $1;}'); do
|
for pid in $(grep '/mysqld ' "$instances_file" | awk '{print $1;}'); do
|
||||||
local jemalloc_status="$(get_var "pt-summary-internal-jemalloc_enabled_for_pid_${pid}" "${variables_file}")"
|
local jemalloc_status="$(get_var "pt-summary-internal-jemalloc_enabled_for_pid_${pid}" "${variables_file}")"
|
||||||
if [ -z $jemalloc_status ]; then
|
if [ -z $jemalloc_status ]; then
|
||||||
continue
|
continue
|
||||||
elif [ $jemalloc_status = 0 ]; then
|
elif [ $jemalloc_status = 0 ]; then
|
||||||
echo "jemalloc is not enabled in mysql config for process with id ${pid}"
|
echo "jemalloc is not enabled in mysql config for process with id ${pid}"
|
||||||
else
|
else
|
||||||
|
@@ -1513,7 +1513,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -1703,7 +1703,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -5338,7 +5338,7 @@ sub _parse_spec {
|
|||||||
die "$var is not a variable name\n" unless $var =~ m/^[a-zA-Z_]+$/;
|
die "$var is not a variable name\n" unless $var =~ m/^[a-zA-Z_]+$/;
|
||||||
|
|
||||||
if ( !$val ) {
|
if ( !$val ) {
|
||||||
PTDEBUG && _d('Will get intial value for', $var, 'later');
|
PTDEBUG && _d('Will get initial value for', $var, 'later');
|
||||||
$max_val_for{$var} = undef;
|
$max_val_for{$var} = undef;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -7307,7 +7307,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -7873,7 +7873,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -7941,7 +7941,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -7967,7 +7967,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -8010,7 +8010,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -361,7 +361,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -551,7 +551,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -3042,7 +3042,7 @@ sub distill_verbs {
|
|||||||
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
||||||
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
||||||
$obj = uc $obj if $obj;
|
$obj = uc $obj if $obj;
|
||||||
PTDEBUG && _d('Data def statment:', $dds, 'obj:', $obj);
|
PTDEBUG && _d('Data def statement:', $dds, 'obj:', $obj);
|
||||||
my ($db_or_tbl)
|
my ($db_or_tbl)
|
||||||
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
||||||
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
||||||
@@ -12239,7 +12239,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -12805,7 +12805,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -12873,7 +12873,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -12899,7 +12899,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -12942,7 +12942,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -1448,7 +1448,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -1638,7 +1638,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -3382,7 +3382,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -3948,7 +3948,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -4016,7 +4016,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4042,7 +4042,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4085,7 +4085,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -1383,7 +1383,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -1573,7 +1573,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
|
@@ -1602,7 +1602,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -1792,7 +1792,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -4124,7 +4124,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -4690,7 +4690,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -4758,7 +4758,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4784,7 +4784,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4827,7 +4827,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -627,10 +627,10 @@ get_oom_of_pid () {
|
|||||||
if [ -n "${pid}" -a -e /proc/cpuinfo ]; then
|
if [ -n "${pid}" -a -e /proc/cpuinfo ]; then
|
||||||
if [ -s "/proc/$pid/oom_score_adj" ]; then
|
if [ -s "/proc/$pid/oom_score_adj" ]; then
|
||||||
oom_adj=$(cat "/proc/$pid/oom_score_adj" 2>/dev/null)
|
oom_adj=$(cat "/proc/$pid/oom_score_adj" 2>/dev/null)
|
||||||
_d "For $pid, the oom value is $oom_adj, retreived from oom_score_adj"
|
_d "For $pid, the oom value is $oom_adj, retrieved from oom_score_adj"
|
||||||
else
|
else
|
||||||
oom_adj=$(cat "/proc/$pid/oom_adj" 2>/dev/null)
|
oom_adj=$(cat "/proc/$pid/oom_adj" 2>/dev/null)
|
||||||
_d "For $pid, the oom value is $oom_adj, retreived from oom_adj"
|
_d "For $pid, the oom value is $oom_adj, retrieved from oom_adj"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -875,7 +875,7 @@ collect_system_data () { local PTFUNCNAME=collect_system_data;
|
|||||||
raid_controller "$data_dir/dmesg_file" "$data_dir/lspci_file" >> "$data_dir/summary"
|
raid_controller "$data_dir/dmesg_file" "$data_dir/lspci_file" >> "$data_dir/summary"
|
||||||
|
|
||||||
local controller="$(get_var raid_controller "$data_dir/summary")"
|
local controller="$(get_var raid_controller "$data_dir/summary")"
|
||||||
propietary_raid_controller "$data_dir/raid-controller" "$data_dir/summary" "$data_dir" "$controller"
|
proprietary_raid_controller "$data_dir/raid-controller" "$data_dir/summary" "$data_dir" "$controller"
|
||||||
|
|
||||||
[ "${platform}" = "Linux" ] && linux_exclusive_collection "$data_dir"
|
[ "${platform}" = "Linux" ] && linux_exclusive_collection "$data_dir"
|
||||||
|
|
||||||
@@ -1331,7 +1331,7 @@ processor_info () { local PTFUNCNAME=processor_info;
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
propietary_raid_controller () { local PTFUNCNAME=propietary_raid_controller;
|
proprietary_raid_controller () { local PTFUNCNAME=proprietary_raid_controller;
|
||||||
local file="$1"
|
local file="$1"
|
||||||
local variable_file="$2"
|
local variable_file="$2"
|
||||||
local data_dir="$3"
|
local data_dir="$3"
|
||||||
@@ -2234,7 +2234,7 @@ report_system_summary () { local PTFUNCNAME=report_system_summary;
|
|||||||
name_val "${disk}" "${scheduler:-"UNREADABLE"}"
|
name_val "${disk}" "${scheduler:-"UNREADABLE"}"
|
||||||
done
|
done
|
||||||
|
|
||||||
section "Disk Partioning"
|
section "Disk Partitioning"
|
||||||
parse_fdisk "$data_dir/partitioning"
|
parse_fdisk "$data_dir/partitioning"
|
||||||
|
|
||||||
section "Kernel Inode State"
|
section "Kernel Inode State"
|
||||||
|
@@ -508,7 +508,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -1074,7 +1074,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -1142,7 +1142,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -1168,7 +1168,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -1211,7 +1211,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
@@ -3201,7 +3201,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -3391,7 +3391,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -6074,7 +6074,7 @@ sub make_chunk_checksum {
|
|||||||
my $q = $self->{Quoter};
|
my $q = $self->{Quoter};
|
||||||
|
|
||||||
my %crc_args = $self->get_crc_args(%args);
|
my %crc_args = $self->get_crc_args(%args);
|
||||||
PTDEBUG && _d("Checksum strat:", Dumper(\%crc_args));
|
PTDEBUG && _d('Checksum start:', Dumper(\%crc_args));
|
||||||
|
|
||||||
my $row_checksum = $self->make_row_checksum(
|
my $row_checksum = $self->make_row_checksum(
|
||||||
%args,
|
%args,
|
||||||
@@ -8960,7 +8960,7 @@ sub _parse_config_output {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output TextResultSetParser);
|
my @required_args = qw(output TextResultSetParser);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
PTDEBUG && _d("Parsing config output");
|
PTDEBUG && _d("Parsing config output");
|
||||||
@@ -9011,7 +9011,7 @@ sub detect_config_output_format {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -9047,7 +9047,7 @@ sub parse_show_variables {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output TextResultSetParser);
|
my @required_args = qw(output TextResultSetParser);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output, $trp) = @args{@required_args};
|
my ($output, $trp) = @args{@required_args};
|
||||||
|
|
||||||
@@ -9062,7 +9062,7 @@ sub parse_mysqld {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -9096,7 +9096,7 @@ sub parse_my_print_defaults {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -9112,7 +9112,7 @@ sub parse_option_file {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -9223,7 +9223,7 @@ sub _mimic_show_variables {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(vars format);
|
my @required_args = qw(vars format);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($vars, $format) = @args{@required_args};
|
my ($vars, $format) = @args{@required_args};
|
||||||
|
|
||||||
@@ -9405,7 +9405,7 @@ sub _parse_spec {
|
|||||||
die "$var is not a variable name\n" unless $var =~ m/^[a-zA-Z_]+$/;
|
die "$var is not a variable name\n" unless $var =~ m/^[a-zA-Z_]+$/;
|
||||||
|
|
||||||
if ( !$val ) {
|
if ( !$val ) {
|
||||||
PTDEBUG && _d('Will get intial value for', $var, 'later');
|
PTDEBUG && _d('Will get initial value for', $var, 'later');
|
||||||
$max_val_for{$var} = undef;
|
$max_val_for{$var} = undef;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -1463,7 +1463,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -1653,7 +1653,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -9035,7 +9035,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -9601,7 +9601,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -9669,7 +9669,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -9695,7 +9695,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -9738,7 +9738,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -700,10 +700,10 @@ sub meta {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
# Lmo::Types package
|
# Lmo::Types package
|
||||||
# This package is a copy without comments from the original. The original
|
# This package is a copy without comments from the original. The original
|
||||||
# with comments and its test file can be found in the Bazaar repository at,
|
# with comments and its test file can be found in the GitHub repository at,
|
||||||
# lib/Lmo/Types.pm
|
# lib/Lmo/Types.pm
|
||||||
# t/lib/Lmo/Types.t
|
# t/lib/Lmo/Types.t
|
||||||
# See https://launchpad.net/percona-toolkit for more information.
|
# See https://github.com/percona/percona-toolkit for more information.
|
||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Lmo::Types;
|
package Lmo::Types;
|
||||||
@@ -729,7 +729,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -801,10 +801,10 @@ sub _nested_constraints {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
# Lmo package
|
# Lmo package
|
||||||
# This package is a copy without comments from the original. The original
|
# This package is a copy without comments from the original. The original
|
||||||
# with comments and its test file can be found in the Bazaar repository at,
|
# with comments and its test file can be found in the GitHub repository at,
|
||||||
# lib/Lmo.pm
|
# lib/Lmo.pm
|
||||||
# t/lib/Lmo.t
|
# t/lib/Lmo.t
|
||||||
# See https://launchpad.net/percona-toolkit for more information.
|
# See https://github.com/percona/percona-toolkit for more information.
|
||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
BEGIN {
|
BEGIN {
|
||||||
@@ -919,7 +919,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -1137,10 +1137,10 @@ sub override {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
# OptionParser package
|
# OptionParser package
|
||||||
# This package is a copy without comments from the original. The original
|
# This package is a copy without comments from the original. The original
|
||||||
# with comments and its test file can be found in the Bazaar repository at,
|
# with comments and its test file can be found in the GitHub repository at,
|
||||||
# lib/OptionParser.pm
|
# lib/OptionParser.pm
|
||||||
# t/lib/OptionParser.t
|
# t/lib/OptionParser.t
|
||||||
# See https://launchpad.net/percona-toolkit for more information.
|
# See https://github.com/percona/percona-toolkit for more information.
|
||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package OptionParser;
|
package OptionParser;
|
||||||
@@ -2829,10 +2829,10 @@ sub _d {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
# QueryRewriter package
|
# QueryRewriter package
|
||||||
# This package is a copy without comments from the original. The original
|
# This package is a copy without comments from the original. The original
|
||||||
# with comments and its test file can be found in the Bazaar repository at,
|
# with comments and its test file can be found in the GitHub repository at,
|
||||||
# lib/QueryRewriter.pm
|
# lib/QueryRewriter.pm
|
||||||
# t/lib/QueryRewriter.t
|
# t/lib/QueryRewriter.t
|
||||||
# See https://launchpad.net/percona-toolkit for more information.
|
# See https://github.com/percona/percona-toolkit for more information.
|
||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package QueryRewriter;
|
package QueryRewriter;
|
||||||
@@ -3041,7 +3041,7 @@ sub distill_verbs {
|
|||||||
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
||||||
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
||||||
$obj = uc $obj if $obj;
|
$obj = uc $obj if $obj;
|
||||||
PTDEBUG && _d('Data def statment:', $dds, 'obj:', $obj);
|
PTDEBUG && _d('Data def statement:', $dds, 'obj:', $obj);
|
||||||
my ($db_or_tbl)
|
my ($db_or_tbl)
|
||||||
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
||||||
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
||||||
@@ -3641,10 +3641,10 @@ sub _d {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
# VersionParser package
|
# VersionParser package
|
||||||
# This package is a copy without comments from the original. The original
|
# This package is a copy without comments from the original. The original
|
||||||
# with comments and its test file can be found in the Bazaar repository at,
|
# with comments and its test file can be found in the GitHub repository at,
|
||||||
# lib/VersionParser.pm
|
# lib/VersionParser.pm
|
||||||
# t/lib/VersionParser.t
|
# t/lib/VersionParser.t
|
||||||
# See https://launchpad.net/percona-toolkit for more information.
|
# See https://github.com/percona/percona-toolkit for more information.
|
||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package VersionParser;
|
package VersionParser;
|
||||||
@@ -3663,8 +3663,6 @@ use overload (
|
|||||||
|
|
||||||
use Carp ();
|
use Carp ();
|
||||||
|
|
||||||
our $VERSION = 0.01;
|
|
||||||
|
|
||||||
has major => (
|
has major => (
|
||||||
is => 'ro',
|
is => 'ro',
|
||||||
isa => 'Int',
|
isa => 'Int',
|
||||||
|
@@ -358,7 +358,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -548,7 +548,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -3885,7 +3885,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -4451,7 +4451,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -4519,7 +4519,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4545,7 +4545,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4588,7 +4588,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4992,7 +4992,7 @@ sub distill_verbs {
|
|||||||
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
||||||
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
||||||
$obj = uc $obj if $obj;
|
$obj = uc $obj if $obj;
|
||||||
PTDEBUG && _d('Data def statment:', $dds, 'obj:', $obj);
|
PTDEBUG && _d('Data def statement:', $dds, 'obj:', $obj);
|
||||||
my ($db_or_tbl)
|
my ($db_or_tbl)
|
||||||
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
||||||
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
||||||
|
@@ -1452,7 +1452,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
@@ -1642,7 +1642,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -4288,7 +4288,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -4854,7 +4854,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -4922,7 +4922,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4948,7 +4948,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -4991,7 +4991,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
|
@@ -696,7 +696,7 @@ sub index_access {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
# OptionParser package
|
# OptionParser package
|
||||||
# This package is a copy without comments from the original. The original
|
# This package is a copy without comments from the original. The original
|
||||||
# with comments and its test file can be found in the Bazaar repository at,
|
# with comments and its test file can be found in the GitHub repository at,
|
||||||
# lib/OptionParser.pm
|
# lib/OptionParser.pm
|
||||||
# t/lib/OptionParser.t
|
# t/lib/OptionParser.t
|
||||||
# See https://github.com/percona/percona-toolkit for more information.
|
# See https://github.com/percona/percona-toolkit for more information.
|
||||||
@@ -757,7 +757,7 @@ sub new {
|
|||||||
rules => [], # desc of rules for --help
|
rules => [], # desc of rules for --help
|
||||||
mutex => [], # rule: opts are mutually exclusive
|
mutex => [], # rule: opts are mutually exclusive
|
||||||
atleast1 => [], # rule: at least one opt is required
|
atleast1 => [], # rule: at least one opt is required
|
||||||
disables => {}, # rule: opt disables other opts
|
disables => {}, # rule: opt disables other opts
|
||||||
defaults_to => {}, # rule: opt defaults to value of other opt
|
defaults_to => {}, # rule: opt defaults to value of other opt
|
||||||
DSNParser => undef,
|
DSNParser => undef,
|
||||||
default_files => [
|
default_files => [
|
||||||
@@ -920,7 +920,7 @@ sub _pod_to_specs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
push @specs, {
|
push @specs, {
|
||||||
spec => $self->{parse_attributes}->($self, $option, \%attribs),
|
spec => $self->{parse_attributes}->($self, $option, \%attribs),
|
||||||
desc => $para
|
desc => $para
|
||||||
. (defined $attribs{default} ? " (default $attribs{default})" : ''),
|
. (defined $attribs{default} ? " (default $attribs{default})" : ''),
|
||||||
group => ($attribs{'group'} ? $attribs{'group'} : 'default'),
|
group => ($attribs{'group'} ? $attribs{'group'} : 'default'),
|
||||||
@@ -1011,7 +1011,7 @@ sub _parse_specs {
|
|||||||
$self->{opts}->{$long} = $opt;
|
$self->{opts}->{$long} = $opt;
|
||||||
}
|
}
|
||||||
else { # It's an option rule, not a spec.
|
else { # It's an option rule, not a spec.
|
||||||
PTDEBUG && _d('Parsing rule:', $opt);
|
PTDEBUG && _d('Parsing rule:', $opt);
|
||||||
push @{$self->{rules}}, $opt;
|
push @{$self->{rules}}, $opt;
|
||||||
my @participants = $self->_get_participants($opt);
|
my @participants = $self->_get_participants($opt);
|
||||||
my $rule_ok = 0;
|
my $rule_ok = 0;
|
||||||
@@ -1056,7 +1056,7 @@ sub _parse_specs {
|
|||||||
PTDEBUG && _d('Option', $long, 'disables', @participants);
|
PTDEBUG && _d('Option', $long, 'disables', @participants);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _get_participants {
|
sub _get_participants {
|
||||||
@@ -1143,7 +1143,7 @@ sub _set_option {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub get_opts {
|
sub get_opts {
|
||||||
my ( $self ) = @_;
|
my ( $self ) = @_;
|
||||||
|
|
||||||
foreach my $long ( keys %{$self->{opts}} ) {
|
foreach my $long ( keys %{$self->{opts}} ) {
|
||||||
$self->{opts}->{$long}->{got} = 0;
|
$self->{opts}->{$long}->{got} = 0;
|
||||||
@@ -1274,7 +1274,7 @@ sub _check_opts {
|
|||||||
else {
|
else {
|
||||||
$err = join(', ',
|
$err = join(', ',
|
||||||
map { "--$self->{opts}->{$_}->{long}" }
|
map { "--$self->{opts}->{$_}->{long}" }
|
||||||
grep { $_ }
|
grep { $_ }
|
||||||
@restricted_opts[0..scalar(@restricted_opts) - 2]
|
@restricted_opts[0..scalar(@restricted_opts) - 2]
|
||||||
)
|
)
|
||||||
. ' or --'.$self->{opts}->{$restricted_opts[-1]}->{long};
|
. ' or --'.$self->{opts}->{$restricted_opts[-1]}->{long};
|
||||||
@@ -1284,7 +1284,7 @@ sub _check_opts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
elsif ( $opt->{is_required} ) {
|
elsif ( $opt->{is_required} ) {
|
||||||
$self->save_error("Required option --$long must be specified");
|
$self->save_error("Required option --$long must be specified");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1668,7 +1668,7 @@ sub clone {
|
|||||||
$clone{$scalar} = $self->{$scalar};
|
$clone{$scalar} = $self->{$scalar};
|
||||||
}
|
}
|
||||||
|
|
||||||
return bless \%clone;
|
return bless \%clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _parse_size {
|
sub _parse_size {
|
||||||
|
@@ -115,7 +115,7 @@ sub load_rule_info {
|
|||||||
|
|
||||||
|
|
||||||
# Sub: run_rules
|
# Sub: run_rules
|
||||||
# Run all rules from all advisors loaded ealier.
|
# Run all rules from all advisors loaded earlier.
|
||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# %args - Arguments passed through to each rule's coderef
|
# %args - Arguments passed through to each rule's coderef
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
{
|
{
|
||||||
# Package: AdvisorRules
|
# Package: AdvisorRules
|
||||||
# AdvisorRules is a parent class for advisor rule modules like
|
# AdvisorRules is a parent class for advisor rule modules like
|
||||||
# <QueryAdivsorRules>.
|
# <QueryAdvisorRules>.
|
||||||
package AdvisorRules;
|
package AdvisorRules;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
@@ -147,7 +147,7 @@ sub dst {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Sub: _take_action
|
# Sub: _take_action
|
||||||
# Call the user-provied actions. Actions are passed an action statement
|
# Call the user-provided actions. Actions are passed an action statement
|
||||||
# and an optional dbh. This sub is not called directly; it's called
|
# and an optional dbh. This sub is not called directly; it's called
|
||||||
# by <change()> or <process_rows()>.
|
# by <change()> or <process_rows()>.
|
||||||
#
|
#
|
||||||
@@ -164,7 +164,7 @@ sub _take_action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Sub: change
|
# Sub: change
|
||||||
# Make an action SQL statment for the given parameters if not queueing.
|
# Make an action SQL statement for the given parameters if not queueing.
|
||||||
# This sub calls <_take_action()>, passing the action statement and
|
# This sub calls <_take_action()>, passing the action statement and
|
||||||
# optional dbh. If queueing, the parameters are saved and the same work
|
# optional dbh. If queueing, the parameters are saved and the same work
|
||||||
# is done in <process_rows()>. Queueing does not work with bidirectional
|
# is done in <process_rows()>. Queueing does not work with bidirectional
|
||||||
|
@@ -656,7 +656,7 @@ sub _parse_from_filehandle {
|
|||||||
# !!!!INTERNAL!!!!!
|
# !!!!INTERNAL!!!!!
|
||||||
# Reads from the filehandle, either saving the data as needed if dealing
|
# Reads from the filehandle, either saving the data as needed if dealing
|
||||||
# with a diskstats-formatted line, or if it finds a TS line and has a
|
# with a diskstats-formatted line, or if it finds a TS line and has a
|
||||||
# callback, defering to that.
|
# callback, deferring to that.
|
||||||
|
|
||||||
sub _parse_and_load_diskstats {
|
sub _parse_and_load_diskstats {
|
||||||
my ( $self, $fh, $sample_callback ) = @_;
|
my ( $self, $fh, $sample_callback ) = @_;
|
||||||
|
@@ -77,7 +77,7 @@ sub get_duplicate_keys {
|
|||||||
# The primary key is treated specially. It is effectively never a
|
# The primary key is treated specially. It is effectively never a
|
||||||
# duplicate, so it is never removed. It is compared to all other
|
# duplicate, so it is never removed. It is compared to all other
|
||||||
# keys, and in any case of duplication, the primary is always kept
|
# keys, and in any case of duplication, the primary is always kept
|
||||||
# and the other key removed. Usually the primary is the acutal
|
# and the other key removed. Usually the primary is the actual
|
||||||
# PRIMARY KEY, but for an InnoDB table without a PRIMARY KEY, the
|
# PRIMARY KEY, but for an InnoDB table without a PRIMARY KEY, the
|
||||||
# effective primary key is the clustered key.
|
# effective primary key is the clustered key.
|
||||||
if ( $key->{name} eq 'PRIMARY'
|
if ( $key->{name} eq 'PRIMARY'
|
||||||
@@ -439,7 +439,7 @@ sub shorten_clustered_duplicate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Given a primary key (can be undef) and an arrayref of unique keys,
|
# Given a primary key (can be undef) and an arrayref of unique keys,
|
||||||
# removes and returns redundantly contrained unique keys from uniquie_keys.
|
# removes and returns redundantly constrained unique keys from uniquie_keys.
|
||||||
sub unconstrain_keys {
|
sub unconstrain_keys {
|
||||||
my ( $self, $primary_key, $unique_keys ) = @_;
|
my ( $self, $primary_key, $unique_keys ) = @_;
|
||||||
die "I need a unique_keys argument" unless $unique_keys;
|
die "I need a unique_keys argument" unless $unique_keys;
|
||||||
|
@@ -516,7 +516,7 @@ sub make_handler {
|
|||||||
# standard deviation, 95th percentile, etc. So memory usage is bounded by
|
# standard deviation, 95th percentile, etc. So memory usage is bounded by
|
||||||
# the number of distinct aggregated values, not the number of events.
|
# the number of distinct aggregated values, not the number of events.
|
||||||
#
|
#
|
||||||
# TODO: could export this by default to avoid having to specific packge::.
|
# TODO: could export this by default to avoid having to specific package::.
|
||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $val - Numeric value to bucketize
|
# $val - Numeric value to bucketize
|
||||||
@@ -539,7 +539,7 @@ sub bucket_idx {
|
|||||||
# from inside this module like bucket_idx() or outside this module
|
# from inside this module like bucket_idx() or outside this module
|
||||||
# like EventAggregator::bucket_value().
|
# like EventAggregator::bucket_value().
|
||||||
#
|
#
|
||||||
# TODO: could export this by default to avoid having to specific packge::.
|
# TODO: could export this by default to avoid having to specific package::.
|
||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $bucket - Bucket number (0 to NUM_BUCK-1)
|
# $bucket - Bucket number (0 to NUM_BUCK-1)
|
||||||
@@ -1022,7 +1022,7 @@ sub merge {
|
|||||||
_add_attrib_vals($r1_global, $r2_global);
|
_add_attrib_vals($r1_global, $r2_global);
|
||||||
}
|
}
|
||||||
elsif ( !$r1_global ) {
|
elsif ( !$r1_global ) {
|
||||||
# Global attrib is missing in r1; deep cpoy it from r2 global.
|
# Global attrib is missing in r1; deep copy it from r2 global.
|
||||||
PTDEBUG && _d('copy', $attrib);
|
PTDEBUG && _d('copy', $attrib);
|
||||||
$r_merged->{globals}->{$attrib}
|
$r_merged->{globals}->{$attrib}
|
||||||
= _deep_copy_attrib_vals($r2_global);
|
= _deep_copy_attrib_vals($r2_global);
|
||||||
@@ -1093,7 +1093,7 @@ sub _add_attrib_vals {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ( (ref $val1 eq 'HASH') && (ref $val2 eq 'HASH') ) {
|
elsif ( (ref $val1 eq 'HASH') && (ref $val2 eq 'HASH') ) {
|
||||||
# Value is a hashref, probably for unq string occurences.
|
# Value is a hashref, probably for unq string occurrences.
|
||||||
# Should never be empty.
|
# Should never be empty.
|
||||||
die "Empty $val hashref" unless %$val1 and %$val2;
|
die "Empty $val hashref" unless %$val1 and %$val2;
|
||||||
map { $vals1->{$val}->{$_} += $val2->{$_} } keys %$val2;
|
map { $vals1->{$val}->{$_} += $val2->{$_} } keys %$val2;
|
||||||
|
@@ -414,7 +414,7 @@ sub _split_url {
|
|||||||
$len += $self->write($request->{content});
|
$len += $self->write($request->{content});
|
||||||
|
|
||||||
$len == $content_length
|
$len == $content_length
|
||||||
or croak(qq/Content-Length missmatch (got: $len expected: $content_length)/);
|
or croak(qq/Content-Length mismatch (got: $len expected: $content_length)/);
|
||||||
|
|
||||||
return $len;
|
return $len;
|
||||||
}
|
}
|
||||||
@@ -641,7 +641,7 @@ BEGIN {
|
|||||||
$ipn = IO::Socket::SSL::inet_pton(IO::Socket::SSL::AF_INET6,$identity)
|
$ipn = IO::Socket::SSL::inet_pton(IO::Socket::SSL::AF_INET6,$identity)
|
||||||
or croak "'$identity' is not IPv6, but neither IPv4 nor hostname";
|
or croak "'$identity' is not IPv6, but neither IPv4 nor hostname";
|
||||||
} elsif ( $identity =~m{^\d+\.\d+\.\d+\.\d+$} ) {
|
} elsif ( $identity =~m{^\d+\.\d+\.\d+\.\d+$} ) {
|
||||||
# definitly no hostname, try IPv4
|
# definitely no hostname, try IPv4
|
||||||
$ipn = IO::Socket::SSL::inet_aton( $identity ) or croak "'$identity' is not IPv4, but neither IPv6 nor hostname";
|
$ipn = IO::Socket::SSL::inet_aton( $identity ) or croak "'$identity' is not IPv4, but neither IPv6 nor hostname";
|
||||||
} else {
|
} else {
|
||||||
# assume hostname, check for umlauts etc
|
# assume hostname, check for umlauts etc
|
||||||
|
@@ -59,7 +59,7 @@ sub new {
|
|||||||
# Tell the object that an index exists. Internally, it just creates usage
|
# Tell the object that an index exists. Internally, it just creates usage
|
||||||
# counters for the index and the table it belongs to.
|
# counters for the index and the table it belongs to.
|
||||||
#
|
#
|
||||||
# Parameteres:
|
# Parameters:
|
||||||
# %args - Arguments
|
# %args - Arguments
|
||||||
#
|
#
|
||||||
# Required Arguments:
|
# Required Arguments:
|
||||||
|
@@ -390,7 +390,7 @@ override query_report => sub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add reponse time histogram for Query_time
|
# Add response time histogram for Query_time
|
||||||
my $vals = $stats->{Query_time}->{all};
|
my $vals = $stats->{Query_time}->{all};
|
||||||
if ( defined $vals && scalar %$vals ) {
|
if ( defined $vals && scalar %$vals ) {
|
||||||
# TODO: this is broken.
|
# TODO: this is broken.
|
||||||
|
@@ -75,7 +75,7 @@ sub get_key_size {
|
|||||||
# only covers the portion of the key needed to satisfy the query.
|
# only covers the portion of the key needed to satisfy the query.
|
||||||
# For 2), we have to break normal index usage which normally
|
# For 2), we have to break normal index usage which normally
|
||||||
# allows MySQL to access only the limited number of rows needed
|
# allows MySQL to access only the limited number of rows needed
|
||||||
# to satisify the query because we want to know total table rows.
|
# to satisfy the query because we want to know total table rows.
|
||||||
my $sql = 'EXPLAIN SELECT ' . join(', ', @cols)
|
my $sql = 'EXPLAIN SELECT ' . join(', ', @cols)
|
||||||
. ' FROM ' . $args{tbl_name}
|
. ' FROM ' . $args{tbl_name}
|
||||||
. ($key_exists ? " FORCE INDEX (`$name`)" : '')
|
. ($key_exists ? " FORCE INDEX (`$name`)" : '')
|
||||||
@@ -85,7 +85,7 @@ sub get_key_size {
|
|||||||
push @where_cols, "$col=1";
|
push @where_cols, "$col=1";
|
||||||
}
|
}
|
||||||
# For single column indexes we have to trick MySQL into scanning
|
# For single column indexes we have to trick MySQL into scanning
|
||||||
# the whole index by giving it two irreducible condtions. Otherwise,
|
# the whole index by giving it two irreducible conditions. Otherwise,
|
||||||
# EXPLAIN rows will report only the rows that satisfy the query
|
# EXPLAIN rows will report only the rows that satisfy the query
|
||||||
# using the key, but this is not what we want. We want total table rows.
|
# using the key, but this is not what we want. We want total table rows.
|
||||||
# In other words, we need an EXPLAIN type index, not ref or range.
|
# In other words, we need an EXPLAIN type index, not ref or range.
|
||||||
|
@@ -132,7 +132,7 @@ sub has {
|
|||||||
|
|
||||||
$class_metadata->{$attribute} = ();
|
$class_metadata->{$attribute} = ();
|
||||||
|
|
||||||
# isa => Constaint,
|
# isa => Constraint,
|
||||||
if ( my $type_check = $args{isa} ) {
|
if ( my $type_check = $args{isa} ) {
|
||||||
my $check_name = $type_check;
|
my $check_name = $type_check;
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ sub has {
|
|||||||
|
|
||||||
my $check_sub = sub {
|
my $check_sub = sub {
|
||||||
my ($new_val) = @_;
|
my ($new_val) = @_;
|
||||||
Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val);
|
Lmo::Types::check_type_constraints($attribute, $type_check, $check_name, $new_val);
|
||||||
};
|
};
|
||||||
|
|
||||||
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
$class_metadata->{$attribute}{isa} = [$check_name, $check_sub];
|
||||||
@@ -332,7 +332,7 @@ BEGIN {
|
|||||||
# mro is the method resolution order. The module itself is core in
|
# mro is the method resolution order. The module itself is core in
|
||||||
# recent Perls; In older Perls it's available from MRO::Compat from
|
# recent Perls; In older Perls it's available from MRO::Compat from
|
||||||
# CPAN, and in case that isn't available to us, we inline the barest
|
# CPAN, and in case that isn't available to us, we inline the barest
|
||||||
# funcionality.
|
# functionality.
|
||||||
if ($] >= 5.010) {
|
if ($] >= 5.010) {
|
||||||
{ local $@; require mro; }
|
{ local $@; require mro; }
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,7 @@ our %TYPES = (
|
|||||||
} qw(Array Code Hash Regexp Glob Scalar)
|
} qw(Array Code Hash Regexp Glob Scalar)
|
||||||
);
|
);
|
||||||
|
|
||||||
sub check_type_constaints {
|
sub check_type_constraints {
|
||||||
my ($attribute, $type_check, $check_name, $val) = @_;
|
my ($attribute, $type_check, $check_name, $val) = @_;
|
||||||
( ref($type_check) eq 'CODE'
|
( ref($type_check) eq 'CODE'
|
||||||
? $type_check->($val)
|
? $type_check->($val)
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
# SHOW VARIABLES, option files, mysqld --help --verbose or my_print_defaults.
|
# SHOW VARIABLES, option files, mysqld --help --verbose or my_print_defaults.
|
||||||
# A MySQLConfig object represents how MySQL is or would be configured given
|
# A MySQLConfig object represents how MySQL is or would be configured given
|
||||||
# one of those inputs. If the input is SHOW VARIABLES, then the config is
|
# one of those inputs. If the input is SHOW VARIABLES, then the config is
|
||||||
# acive, i.e. MySQL's running config. All other inputs are inactive, i.e.
|
# active, i.e. MySQL's running config. All other inputs are inactive, i.e.
|
||||||
# how MySQL should or would be running if started with the config.
|
# how MySQL should or would be running if started with the config.
|
||||||
#
|
#
|
||||||
# Inactive configs are made to mimic SHOW VARIABLES so that MySQLConfig
|
# Inactive configs are made to mimic SHOW VARIABLES so that MySQLConfig
|
||||||
@@ -153,7 +153,7 @@ sub _parse_config_output {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output TextResultSetParser);
|
my @required_args = qw(output TextResultSetParser);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
PTDEBUG && _d("Parsing config output");
|
PTDEBUG && _d("Parsing config output");
|
||||||
@@ -204,7 +204,7 @@ sub detect_config_output_format {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@ sub parse_show_variables {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output TextResultSetParser);
|
my @required_args = qw(output TextResultSetParser);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output, $trp) = @args{@required_args};
|
my ($output, $trp) = @args{@required_args};
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ sub parse_mysqld {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ sub parse_mysqld {
|
|||||||
# --------------------------------- -----------------------------
|
# --------------------------------- -----------------------------
|
||||||
# help TRUE
|
# help TRUE
|
||||||
# abort-slave-event-count 0
|
# abort-slave-event-count 0
|
||||||
# So we search for that line of hypens.
|
# So we search for that line of hyphens.
|
||||||
#
|
#
|
||||||
# It also ends with something like
|
# It also ends with something like
|
||||||
#
|
#
|
||||||
@@ -317,7 +317,7 @@ sub parse_my_print_defaults {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -336,7 +336,7 @@ sub parse_option_file {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(output);
|
my @required_args = qw(output);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($output) = @args{@required_args};
|
my ($output) = @args{@required_args};
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ sub _mimic_show_variables {
|
|||||||
my ( %args ) = @_;
|
my ( %args ) = @_;
|
||||||
my @required_args = qw(vars format);
|
my @required_args = qw(vars format);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($vars, $format) = @args{@required_args};
|
my ($vars, $format) = @args{@required_args};
|
||||||
|
|
||||||
@@ -505,7 +505,7 @@ sub _mimic_show_variables {
|
|||||||
else {
|
else {
|
||||||
# Output formats other than mysqld (e.g. option file), if
|
# Output formats other than mysqld (e.g. option file), if
|
||||||
# a variable is listed then it's enabled, like --skip-federated.
|
# a variable is listed then it's enabled, like --skip-federated.
|
||||||
# SHOW VARIBLES will show ON for these.
|
# SHOW VARIABLES will show ON for these.
|
||||||
$vars->{$var} = 'ON';
|
$vars->{$var} = 'ON';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -101,7 +101,7 @@ sub _parse_spec {
|
|||||||
die "$var is not a variable name\n" unless $var =~ m/^[a-zA-Z_]+$/;
|
die "$var is not a variable name\n" unless $var =~ m/^[a-zA-Z_]+$/;
|
||||||
|
|
||||||
if ( !$val ) {
|
if ( !$val ) {
|
||||||
PTDEBUG && _d('Will get intial value for', $var, 'later');
|
PTDEBUG && _d('Will get initial value for', $var, 'later');
|
||||||
$max_val_for{$var} = undef;
|
$max_val_for{$var} = undef;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -44,7 +44,7 @@ $Data::Dumper::Quotekeys = 0;
|
|||||||
# TableParser - <TableParser> object
|
# TableParser - <TableParser> object
|
||||||
#
|
#
|
||||||
# Optional Arguments:
|
# Optional Arguments:
|
||||||
# dml - Data manipulation statment to precede the SELECT statement
|
# dml - Data manipulation statement to precede the SELECT statement
|
||||||
# select - Arrayref of table columns to select
|
# select - Arrayref of table columns to select
|
||||||
# chunk_index - Index to use for nibbling
|
# chunk_index - Index to use for nibbling
|
||||||
# one_nibble - Allow one-chunk tables (default yes)
|
# one_nibble - Allow one-chunk tables (default yes)
|
||||||
@@ -610,7 +610,7 @@ sub _find_best_index {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# if no user definded index or user defined index not valid
|
# if no user defined index or user defined index not valid
|
||||||
# consider mysql's preferred index a candidate
|
# consider mysql's preferred index a candidate
|
||||||
if ( !$best_index && !$want_index && $args{mysql_index} ) {
|
if ( !$best_index && !$want_index && $args{mysql_index} ) {
|
||||||
PTDEBUG && _d('MySQL wants to use index', $args{mysql_index});
|
PTDEBUG && _d('MySQL wants to use index', $args{mysql_index});
|
||||||
@@ -870,7 +870,7 @@ sub _next_boundaries {
|
|||||||
# g <- next_lower
|
# g <- next_lower
|
||||||
#
|
#
|
||||||
# Why fetch both upper and next_lower? We wanted to keep nibbling simple,
|
# Why fetch both upper and next_lower? We wanted to keep nibbling simple,
|
||||||
# i.e. one nibble statment, not one for the first nibble, one for "middle"
|
# i.e. one nibble statement, not one for the first nibble, one for "middle"
|
||||||
# nibbles, and another for the end (this is how older code worked). So the
|
# nibbles, and another for the end (this is how older code worked). So the
|
||||||
# nibble statement is inclusive, but this requires both boundaries for
|
# nibble statement is inclusive, but this requires both boundaries for
|
||||||
# reasons explained in a comment above my $ub_sql in new().
|
# reasons explained in a comment above my $ub_sql in new().
|
||||||
@@ -934,7 +934,7 @@ sub identical_boundaries {
|
|||||||
return 1 if !$b1 && !$b2;
|
return 1 if !$b1 && !$b2;
|
||||||
|
|
||||||
# Both boundaries are defined; compare their values and return false
|
# Both boundaries are defined; compare their values and return false
|
||||||
# on the fisrt difference because only one diff is needed to prove
|
# on the first difference because only one diff is needed to prove
|
||||||
# that they're not identical.
|
# that they're not identical.
|
||||||
die "Boundaries have different numbers of values"
|
die "Boundaries have different numbers of values"
|
||||||
if scalar @$b1 != scalar @$b2; # shouldn't happen
|
if scalar @$b1 != scalar @$b2; # shouldn't happen
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
# out-of-bounds: beyond the lower and upper boundaries. NibbleIterator
|
# out-of-bounds: beyond the lower and upper boundaries. NibbleIterator
|
||||||
# nibbles a table from its lowest to its highest value, but sometimes
|
# nibbles a table from its lowest to its highest value, but sometimes
|
||||||
# another server's copy of the table might have more values below or above
|
# another server's copy of the table might have more values below or above
|
||||||
# the first table's boundaires. When the parent NibbleIterator is done,
|
# the first table's boundaries. When the parent NibbleIterator is done,
|
||||||
# this class executes two more nibbles for values past the lower boundary
|
# this class executes two more nibbles for values past the lower boundary
|
||||||
# and past the upper boundary.
|
# and past the upper boundary.
|
||||||
package OobNibbleIterator;
|
package OobNibbleIterator;
|
||||||
|
@@ -1191,7 +1191,7 @@ sub _read_config_file {
|
|||||||
|
|
||||||
# Sub: read_para_after
|
# Sub: read_para_after
|
||||||
# Read the POD paragraph after a magical regex. This is used,
|
# Read the POD paragraph after a magical regex. This is used,
|
||||||
# for exmaple, to get default CREATE TABLE from the POD. We write something
|
# for example, to get default CREATE TABLE from the POD. We write something
|
||||||
# like:
|
# like:
|
||||||
# (start code)
|
# (start code)
|
||||||
# This is the default MAGIC_foo_table:
|
# This is the default MAGIC_foo_table:
|
||||||
|
@@ -158,7 +158,7 @@ sub BUILDARGS {
|
|||||||
# * files arrayref: files read for input
|
# * files arrayref: files read for input
|
||||||
# * group hashref: don't add blank line between these reports
|
# * group hashref: don't add blank line between these reports
|
||||||
# if they appear together
|
# if they appear together
|
||||||
# Prints the given reports (rusage, heade (global), query_report, etc.) in
|
# Prints the given reports (rusage, header (global), query_report, etc.) in
|
||||||
# the given order. These usually come from mk-query-digest --report-format.
|
# the given order. These usually come from mk-query-digest --report-format.
|
||||||
# Most of the required args are for header() and query_report().
|
# Most of the required args are for header() and query_report().
|
||||||
sub print_reports {
|
sub print_reports {
|
||||||
|
@@ -300,7 +300,7 @@ sub distill_verbs {
|
|||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Data defintion statements verbs like CREATE and ALTER.
|
# Data definition statements verbs like CREATE and ALTER.
|
||||||
# The two evals are a hack to keep Perl from warning that
|
# The two evals are a hack to keep Perl from warning that
|
||||||
# "QueryParser::data_def_stmts" used only once: possible typo at...".
|
# "QueryParser::data_def_stmts" used only once: possible typo at...".
|
||||||
# Some day we'll group all our common regex together in a packet and
|
# Some day we'll group all our common regex together in a packet and
|
||||||
@@ -313,7 +313,7 @@ sub distill_verbs {
|
|||||||
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
||||||
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
||||||
$obj = uc $obj if $obj;
|
$obj = uc $obj if $obj;
|
||||||
PTDEBUG && _d('Data def statment:', $dds, 'obj:', $obj);
|
PTDEBUG && _d('Data def statement:', $dds, 'obj:', $obj);
|
||||||
my ($db_or_tbl)
|
my ($db_or_tbl)
|
||||||
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
= $query =~ m/(?:TABLE|DATABASE)\s+($QueryParser::tbl_ident)(\s+.*)?/i;
|
||||||
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
PTDEBUG && _d('Matches db or table:', $db_or_tbl);
|
||||||
@@ -343,7 +343,7 @@ sub distill_verbs {
|
|||||||
@verbs = $union ? qw(SELECT UNION) : qw(SELECT);
|
@verbs = $union ? qw(SELECT UNION) : qw(SELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
# This used to be "my $verbs" but older verisons of Perl complain that
|
# This used to be "my $verbs" but older versions of Perl complain that
|
||||||
# ""my" variable $verbs masks earlier declaration in same scope" where
|
# ""my" variable $verbs masks earlier declaration in same scope" where
|
||||||
# the earlier declaration is our $verbs.
|
# the earlier declaration is our $verbs.
|
||||||
# http://code.google.com/p/maatkit/issues/detail?id=957
|
# http://code.google.com/p/maatkit/issues/detail?id=957
|
||||||
@@ -397,7 +397,7 @@ sub distill {
|
|||||||
|
|
||||||
if ( $verbs && $verbs =~ m/^SHOW/ ) {
|
if ( $verbs && $verbs =~ m/^SHOW/ ) {
|
||||||
# Ignore tables for SHOW statements and normalize some
|
# Ignore tables for SHOW statements and normalize some
|
||||||
# aliases like SCHMEA==DATABASE, KEYS==INDEX.
|
# aliases like SCHEMA==DATABASE, KEYS==INDEX.
|
||||||
my %alias_for = qw(
|
my %alias_for = qw(
|
||||||
SCHEMA DATABASE
|
SCHEMA DATABASE
|
||||||
KEYS INDEX
|
KEYS INDEX
|
||||||
@@ -427,7 +427,7 @@ sub convert_to_select {
|
|||||||
my ( $self, $query ) = @_;
|
my ( $self, $query ) = @_;
|
||||||
return unless $query;
|
return unless $query;
|
||||||
|
|
||||||
# Trying to convert statments that have subqueries as values to column
|
# Trying to convert statements that have subqueries as values to column
|
||||||
# assignments doesn't work. E.g. SET col=(SELECT ...). But subqueries
|
# assignments doesn't work. E.g. SET col=(SELECT ...). But subqueries
|
||||||
# do work in other cases like JOIN (SELECT ...).
|
# do work in other cases like JOIN (SELECT ...).
|
||||||
# http://code.google.com/p/maatkit/issues/detail?id=347
|
# http://code.google.com/p/maatkit/issues/detail?id=347
|
||||||
|
@@ -29,7 +29,7 @@ package ReadKeyMini;
|
|||||||
# Here be magic. We lie to %INC and say that someone already pulled us from
|
# Here be magic. We lie to %INC and say that someone already pulled us from
|
||||||
# the filesystem. Which might be true, if this is inside a .pm file, but
|
# the filesystem. Which might be true, if this is inside a .pm file, but
|
||||||
# might not be, if we are part of the big file. The spurious BEGINs are mostly
|
# might not be, if we are part of the big file. The spurious BEGINs are mostly
|
||||||
# unnecesary, but if we aren't inside a .pm and something uses us, import or
|
# unnecessary, but if we aren't inside a .pm and something uses us, import or
|
||||||
# EXPORT_OK might not yet be defined. Though that probably won't help.
|
# EXPORT_OK might not yet be defined. Though that probably won't help.
|
||||||
# Costs us nothing though, so worth trying. Putting this on top of the file
|
# Costs us nothing though, so worth trying. Putting this on top of the file
|
||||||
# would solve the issue.
|
# would solve the issue.
|
||||||
|
@@ -49,7 +49,7 @@ sub new {
|
|||||||
# tbl - Table ref
|
# tbl - Table ref
|
||||||
#
|
#
|
||||||
# Optional Arguments:
|
# Optional Arguments:
|
||||||
# no_cols - Don't append columns to list oustide of functions.
|
# no_cols - Don't append columns to list outside of functions.
|
||||||
#
|
#
|
||||||
# Returns:
|
# Returns:
|
||||||
# Column list for SELECT
|
# Column list for SELECT
|
||||||
@@ -169,7 +169,7 @@ sub make_chunk_checksum {
|
|||||||
my $q = $self->{Quoter};
|
my $q = $self->{Quoter};
|
||||||
|
|
||||||
my %crc_args = $self->get_crc_args(%args);
|
my %crc_args = $self->get_crc_args(%args);
|
||||||
PTDEBUG && _d("Checksum strat:", Dumper(\%crc_args));
|
PTDEBUG && _d('Checksum start:', Dumper(\%crc_args));
|
||||||
|
|
||||||
# This checksum algorithm concatenates the columns in each row and
|
# This checksum algorithm concatenates the columns in each row and
|
||||||
# checksums them, then slices this checksum up into 16-character chunks.
|
# checksums them, then slices this checksum up into 16-character chunks.
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
# Package: SQLParser
|
# Package: SQLParser
|
||||||
# SQLParser parses common MySQL SQL statements into data structures.
|
# SQLParser parses common MySQL SQL statements into data structures.
|
||||||
# This parser is MySQL-specific and intentionally meant to handle only
|
# This parser is MySQL-specific and intentionally meant to handle only
|
||||||
# "common" cases. Although there are many limiations (like UNION, CASE,
|
# "common" cases. Although there are many limitations (like UNION, CASE,
|
||||||
# etc.), many complex cases are handled that no other free, Perl SQL
|
# etc.), many complex cases are handled that no other free, Perl SQL
|
||||||
# parser at the time of writing can parse, notably subqueries in all their
|
# parser at the time of writing can parse, notably subqueries in all their
|
||||||
# places and varieties.
|
# places and varieties.
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
# mildly complex regex, so do not expect amazing performance.
|
# mildly complex regex, so do not expect amazing performance.
|
||||||
#
|
#
|
||||||
# See SQLParser.t for examples of the various data structures. There are
|
# See SQLParser.t for examples of the various data structures. There are
|
||||||
# many and they vary a lot depending on the statment parsed, so documentation
|
# many and they vary a lot depending on the statement parsed, so documentation
|
||||||
# in this file is not exhaustive.
|
# in this file is not exhaustive.
|
||||||
#
|
#
|
||||||
# This package differs from QueryParser because here we parse the entire SQL
|
# This package differs from QueryParser because here we parse the entire SQL
|
||||||
@@ -48,7 +48,7 @@ $Data::Dumper::Indent = 1;
|
|||||||
$Data::Dumper::Sortkeys = 1;
|
$Data::Dumper::Sortkeys = 1;
|
||||||
$Data::Dumper::Quotekeys = 0;
|
$Data::Dumper::Quotekeys = 0;
|
||||||
|
|
||||||
# Basic identifers for database, table, column and function names.
|
# Basic identifiers for database, table, column and function names.
|
||||||
my $quoted_ident = qr/`[^`]+`/;
|
my $quoted_ident = qr/`[^`]+`/;
|
||||||
my $unquoted_ident = qr/
|
my $unquoted_ident = qr/
|
||||||
\@{0,2} # optional @ or @@ for variables
|
\@{0,2} # optional @ or @@ for variables
|
||||||
@@ -112,14 +112,14 @@ sub new {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Sub: parse
|
# Sub: parse
|
||||||
# Parse a SQL statment. Only statements of $allowed_types are parsed.
|
# Parse a SQL statement. Only statements of $allowed_types are parsed.
|
||||||
# This sub recurses to parse subqueries.
|
# This sub recurses to parse subqueries.
|
||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $query - SQL statement
|
# $query - SQL statement
|
||||||
#
|
#
|
||||||
# Returns:
|
# Returns:
|
||||||
# A complex hashref of the parsed SQL statment. All keys and almost all
|
# A complex hashref of the parsed SQL statement. All keys and almost all
|
||||||
# values are lowercase for consistency. The struct is roughly:
|
# values are lowercase for consistency. The struct is roughly:
|
||||||
# (start code)
|
# (start code)
|
||||||
# {
|
# {
|
||||||
@@ -375,7 +375,7 @@ sub parse_insert {
|
|||||||
(?:INTO\s+)? # INTO, optional
|
(?:INTO\s+)? # INTO, optional
|
||||||
(.+?)\s+ # table ref
|
(.+?)\s+ # table ref
|
||||||
(\([^\)]+\)\s+)? # column list, optional
|
(\([^\)]+\)\s+)? # column list, optional
|
||||||
(VALUE.?|SET|SELECT)\s+ # start of next caluse
|
(VALUE.?|SET|SELECT)\s+ # start of next clause
|
||||||
/xgci)
|
/xgci)
|
||||||
) {
|
) {
|
||||||
my $tbl = shift @into; # table ref
|
my $tbl = shift @into; # table ref
|
||||||
@@ -580,7 +580,7 @@ sub parse_from {
|
|||||||
}
|
}
|
||||||
elsif ( $thing =~ m/(?:,|JOIN)/i ) {
|
elsif ( $thing =~ m/(?:,|JOIN)/i ) {
|
||||||
# A comma or JOIN signals the end of the current table ref and
|
# A comma or JOIN signals the end of the current table ref and
|
||||||
# the begining of the next table ref. Save the current table ref.
|
# the beginning of the next table ref. Save the current table ref.
|
||||||
if ( $join ) {
|
if ( $join ) {
|
||||||
$tbl_ref->{join} = $join;
|
$tbl_ref->{join} = $join;
|
||||||
}
|
}
|
||||||
@@ -640,7 +640,7 @@ sub parse_table_reference {
|
|||||||
# `tbl` FORCE INDEX (foo), makes FORCE look like an implicit alias.
|
# `tbl` FORCE INDEX (foo), makes FORCE look like an implicit alias.
|
||||||
if ( $tbl_ref =~ s/
|
if ( $tbl_ref =~ s/
|
||||||
\s+(
|
\s+(
|
||||||
(?:FORCE|USE|INGORE)\s
|
(?:FORCE|USE|IGNORE)\s
|
||||||
(?:INDEX|KEY)
|
(?:INDEX|KEY)
|
||||||
\s*\([^\)]+\)\s*
|
\s*\([^\)]+\)\s*
|
||||||
)//xi)
|
)//xi)
|
||||||
@@ -909,7 +909,7 @@ sub parse_group_by {
|
|||||||
# Remove special "WITH ROLLUP" clause so we're left with a simple csv list.
|
# Remove special "WITH ROLLUP" clause so we're left with a simple csv list.
|
||||||
my $with_rollup = $group_by =~ s/\s+WITH ROLLUP\s*//i;
|
my $with_rollup = $group_by =~ s/\s+WITH ROLLUP\s*//i;
|
||||||
|
|
||||||
# Parse the identifers.
|
# Parse the identifiers.
|
||||||
my $idents = $self->parse_identifiers( $self->_parse_csv($group_by) );
|
my $idents = $self->parse_identifiers( $self->_parse_csv($group_by) );
|
||||||
|
|
||||||
$idents->{with_rollup} = 1 if $with_rollup;
|
$idents->{with_rollup} = 1 if $with_rollup;
|
||||||
@@ -1191,7 +1191,7 @@ sub remove_subqueries {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# If the subquery is not preceded by an operator (=, >, etc.)
|
# If the subquery is not preceded by an operator (=, >, etc.)
|
||||||
# or IN(), EXISTS(), etc. then it should be an indentifier,
|
# or IN(), EXISTS(), etc. then it should be an identifier,
|
||||||
# either a derived table or column.
|
# either a derived table or column.
|
||||||
$struct->{context} = 'identifier';
|
$struct->{context} = 'identifier';
|
||||||
}
|
}
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
{
|
{
|
||||||
# Package: Schema
|
# Package: Schema
|
||||||
# Schema encapsulates a data structure representing databases and tables.
|
# Schema encapsulates a data structure representing databases and tables.
|
||||||
# Although in MySQL "schema" is technically equivalent to "databae", we
|
# Although in MySQL "schema" is technically equivalent to "database", we
|
||||||
# use "schema" loosely to mean a collection of schema objects: databases,
|
# use "schema" loosely to mean a collection of schema objects: databases,
|
||||||
# tables, and columns. These objects are organized in a hash keyed on
|
# tables, and columns. These objects are organized in a hash keyed on
|
||||||
# database and table names. The hash is called schema and looks like,
|
# database and table names. The hash is called schema and looks like,
|
||||||
|
@@ -270,7 +270,7 @@ sub _iterate_files {
|
|||||||
}
|
}
|
||||||
elsif ($self->{db} && $chunk =~ m/CREATE TABLE/) {
|
elsif ($self->{db} && $chunk =~ m/CREATE TABLE/) {
|
||||||
if ($chunk =~ m/DROP VIEW IF EXISTS/) {
|
if ($chunk =~ m/DROP VIEW IF EXISTS/) {
|
||||||
# Tables that are actually views have this DROP statment in the
|
# Tables that are actually views have this DROP statement in the
|
||||||
# chunk just before the CREATE TABLE. We don't want views.
|
# chunk just before the CREATE TABLE. We don't want views.
|
||||||
PTDEBUG && _d('Table is a VIEW, skipping');
|
PTDEBUG && _d('Table is a VIEW, skipping');
|
||||||
next CHUNK;
|
next CHUNK;
|
||||||
|
@@ -147,7 +147,7 @@ sub has_mode {
|
|||||||
|
|
||||||
my (undef, $sql_mode_string) = $self->{dbh}->selectrow_array("show variables like 'sql_mode'");
|
my (undef, $sql_mode_string) = $self->{dbh}->selectrow_array("show variables like 'sql_mode'");
|
||||||
|
|
||||||
# Need to account for occurrance at
|
# Need to account for occurrence at
|
||||||
# beginning, middle or end of comma separated string
|
# beginning, middle or end of comma separated string
|
||||||
return $sql_mode_string =~ /(?:,|^)$mode(?:,|$)/;
|
return $sql_mode_string =~ /(?:,|^)$mode(?:,|$)/;
|
||||||
|
|
||||||
|
@@ -721,7 +721,7 @@ sub _chunk_char {
|
|||||||
# exact - bool: passed to <find_chunk_columns()>
|
# exact - bool: passed to <find_chunk_columns()>
|
||||||
#
|
#
|
||||||
# Returns:
|
# Returns:
|
||||||
# List: chunkable column name, chunkable colum index
|
# List: chunkable column name, chunkable column index
|
||||||
sub get_first_chunkable_column {
|
sub get_first_chunkable_column {
|
||||||
my ( $self, %args ) = @_;
|
my ( $self, %args ) = @_;
|
||||||
foreach my $arg ( qw(tbl_struct) ) {
|
foreach my $arg ( qw(tbl_struct) ) {
|
||||||
@@ -1297,7 +1297,7 @@ sub get_first_valid_value {
|
|||||||
return $val;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Evalutes any temporal value, returns NULL if it's invalid, else returns
|
# Evaluates any temporal value, returns NULL if it's invalid, else returns
|
||||||
# a value (possibly zero). It's magical but tested. See also,
|
# a value (possibly zero). It's magical but tested. See also,
|
||||||
# http://hackmysql.com/blog/2010/05/26/detecting-invalid-and-zero-temporal-values/
|
# http://hackmysql.com/blog/2010/05/26/detecting-invalid-and-zero-temporal-values/
|
||||||
sub _validate_temporal_value {
|
sub _validate_temporal_value {
|
||||||
@@ -1364,7 +1364,7 @@ sub get_nonzero_value {
|
|||||||
# Sub: base_count
|
# Sub: base_count
|
||||||
# Count to any number in any base with the given symbols. E.g. if counting
|
# Count to any number in any base with the given symbols. E.g. if counting
|
||||||
# to 10 in base 16 with symbols 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f the result
|
# to 10 in base 16 with symbols 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f the result
|
||||||
# is "a". This is trival for stuff like base 16 (hex), but far less trivial
|
# is "a". This is trivial for stuff like base 16 (hex), but far less trivial
|
||||||
# for arbitrary bases with arbitrary symbols like base 25 with symbols
|
# for arbitrary bases with arbitrary symbols like base 25 with symbols
|
||||||
# B,C,D,...X,Y,Z. For that, counting to 10 results in "L". The base and its
|
# B,C,D,...X,Y,Z. For that, counting to 10 results in "L". The base and its
|
||||||
# symbols are determined by the character column. Symbols can be non-ASCII.
|
# symbols are determined by the character column. Symbols can be non-ASCII.
|
||||||
|
@@ -70,7 +70,7 @@ sub new {
|
|||||||
return bless $self, $class;
|
return bless $self, $class;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sub: _pasre_tabular
|
# Sub: _parse_tabular
|
||||||
# Parse a line from tabular horizontal output.
|
# Parse a line from tabular horizontal output.
|
||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
@@ -88,7 +88,7 @@ sub _parse_tabular {
|
|||||||
return (\%row, undef);
|
return (\%row, undef);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sub: _pasre_tabular
|
# Sub: _parse_tabular
|
||||||
# Parse a line from tab-separated horizontal output.
|
# Parse a line from tab-separated horizontal output.
|
||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
|
@@ -385,7 +385,7 @@ sub pingback {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(url instances);
|
my @required_args = qw(url instances);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my $url = $args{url};
|
my $url = $args{url};
|
||||||
my $instances = $args{instances};
|
my $instances = $args{instances};
|
||||||
@@ -478,7 +478,7 @@ sub encode_client_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items versions general_id);
|
my @required_args = qw(items versions general_id);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items, $versions, $general_id) = @args{@required_args};
|
my ($items, $versions, $general_id) = @args{@required_args};
|
||||||
|
|
||||||
@@ -509,7 +509,7 @@ sub parse_server_response {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(response);
|
my @required_args = qw(response);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($response) = @args{@required_args};
|
my ($response) = @args{@required_args};
|
||||||
|
|
||||||
@@ -553,7 +553,7 @@ sub get_versions {
|
|||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
my @required_args = qw(items);
|
my @required_args = qw(items);
|
||||||
foreach my $arg ( @required_args ) {
|
foreach my $arg ( @required_args ) {
|
||||||
die "I need a $arg arugment" unless $args{$arg};
|
die "I need a $arg argument" unless $args{$arg};
|
||||||
}
|
}
|
||||||
my ($items) = @args{@required_args};
|
my ($items) = @args{@required_args};
|
||||||
|
|
||||||
@@ -678,7 +678,7 @@ sub get_perl_module_version {
|
|||||||
return unless $item;
|
return unless $item;
|
||||||
|
|
||||||
# If there's a var, then its an explicit Perl variable name to get,
|
# If there's a var, then its an explicit Perl variable name to get,
|
||||||
# else the item name is an implicity Perl module name to which we
|
# else the item name is an implicitly Perl module name to which we
|
||||||
# append ::VERSION to get the module's version.
|
# append ::VERSION to get the module's version.
|
||||||
my $var = '$' . $item->{item} . '::VERSION';
|
my $var = '$' . $item->{item} . '::VERSION';
|
||||||
my $version = eval "use $item->{item}; $var;";
|
my $version = eval "use $item->{item}; $var;";
|
||||||
|
@@ -115,7 +115,7 @@ my @methods = qw(major minor revision);
|
|||||||
sub cmp {
|
sub cmp {
|
||||||
my ($left, $right) = @_;
|
my ($left, $right) = @_;
|
||||||
# If the first object is blessed and ->isa( self's class ), then
|
# If the first object is blessed and ->isa( self's class ), then
|
||||||
# just use that; Otherwise, contruct a new VP object from it.
|
# just use that; Otherwise, construct a new VP object from it.
|
||||||
my $right_obj = (blessed($right) && $right->isa(ref($left)))
|
my $right_obj = (blessed($right) && $right->isa(ref($left)))
|
||||||
? $right
|
? $right
|
||||||
: ref($left)->new($right);
|
: ref($left)->new($right);
|
||||||
|
@@ -29,7 +29,7 @@ set -u
|
|||||||
|
|
||||||
# This is inside a function so it can take into account our PATH mungling.
|
# This is inside a function so it can take into account our PATH mungling.
|
||||||
setup_commands () {
|
setup_commands () {
|
||||||
# While extremely unwieldly, this allows us to fake the commands when testing.
|
# While extremely unwieldy, this allows us to fake the commands when testing.
|
||||||
CMD_SYSCTL="$(_which sysctl 2>/dev/null )"
|
CMD_SYSCTL="$(_which sysctl 2>/dev/null )"
|
||||||
CMD_DMIDECODE="$(_which dmidecode 2>/dev/null )"
|
CMD_DMIDECODE="$(_which dmidecode 2>/dev/null )"
|
||||||
CMD_ZONENAME="$(_which zonename 2>/dev/null )"
|
CMD_ZONENAME="$(_which zonename 2>/dev/null )"
|
||||||
@@ -106,7 +106,7 @@ collect_system_data () { local PTFUNCNAME=collect_system_data;
|
|||||||
raid_controller "$data_dir/dmesg_file" "$data_dir/lspci_file" >> "$data_dir/summary"
|
raid_controller "$data_dir/dmesg_file" "$data_dir/lspci_file" >> "$data_dir/summary"
|
||||||
|
|
||||||
local controller="$(get_var raid_controller "$data_dir/summary")"
|
local controller="$(get_var raid_controller "$data_dir/summary")"
|
||||||
propietary_raid_controller "$data_dir/raid-controller" "$data_dir/summary" "$data_dir" "$controller"
|
proprietary_raid_controller "$data_dir/raid-controller" "$data_dir/summary" "$data_dir" "$controller"
|
||||||
|
|
||||||
[ "${platform}" = "Linux" ] && linux_exclusive_collection "$data_dir"
|
[ "${platform}" = "Linux" ] && linux_exclusive_collection "$data_dir"
|
||||||
|
|
||||||
@@ -611,7 +611,7 @@ processor_info () { local PTFUNCNAME=processor_info;
|
|||||||
# in a weird location, such as /usr/StorMan/arcconf, should have their
|
# in a weird location, such as /usr/StorMan/arcconf, should have their
|
||||||
# location added to $PATH at the beginning of main().
|
# location added to $PATH at the beginning of main().
|
||||||
# ########################################################################
|
# ########################################################################
|
||||||
propietary_raid_controller () { local PTFUNCNAME=propietary_raid_controller;
|
proprietary_raid_controller () { local PTFUNCNAME=proprietary_raid_controller;
|
||||||
local file="$1"
|
local file="$1"
|
||||||
local variable_file="$2"
|
local variable_file="$2"
|
||||||
local data_dir="$3"
|
local data_dir="$3"
|
||||||
|
@@ -169,7 +169,7 @@ option_error() {
|
|||||||
# TIMDIR - Temp directory set by <set_PT_TMPDIR()>.
|
# TIMDIR - Temp directory set by <set_PT_TMPDIR()>.
|
||||||
#
|
#
|
||||||
# Set Global Variables:
|
# Set Global Variables:
|
||||||
# This sub decalres a global var for each option by uppercasing the
|
# This sub declares a global var for each option by uppercasing the
|
||||||
# option, removing the option's leading --, changing all - to _, and
|
# option, removing the option's leading --, changing all - to _, and
|
||||||
# prefixing with "OPT_". E.g. --foo-bar becomes OPT_FOO_BAR.
|
# prefixing with "OPT_". E.g. --foo-bar becomes OPT_FOO_BAR.
|
||||||
parse_options() {
|
parse_options() {
|
||||||
|
@@ -76,7 +76,7 @@ section () {
|
|||||||
NAME_VAL_LEN=12
|
NAME_VAL_LEN=12
|
||||||
name_val () {
|
name_val () {
|
||||||
# We use $NAME_VAL_LEN here because the two summary tools, as well as
|
# We use $NAME_VAL_LEN here because the two summary tools, as well as
|
||||||
# the tests, use diffent widths.
|
# the tests, use different widths.
|
||||||
printf "%+*s | %s\n" "${NAME_VAL_LEN}" "$1" "$2"
|
printf "%+*s | %s\n" "${NAME_VAL_LEN}" "$1" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -527,9 +527,9 @@ find_max_trx_time() {
|
|||||||
}' "${file}"
|
}' "${file}"
|
||||||
}
|
}
|
||||||
|
|
||||||
find_transation_states () {
|
find_transaction_states () {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
local tmpfile="$PT_TMPDIR/find_transation_states.tmp"
|
local tmpfile="$PT_TMPDIR/find_transaction_states.tmp"
|
||||||
|
|
||||||
[ -e "$file" ] || return
|
[ -e "$file" ] || return
|
||||||
|
|
||||||
@@ -555,7 +555,7 @@ format_innodb_status () {
|
|||||||
name_val "Pending I/O Reads" "$(find_pending_io_reads "${file}")"
|
name_val "Pending I/O Reads" "$(find_pending_io_reads "${file}")"
|
||||||
name_val "Pending I/O Writes" "$(find_pending_io_writes "${file}")"
|
name_val "Pending I/O Writes" "$(find_pending_io_writes "${file}")"
|
||||||
name_val "Pending I/O Flushes" "$(find_pending_io_flushes "${file}")"
|
name_val "Pending I/O Flushes" "$(find_pending_io_flushes "${file}")"
|
||||||
name_val "Transaction States" "$(find_transation_states "${file}" )"
|
name_val "Transaction States" "$(find_transaction_states "${file}" )"
|
||||||
if grep 'TABLE LOCK table' "${file}" >/dev/null ; then
|
if grep 'TABLE LOCK table' "${file}" >/dev/null ; then
|
||||||
echo "Tables Locked"
|
echo "Tables Locked"
|
||||||
awk '/^TABLE LOCK table/{print $4}' "${file}" \
|
awk '/^TABLE LOCK table/{print $4}' "${file}" \
|
||||||
|
@@ -1024,7 +1024,7 @@ report_system_summary () { local PTFUNCNAME=report_system_summary;
|
|||||||
name_val "${disk}" "${scheduler:-"UNREADABLE"}"
|
name_val "${disk}" "${scheduler:-"UNREADABLE"}"
|
||||||
done
|
done
|
||||||
|
|
||||||
section "Disk Partioning"
|
section "Disk Partitioning"
|
||||||
parse_fdisk "$data_dir/partitioning"
|
parse_fdisk "$data_dir/partitioning"
|
||||||
|
|
||||||
section "Kernel Inode State"
|
section "Kernel Inode State"
|
||||||
|
@@ -81,10 +81,10 @@ get_oom_of_pid () {
|
|||||||
if [ -n "${pid}" -a -e /proc/cpuinfo ]; then
|
if [ -n "${pid}" -a -e /proc/cpuinfo ]; then
|
||||||
if [ -s "/proc/$pid/oom_score_adj" ]; then
|
if [ -s "/proc/$pid/oom_score_adj" ]; then
|
||||||
oom_adj=$(cat "/proc/$pid/oom_score_adj" 2>/dev/null)
|
oom_adj=$(cat "/proc/$pid/oom_score_adj" 2>/dev/null)
|
||||||
_d "For $pid, the oom value is $oom_adj, retreived from oom_score_adj"
|
_d "For $pid, the oom value is $oom_adj, retrieved from oom_score_adj"
|
||||||
else
|
else
|
||||||
oom_adj=$(cat "/proc/$pid/oom_adj" 2>/dev/null)
|
oom_adj=$(cat "/proc/$pid/oom_adj" 2>/dev/null)
|
||||||
_d "For $pid, the oom value is $oom_adj, retreived from oom_adj"
|
_d "For $pid, the oom value is $oom_adj, retrieved from oom_adj"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -218,9 +218,9 @@ else
|
|||||||
skip 1 5 "Tests exclusive for Linux"
|
skip 1 5 "Tests exclusive for Linux"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# propietary_raid_controller
|
# proprietary_raid_controller
|
||||||
|
|
||||||
test_propietary_raid_controller () {
|
test_proprietary_raid_controller () {
|
||||||
local dir="$1"
|
local dir="$1"
|
||||||
|
|
||||||
local CMD_ARCCONF=""
|
local CMD_ARCCONF=""
|
||||||
@@ -232,24 +232,24 @@ test_propietary_raid_controller () {
|
|||||||
for controller in "AACRAID" "HP Smart Array" "LSI Logic MegaRAID SAS"; do
|
for controller in "AACRAID" "HP Smart Array" "LSI Logic MegaRAID SAS"; do
|
||||||
rm "$dir/1/summary" 2>/dev/null
|
rm "$dir/1/summary" 2>/dev/null
|
||||||
touch "$dir/1/summary"
|
touch "$dir/1/summary"
|
||||||
propietary_raid_controller "$dir/1/raid-controller" "$dir/1/summary" "$dir/1" "$controller"
|
proprietary_raid_controller "$dir/1/raid-controller" "$dir/1/summary" "$dir/1" "$controller"
|
||||||
is \
|
is \
|
||||||
"$(get_var "internal::raid_opt" "$dir/1/summary")" \
|
"$(get_var "internal::raid_opt" "$dir/1/summary")" \
|
||||||
0 \
|
0 \
|
||||||
"propietary_raid_controller: correct raid_opt default for $controller"
|
"proprietary_raid_controller: correct raid_opt default for $controller"
|
||||||
|
|
||||||
cmd_ok \
|
cmd_ok \
|
||||||
"grep -q 'RAID controller software not found' \"$dir/1/raid-controller\"" \
|
"grep -q 'RAID controller software not found' \"$dir/1/raid-controller\"" \
|
||||||
"propietary_raid_controller: correct default for $controller if the command isn't available"
|
"proprietary_raid_controller: correct default for $controller if the command isn't available"
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir "$dir/2"
|
mkdir "$dir/2"
|
||||||
fake_command arcconf "ok arcconf"
|
fake_command arcconf "ok arcconf"
|
||||||
propietary_raid_controller "$dir/2/raid-controller" "$dir/2/summary" "$dir/2" "AACRAID"
|
proprietary_raid_controller "$dir/2/raid-controller" "$dir/2/summary" "$dir/2" "AACRAID"
|
||||||
is \
|
is \
|
||||||
"$(get_var "internal::raid_opt" "$dir/2/summary")" \
|
"$(get_var "internal::raid_opt" "$dir/2/summary")" \
|
||||||
1 \
|
1 \
|
||||||
"propietary_raid_controller: correct raid_opt default for $controller when arcconf is there"
|
"proprietary_raid_controller: correct raid_opt default for $controller when arcconf is there"
|
||||||
|
|
||||||
is \
|
is \
|
||||||
"$(cat "$dir/2/raid-controller")" \
|
"$(cat "$dir/2/raid-controller")" \
|
||||||
@@ -258,7 +258,7 @@ test_propietary_raid_controller () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mkdir "$PT_TMPDIR/raid_controller"
|
mkdir "$PT_TMPDIR/raid_controller"
|
||||||
test_propietary_raid_controller "$PT_TMPDIR/raid_controller"
|
test_proprietary_raid_controller "$PT_TMPDIR/raid_controller"
|
||||||
|
|
||||||
|
|
||||||
# notable_processes_info
|
# notable_processes_info
|
||||||
|
@@ -1520,7 +1520,7 @@ Architecture | CPU = 32-bit, OS = 32-bit
|
|||||||
# Disk Schedulers And Queue Size #############################
|
# Disk Schedulers And Queue Size #############################
|
||||||
sda | [cfq] 128
|
sda | [cfq] 128
|
||||||
sdb | [cfq] 128
|
sdb | [cfq] 128
|
||||||
# Disk Partioning ############################################
|
# Disk Partitioning ##########################################
|
||||||
Device Type Start End Size
|
Device Type Start End Size
|
||||||
============ ==== ========== ========== ==================
|
============ ==== ========== ========== ==================
|
||||||
/dev/sda Disk 500107862016
|
/dev/sda Disk 500107862016
|
||||||
|
@@ -35,7 +35,7 @@ Architecture | CPU = 32-bit, OS = 32-bit
|
|||||||
hda | [cfq] 128
|
hda | [cfq] 128
|
||||||
hdc | [cfq] 128
|
hdc | [cfq] 128
|
||||||
md0 | UNREADABLE
|
md0 | UNREADABLE
|
||||||
# Disk Partioning ############################################
|
# Disk Partitioning ##########################################
|
||||||
Device Type Start End Size
|
Device Type Start End Size
|
||||||
============ ==== ========== ========== ==================
|
============ ==== ========== ========== ==================
|
||||||
/dev/hda Disk 8589934592
|
/dev/hda Disk 8589934592
|
||||||
|
@@ -35,7 +35,7 @@ Architecture | CPU = 32-bit, OS = 32-bit
|
|||||||
hda | [cfq] 128
|
hda | [cfq] 128
|
||||||
hdc | [cfq] 128
|
hdc | [cfq] 128
|
||||||
md0 | UNREADABLE
|
md0 | UNREADABLE
|
||||||
# Disk Partioning ############################################
|
# Disk Partitioning ##########################################
|
||||||
Device Type Start End Size
|
Device Type Start End Size
|
||||||
============ ==== ========== ========== ==================
|
============ ==== ========== ========== ==================
|
||||||
# Kernel Inode State #########################################
|
# Kernel Inode State #########################################
|
||||||
|
@@ -74,7 +74,7 @@ Architecture | CPU = 64-bit, OS = 64-bit
|
|||||||
tmpfs 379M 0% tmpfs ro,nosuid,nodev,noexec,seclabel,mode=755 /run/user/1000
|
tmpfs 379M 0% tmpfs ro,nosuid,nodev,noexec,seclabel,mode=755 /run/user/1000
|
||||||
# Disk Schedulers And Queue Size #############################
|
# Disk Schedulers And Queue Size #############################
|
||||||
sda | [noop] 128
|
sda | [noop] 128
|
||||||
# Disk Partioning ############################################
|
# Disk Partitioning ##########################################
|
||||||
Device Type Start End Size
|
Device Type Start End Size
|
||||||
============ ==== ========== ========== ==================
|
============ ==== ========== ========== ==================
|
||||||
/dev/sda Disk 42949672960
|
/dev/sda Disk 42949672960
|
||||||
|
@@ -84,7 +84,7 @@ Preferred Node | current
|
|||||||
dm-2 | 128
|
dm-2 | 128
|
||||||
mmcblk0 | [mq-deadline] 128
|
mmcblk0 | [mq-deadline] 128
|
||||||
nvme0n1 | [none] 127
|
nvme0n1 | [none] 127
|
||||||
# Disk Partioning ############################################
|
# Disk Partitioning ##########################################
|
||||||
Device Type Start End Size
|
Device Type Start End Size
|
||||||
============ ==== ========== ========== ==================
|
============ ==== ========== ========== ==================
|
||||||
/dev/dm-0 Disk 1022886936576
|
/dev/dm-0 Disk 1022886936576
|
||||||
|
@@ -392,7 +392,7 @@ Preferred Node | current
|
|||||||
sdb | [mq-deadline] 256
|
sdb | [mq-deadline] 256
|
||||||
sdc | [mq-deadline] 256
|
sdc | [mq-deadline] 256
|
||||||
sr0 | [mq-deadline] 64
|
sr0 | [mq-deadline] 64
|
||||||
# Disk Partioning ############################################
|
# Disk Partitioning ##########################################
|
||||||
Device Type Start End Size
|
Device Type Start End Size
|
||||||
============ ==== ========== ========== ==================
|
============ ==== ========== ========== ==================
|
||||||
/dev/dm-0 Disk 3032246910976
|
/dev/dm-0 Disk 3032246910976
|
||||||
|
Reference in New Issue
Block a user