Skip to content

Commit

Permalink
Release 1.8.8 #579
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrenouard committed Jan 30, 2022
1 parent 49218c8 commit b164a9b
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions mysqltuner.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
# mysqltuner.pl - Version 1.8.7
# mysqltuner.pl - Version 1.8.8
# High Performance MySQL Tuning Script
# Copyright (C) 2006-2021 Major Hayden - major@mhtx.net
#
Expand Down Expand Up @@ -56,7 +56,7 @@ package main;
#use Env;

# Set up a few variables for use in the script
my $tunerversion = "1.8.7";
my $tunerversion = "1.8.8";
my ( @adjvars, @generalrec );

# Set defaults
Expand Down Expand Up @@ -3774,8 +3774,20 @@ sub mysqsl_pfs {
# Performance Schema
$myvar{'performance_schema'} = 'OFF'
unless defined( $myvar{'performance_schema'} );
unless ( $myvar{'performance_schema'} eq 'ON' ) {
if ($myvar{'performance_schema'} eq 'OFF') {
badprint "Performance_schema should be activated.";
push( @adjvars, "performance_schema=ON" );
push( @generalrec,
"Performance schema should be activated for better diagnostics"
);
} else {
infoprint "Performance_schema is activated.";
}

This comment has been minimized.

Copy link
@MichaIng

MichaIng Jan 30, 2022

Contributor

@jmrenouard
Does this block not double the block below? And then there is a third block for MariaDB 10.0.

Also the block below has been inverted, so that additionally a false info is printed:

-------- Performance schema ------------------------------------------------------------------------
[--] Performance_schema is activated.
[--] Performance schema is disabled.
[--] Memory used by P_S: 36B
[--] Sys schema is installed.

I suggest to merge all these three blocks into one, like:

if on
  if MariaDB <= 10 || MySQL <= 5.5
    bad
  else
    good
else
  if MariaDB <= 10 || MySQL <= 5.5
    good
  else
    bad

And I suggest to not do recommendations within the info block but in the recommendation block only, hence instead of

badprint "Performance_schema should be activated.";
badprint "Performance_schema is disabled.";

and leave recommendation/explanation for @generalrec, like done in the doubled block below.


# IF PFS is eanbled
unless ( $myvar{'performance_schema'} ne 'ON' ) {
infoprint "Performance schema is disabled.";
# REc enable PFS for diagnostics only
if ( mysql_version_ge( 5, 6 ) ) {
push( @generalrec,
"Performance schema should be activated for better diagnostics"
Expand All @@ -3798,17 +3810,18 @@ sub mysqsl_pfs {
push( @generalrec,
"Performance schema shouldn't be activated for MariaDB 10.0 for performance issue"
);
push( @adjvars, "performance_schema = OFF disable PFS" );
push( @adjvars, "performance_schema = OFF" );
return;
}

unless ( grep /^sys$/, select_array("SHOW DATABASES") ) {
infoprint "Sys schema isn't installed.";
push( @generalrec,
"Consider installing Sys schema from https://github.com/mysql/mysql-sys for MySQL"
) unless ( mysql_version_le( 5, 6 ) );
push( @generalrec,
"Consider installing Sys schema from https://github.com/FromDual/mariadb-sys for MariaDB"
) unless ( mysql_version_eq( 10, 0 ) or mysql_version_eq( 5, 5 ) );
) unless ( mysql_version_ge( 10, 0 ) );

return;
}
Expand Down Expand Up @@ -6323,7 +6336,7 @@ sub mysql_tables {
);

my $current_type =
uc($ctype) . ( $isnull eq 'NO' ? " NOT NULL" : "NULL" );
uc($ctype) . ( $isnull eq 'NO' ? " NOT NULL" : " NULL" );
my $optimal_type = '';
infoprint " +-- Column $tbname.$_: $current_type";
if ( $opt{colstat} == 1 ) {
Expand Down Expand Up @@ -6747,7 +6760,7 @@ sub which {
=head1 NAME
MySQLTuner 1.8.7 - MySQL High Performance Tuning Script
MySQLTuner 1.8.8 - MySQL High Performance Tuning Script
=head1 IMPORTANT USAGE GUIDELINES
Expand Down

0 comments on commit b164a9b

Please sign in to comment.