Use Threads_running=25 as default --max-load. Allow = or : as var-val separator.

This commit is contained in:
Daniel Nichter
2011-11-01 12:13:02 -06:00
parent bf8dbbdb9e
commit 53605aa45e
3 changed files with 8 additions and 6 deletions

View File

@@ -5321,7 +5321,7 @@ sub _parse_spec {
my %max_val_for;
foreach my $var_val ( @$spec ) {
my ($var, $val) = split /=/, $var_val;
my ($var, $val) = split /[:=]/, $var_val;
die "Invalid spec: $var_val" unless $var;
if ( !$val ) {
my $init_val = $get_status->($var);
@@ -7432,9 +7432,12 @@ interval.
=item --max-load
type: Array; default: Threads_connected,Threads_running; group: Throttle
type: Array; default: Threads_running=25; group: Throttle
Pause checksumming if these status variables are too high.
Pause checksumming if these status variables are too high. The option value
is a comma-separated list of MySQL status variables. An optional C<=MAX_VALUE>
(or C<:MAX_VALUE>) can follow each variable, else the tool determines
a variable's maximum value by increasing its current value by 20%.
=item --password

View File

@@ -80,7 +80,7 @@ sub _parse_spec {
my %max_val_for;
foreach my $var_val ( @$spec ) {
my ($var, $val) = split /=/, $var_val;
my ($var, $val) = split /[:=]/, $var_val;
die "Invalid spec: $var_val" unless $var;
if ( !$val ) {
my $init_val = $get_status->($var);

View File

@@ -42,9 +42,8 @@ else {
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
# so we need to specify --lock-wait-timeout=3 else the tool will die.
# And --max-load "" prevents waiting for status variables.
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
my @args = ($master_dsn, qw(--lock-wait-timeout 3));
my $row;
my $output;
my $exit_status;