Skip to content

Commit

Permalink
New version with icons and supported versions files
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrenouard committed Nov 8, 2024
1 parent b1409e7 commit b189c54
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CURRENT_VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.4
2.6.1
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ generate_cve:
generate_version_file:
rm -f CURRENT_VERSION.txt
grep "# mysqltuner.pl - Version" ./mysqltuner.pl | awk '{ print $$NF}' > CURRENT_VERSION.txt


generate_eof_files:
bash ./build/endoflife.sh mariadb
bash ./build/endoflife.sh mysql
git add ./*_support.md
git commit -m "Generate End Of Life (endoflive.date) at $(shell date --iso=seconds)"

generate_features:
perl ./build/genFeatures.sh
git add ./FEATURES.md
Expand Down
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,17 @@ MySQLTuner needs you
Compatibility
====

Test result are available here:

* MySQL 8.0, 8.2, 8.3 (full support)
* Percona Server 8.0, 8.2, 8.3 (full support)
* MariaDB 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2 (full support)
Test result are available here for LTS only:
* MySQL (full support)
* Percona Server (full support)
* MariaDB (full support)
* Galera replication (full support)
* Percona XtraDB cluster (full support)
* Mysql Replications (partial support, no test environment)

* MySQL 8.1 (not supported, deprecated version)
* Percona Server 5.7 (not supported, deprecated version)
* MySQL 5.7 (not supported, deprecated version)
* MySQL 5.6 and earlier (not supported, deprecated version)
* Percona Server 5.6 (not supported, deprecated version)
* MariaDB 10.7, 10.8, 10.9, 10.10 (not supported, deprecated version)
* MariaDB 10.3 and earlier (not supported, deprecated version)
* MariaDB 5.5 (not supported, deprecated version)
* MySQL Replication (partial support, no test environment)

Thanks to [endoflife.date](endoflife.date)
* Refer to [MariaDB Supported versions](https://github.com/major/MySQLTuner-perl/blob/master/mariadb_support.md).
* Refer to [MySQL Supported versions](https://github.com/major/MySQLTuner-perl/blob/master/mysql_support.md).

***Windows Support is partial***

Expand Down
36 changes: 36 additions & 0 deletions build/endoflife.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Check if a product name has been provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <product_name>"
exit 1
fi

# Product name passed as an argument
produit="$1"

# URL of the API for the specified product
url="https://endoflife.date/api/${produit}.json"

# Perform the HTTP GET request with curl
response=$(curl --silent --fail "$url")

# Check if the request was successful
if [ $? -ne 0 ]; then
echo "Error: Unable to retrieve information for product '$produit'."
exit 1
fi

curl --silent --fail "$url" | jq .
# Get the current date
current_date=$(date +%Y-%m-%d)

# Generate a Markdown file with a single table sorted by end of support date
echo -e "# Version Support for $produit\n" > ${produit}_support.md

echo "| Version | End of Support Date | LTS | Status |" >> ${produit}_support.md
echo "|---------|------------------------|-----|--------|" >> ${produit}_support.md
echo "$response" | jq -r --arg current_date "$current_date" '.[] | {cycle, eol, lts} | .status = (if (.eol | type) == "string" and .eol > $current_date then "Supported" elif (.eol | type) == "string" then "Outdated" else "Supported" end) | .lts_status = (if .lts == true then "YES" else "NO" end) | select(.eol != null) | [.] | sort_by(.eol)[] | "| " + .cycle + " | " + (.eol // "N/A") + " | " + .lts_status + " | " + .status + " |"' >> ${produit}_support.md

# Indicate that the Markdown file has been generated
echo "The file ${produit}_support.md has been successfully generated."
24 changes: 19 additions & 5 deletions mysqltuner.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
# mysqltuner.pl - Version 2.6.0
# mysqltuner.pl - Version 2.6.1
# High Performance MySQL Tuning Script
# Copyright (C) 2015-2023 Jean-Marie Renouard - [email protected]
# Copyright (C) 2006-2023 Major Hayden - [email protected]
Expand Down Expand Up @@ -57,7 +57,7 @@ package main;
#use Env;

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

# Set defaults
Expand Down Expand Up @@ -117,7 +117,8 @@ package main;
"dumpdir" => '',
"feature" => '',
"dbgpattern" => '',
"defaultarch" => 64
"defaultarch" => 64,
"noprettyicon" => 0
);

# Gather the options from the command line
Expand Down Expand Up @@ -154,7 +155,7 @@ package main;
'defaults-extra-file=s', 'dumpdir=s',
'feature=s', 'dbgpattern=s',
'defaultarch=i', 'experimental',
'nondedicated'
'nondedicated', 'noprettyicon'
)
or pod2usage(
-exitval => 1,
Expand Down Expand Up @@ -232,6 +233,7 @@ package main;

$opt{cvefile} = 'vulnerabilities.csv'; #CVE File for vulnerability checks
}
$opt{prettyicon}=0 if $opt{prettyicon}!=1;
$opt{nocolor} = 1 if defined( $opt{outputfile} );
$opt{tbstat} = 0 if ( $opt{notbstat} == 1 ); # Don't print table information
$opt{colstat} = 0 if ( $opt{nocolstat} == 1 ); # Don't print column information
Expand Down Expand Up @@ -275,13 +277,24 @@ package main;
# Setting up the colors for the print styles
my $me = `whoami`;
$me =~ s/\n//g;


my $good = ( $opt{nocolor} == 0 ) ? "[\e[0;32mOK\e[0m]" : "[OK]";
my $bad = ( $opt{nocolor} == 0 ) ? "[\e[0;31m!!\e[0m]" : "[!!]";
my $info = ( $opt{nocolor} == 0 ) ? "[\e[0;34m--\e[0m]" : "[--]";
my $deb = ( $opt{nocolor} == 0 ) ? "[\e[0;31mDG\e[0m]" : "[DG]";
my $cmd = ( $opt{nocolor} == 0 ) ? "\e[1;32m[CMD]($me)" : "[CMD]($me)";
my $end = ( $opt{nocolor} == 0 ) ? "\e[0m" : "";

if ($opt{prettyicon} == 1) {
$good = "";
$bad = "";
$info = "";
$deb = "";
$cmd = "⌨️($me)";
$end = " ";
}

# Maximum lines of log output to read from end
my $maxlines = 30000;

Expand Down Expand Up @@ -7441,7 +7454,7 @@ sub which {
=head1 NAME
MySQLTuner 2.6.0 - MySQL High Performance Tuning Script
MySQLTuner 2.6.1 - MySQL High Performance Tuning Script
=head1 IMPORTANT USAGE GUIDELINES
Expand Down Expand Up @@ -7493,6 +7506,7 @@ =head1 OUTPUT OPTIONS
--verbose Print out all options (default: no verbose, dbstat, idxstat, sysstat, tbstat, pfstat)
--color Print output in color
--nocolor Don't print output in color
--noprettyicon Print output with legacy tag [OK], [!!], [--], [CMD], ...
--nogood Remove OK responses
--nobad Remove negative/suggestion responses
--noinfo Remove informational responses
Expand Down

0 comments on commit b189c54

Please sign in to comment.