Update Vulnerabilities list
Indenting mysqltuner Update Usage information
This commit is contained in:
parent
57b4f69680
commit
390977624e
2 changed files with 102 additions and 290 deletions
|
@ -917,17 +917,21 @@ sub mysql_setup {
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
elsif ( $opt{'defaults-extra-file'} ne '' and -r "$opt{'defaults-extra-file'}" ) {
|
||||
elsif ( $opt{'defaults-extra-file'} ne ''
|
||||
and -r "$opt{'defaults-extra-file'}" )
|
||||
{
|
||||
|
||||
# defaults-extra-file
|
||||
debugprint "defaults extra file detected: $opt{'defaults-extra-file'}";
|
||||
my $mysqlclidefaults = `$mysqlcmd --print-defaults`;
|
||||
debugprint "MySQL Client Extra Default File: $opt{'defaults-extra-file'}";
|
||||
debugprint
|
||||
"MySQL Client Extra Default File: $opt{'defaults-extra-file'}";
|
||||
|
||||
$mysqllogin = "--defaults-extra-file=" . $opt{'defaults-extra-file'};
|
||||
my $loginstatus = `$mysqladmincmd $mysqllogin ping 2>&1`;
|
||||
if ( $loginstatus =~ /mysqld is alive/ ) {
|
||||
goodprint "Logged in using credentials from extra defaults file account.";
|
||||
goodprint
|
||||
"Logged in using credentials from extra defaults file account.";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -2254,7 +2258,8 @@ sub validate_mysql_version {
|
|||
. $myvar{'version'}
|
||||
. " is EOL software. Upgrade soon!";
|
||||
push( @generalrec,
|
||||
"You are using an unsupported version for production environments" );
|
||||
"You are using an unsupported version for production environments"
|
||||
);
|
||||
push( @generalrec,
|
||||
"Upgrade as soon as possible to a supported version !" );
|
||||
|
||||
|
@ -2571,8 +2576,10 @@ sub check_storage_engines {
|
|||
$total_free += $data_free;
|
||||
my $generalrec;
|
||||
if ( $engine eq 'InnoDB' ) {
|
||||
$generalrec = " ALTER TABLE `$table_schema`.`$table_name` FORCE;";
|
||||
} else {
|
||||
$generalrec =
|
||||
" ALTER TABLE `$table_schema`.`$table_name` FORCE;";
|
||||
}
|
||||
else {
|
||||
$generalrec = " OPTIMIZE TABLE `$table_schema`.`$table_name`;";
|
||||
}
|
||||
$generalrec .= " -- can free $data_free MiB";
|
||||
|
@ -2636,8 +2643,7 @@ my %mycalc;
|
|||
|
||||
sub calculations {
|
||||
if ( $mystat{'Questions'} < 1 ) {
|
||||
badprint
|
||||
"Your server has not answered any queries: cannot continue...";
|
||||
badprint "Your server has not answered any queries: cannot continue...";
|
||||
exit 2;
|
||||
}
|
||||
|
||||
|
@ -3066,7 +3072,8 @@ sub mysql_stats {
|
|||
. " global + "
|
||||
. hr_bytes( $mycalc{'per_thread_buffers'} )
|
||||
. " per thread ($myvar{'max_connections'} max threads)";
|
||||
infoprint "Performance_schema Max memory usage: " . hr_bytes_rnd( get_pf_memory() );
|
||||
infoprint "Performance_schema Max memory usage: "
|
||||
. hr_bytes_rnd( get_pf_memory() );
|
||||
$result{'Performance_schema'}{'memory'} = get_pf_memory();
|
||||
$result{'Performance_schema'}{'pretty_memory'} =
|
||||
hr_bytes_rnd( get_pf_memory() );
|
||||
|
@ -3680,8 +3687,8 @@ sub mysql_myisam {
|
|||
if ( $mycalc{'pct_key_buffer_used'} < 90 ) {
|
||||
badprint "Key buffer used: $mycalc{'pct_key_buffer_used'}% ("
|
||||
. hr_bytes( $myvar{'key_buffer_size'} -
|
||||
$mystat{'Key_blocks_unused'} *
|
||||
$myvar{'key_cache_block_size'} )
|
||||
$mystat{'Key_blocks_unused'} * $myvar{'key_cache_block_size'}
|
||||
)
|
||||
. " used / "
|
||||
. hr_bytes( $myvar{'key_buffer_size'} )
|
||||
. " cache)";
|
||||
|
@ -3699,8 +3706,8 @@ sub mysql_myisam {
|
|||
else {
|
||||
goodprint "Key buffer used: $mycalc{'pct_key_buffer_used'}% ("
|
||||
. hr_bytes( $myvar{'key_buffer_size'} -
|
||||
$mystat{'Key_blocks_unused'} *
|
||||
$myvar{'key_cache_block_size'} )
|
||||
$mystat{'Key_blocks_unused'} * $myvar{'key_cache_block_size'}
|
||||
)
|
||||
. " used / "
|
||||
. hr_bytes( $myvar{'key_buffer_size'} )
|
||||
. " cache)";
|
||||
|
@ -3908,7 +3915,8 @@ sub mysqsl_pfs {
|
|||
if ( $myvar{'performance_schema'} eq 'ON' ) {
|
||||
infoprint "Performance_schema is activated.";
|
||||
debugprint "Performance schema is " . $myvar{'performance_schema'};
|
||||
infoprint "Memory used by Performance_schema: " . hr_bytes( get_pf_memory() );
|
||||
infoprint "Memory used by Performance_schema: "
|
||||
. hr_bytes( get_pf_memory() );
|
||||
}
|
||||
|
||||
unless ( grep /^sys$/, select_array("SHOW DATABASES") ) {
|
||||
|
@ -5782,7 +5790,8 @@ having sum(if(c.column_key in ('PRI','UNI'), 1,0)) = 0"
|
|||
}
|
||||
else {
|
||||
badprint "Galera Notify command is not defined.";
|
||||
push( @adjvars, "set up parameter wsrep_notify_cmd to be notified" );
|
||||
push( @adjvars,
|
||||
"set up parameter wsrep_notify_cmd to be notified" );
|
||||
}
|
||||
if ( trim( $myvar{'wsrep_sst_method'} ) !~ "^xtrabackup.*"
|
||||
and trim( $myvar{'wsrep_sst_method'} ) !~ "^mariabackup" )
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue