Skip to content

Commit b189c54

Browse files
committed
New version with icons and supported versions files
1 parent b1409e7 commit b189c54

File tree

5 files changed

+72
-22
lines changed

5 files changed

+72
-22
lines changed

CURRENT_VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.5.4
1+
2.6.1

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ generate_cve:
4343
generate_version_file:
4444
rm -f CURRENT_VERSION.txt
4545
grep "# mysqltuner.pl - Version" ./mysqltuner.pl | awk '{ print $$NF}' > CURRENT_VERSION.txt
46-
46+
47+
generate_eof_files:
48+
bash ./build/endoflife.sh mariadb
49+
bash ./build/endoflife.sh mysql
50+
git add ./*_support.md
51+
git commit -m "Generate End Of Life (endoflive.date) at $(shell date --iso=seconds)"
52+
4753
generate_features:
4854
perl ./build/genFeatures.sh
4955
git add ./FEATURES.md

README.md

+9-15
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,17 @@ MySQLTuner needs you
4040
Compatibility
4141
====
4242

43-
Test result are available here:
44-
45-
* MySQL 8.0, 8.2, 8.3 (full support)
46-
* Percona Server 8.0, 8.2, 8.3 (full support)
47-
* MariaDB 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2 (full support)
43+
Test result are available here for LTS only:
44+
* MySQL (full support)
45+
* Percona Server (full support)
46+
* MariaDB (full support)
4847
* Galera replication (full support)
4948
* Percona XtraDB cluster (full support)
50-
* Mysql Replications (partial support, no test environment)
51-
52-
* MySQL 8.1 (not supported, deprecated version)
53-
* Percona Server 5.7 (not supported, deprecated version)
54-
* MySQL 5.7 (not supported, deprecated version)
55-
* MySQL 5.6 and earlier (not supported, deprecated version)
56-
* Percona Server 5.6 (not supported, deprecated version)
57-
* MariaDB 10.7, 10.8, 10.9, 10.10 (not supported, deprecated version)
58-
* MariaDB 10.3 and earlier (not supported, deprecated version)
59-
* MariaDB 5.5 (not supported, deprecated version)
49+
* MySQL Replication (partial support, no test environment)
50+
51+
Thanks to [endoflife.date](endoflife.date)
52+
* Refer to [MariaDB Supported versions](https://github.com/major/MySQLTuner-perl/blob/master/mariadb_support.md).
53+
* Refer to [MySQL Supported versions](https://github.com/major/MySQLTuner-perl/blob/master/mysql_support.md).
6054

6155
***Windows Support is partial***
6256

build/endoflife.sh

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# Check if a product name has been provided as an argument
4+
if [ -z "$1" ]; then
5+
echo "Usage: $0 <product_name>"
6+
exit 1
7+
fi
8+
9+
# Product name passed as an argument
10+
produit="$1"
11+
12+
# URL of the API for the specified product
13+
url="https://endoflife.date/api/${produit}.json"
14+
15+
# Perform the HTTP GET request with curl
16+
response=$(curl --silent --fail "$url")
17+
18+
# Check if the request was successful
19+
if [ $? -ne 0 ]; then
20+
echo "Error: Unable to retrieve information for product '$produit'."
21+
exit 1
22+
fi
23+
24+
curl --silent --fail "$url" | jq .
25+
# Get the current date
26+
current_date=$(date +%Y-%m-%d)
27+
28+
# Generate a Markdown file with a single table sorted by end of support date
29+
echo -e "# Version Support for $produit\n" > ${produit}_support.md
30+
31+
echo "| Version | End of Support Date | LTS | Status |" >> ${produit}_support.md
32+
echo "|---------|------------------------|-----|--------|" >> ${produit}_support.md
33+
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
34+
35+
# Indicate that the Markdown file has been generated
36+
echo "The file ${produit}_support.md has been successfully generated."

mysqltuner.pl

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env perl
2-
# mysqltuner.pl - Version 2.6.0
2+
# mysqltuner.pl - Version 2.6.1
33
# High Performance MySQL Tuning Script
44
# Copyright (C) 2015-2023 Jean-Marie Renouard - jmrenouard@gmail.com
55
# Copyright (C) 2006-2023 Major Hayden - major@mhtx.net
@@ -57,7 +57,7 @@ package main;
5757
#use Env;
5858

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

6363
# Set defaults
@@ -117,7 +117,8 @@ package main;
117117
"dumpdir" => '',
118118
"feature" => '',
119119
"dbgpattern" => '',
120-
"defaultarch" => 64
120+
"defaultarch" => 64,
121+
"noprettyicon" => 0
121122
);
122123

123124
# Gather the options from the command line
@@ -154,7 +155,7 @@ package main;
154155
'defaults-extra-file=s', 'dumpdir=s',
155156
'feature=s', 'dbgpattern=s',
156157
'defaultarch=i', 'experimental',
157-
'nondedicated'
158+
'nondedicated', 'noprettyicon'
158159
)
159160
or pod2usage(
160161
-exitval => 1,
@@ -232,6 +233,7 @@ package main;
232233

233234
$opt{cvefile} = 'vulnerabilities.csv'; #CVE File for vulnerability checks
234235
}
236+
$opt{prettyicon}=0 if $opt{prettyicon}!=1;
235237
$opt{nocolor} = 1 if defined( $opt{outputfile} );
236238
$opt{tbstat} = 0 if ( $opt{notbstat} == 1 ); # Don't print table information
237239
$opt{colstat} = 0 if ( $opt{nocolstat} == 1 ); # Don't print column information
@@ -275,13 +277,24 @@ package main;
275277
# Setting up the colors for the print styles
276278
my $me = `whoami`;
277279
$me =~ s/\n//g;
280+
281+
278282
my $good = ( $opt{nocolor} == 0 ) ? "[\e[0;32mOK\e[0m]" : "[OK]";
279283
my $bad = ( $opt{nocolor} == 0 ) ? "[\e[0;31m!!\e[0m]" : "[!!]";
280284
my $info = ( $opt{nocolor} == 0 ) ? "[\e[0;34m--\e[0m]" : "[--]";
281285
my $deb = ( $opt{nocolor} == 0 ) ? "[\e[0;31mDG\e[0m]" : "[DG]";
282286
my $cmd = ( $opt{nocolor} == 0 ) ? "\e[1;32m[CMD]($me)" : "[CMD]($me)";
283287
my $end = ( $opt{nocolor} == 0 ) ? "\e[0m" : "";
284288

289+
if ($opt{prettyicon} == 1) {
290+
$good = "";
291+
$bad = "";
292+
$info = "";
293+
$deb = "";
294+
$cmd = "⌨️($me)";
295+
$end = " ";
296+
}
297+
285298
# Maximum lines of log output to read from end
286299
my $maxlines = 30000;
287300

@@ -7441,7 +7454,7 @@ sub which {
74417454
74427455
=head1 NAME
74437456
7444-
MySQLTuner 2.6.0 - MySQL High Performance Tuning Script
7457+
MySQLTuner 2.6.1 - MySQL High Performance Tuning Script
74457458
74467459
=head1 IMPORTANT USAGE GUIDELINES
74477460
@@ -7493,6 +7506,7 @@ =head1 OUTPUT OPTIONS
74937506
--verbose Print out all options (default: no verbose, dbstat, idxstat, sysstat, tbstat, pfstat)
74947507
--color Print output in color
74957508
--nocolor Don't print output in color
7509+
--noprettyicon Print output with legacy tag [OK], [!!], [--], [CMD], ...
74967510
--nogood Remove OK responses
74977511
--nobad Remove negative/suggestion responses
74987512
--noinfo Remove informational responses

0 commit comments

Comments
 (0)