Deb: Rename mysqlreport to mariadb-report, fix regression in 9e1b3af4a

This was partially already done in 9e1b3af4a4
as the symlink mysqlreport pointed to mariadb-report. There just was no
script with that name, so this rename complements it and now both
mariadb-report and mysqlreport work again.
This commit is contained in:
Otto Kekäläinen
2020-04-08 20:26:11 +03:00
committed by Vicențiu-Marian Ciorbaru
parent 7fe2dddb0f
commit 13ec2ecc99
6 changed files with 26 additions and 24 deletions

View File

@ -1,9 +1,10 @@
#!/usr/bin/perl -w #!/usr/bin/perl -w
# mysqlreport v4.0 Oct 23 2015 # mariadb-report v4.0 Oct 23 2015
# renamed to from mysqlreport in 2020
# http://hackmysql.com/mysqlreport # http://hackmysql.com/mysqlreport
# mysqlreport makes an easy-to-read report of important MySQL/MariaDB status values. # mariadb-report makes an easy-to-read report of important MySQL/MariaDB status values.
# Copyright 2006-2008 Daniel Nichter # Copyright 2006-2008 Daniel Nichter
# Copyright 2012-2015 Jean Weisbuch # Copyright 2012-2015 Jean Weisbuch
# #
@ -115,8 +116,8 @@ if($op{'detach'})
if(fork()) if(fork())
{ {
print "mysqlreport has forked and detached.\n"; print "mariadb-report has forked and detached.\n";
print "While running detached, mysqlreport writes reports to '$tmpfile'.\n"; print "While running detached, mariadb-report writes reports to '$tmpfile'.\n";
exit; exit;
} }
@ -148,7 +149,7 @@ if(defined $op{'r'})
{ {
if($relative_live) if($relative_live)
{ {
print STDERR "mysqlreport is writing relative reports to '$tmpfile'.\n" unless $op{'detach'}; print STDERR "mariadb-report is writing relative reports to '$tmpfile'.\n" unless $op{'detach'};
get_MySQL_version(); get_MySQL_version();
collect_reports(); collect_reports();
} }
@ -189,8 +190,8 @@ exit;
sub show_help_and_exit sub show_help_and_exit
{ {
print <<"HELP"; print <<"HELP";
mysqlreport v4.0 Oct 23 2015 mariadb-report v4.0 Oct 23 2015
mysqlreport makes an easy-to-read report of important MySQL/MariaDB status values. mariadb-report makes an easy-to-read report of important MySQL/MariaDB status values.
Command line options (abbreviations work): Command line options (abbreviations work):
--user USER Connect to MySQL as USER --user USER Connect to MySQL as USER
@ -956,14 +957,14 @@ sub make_short
# #
# The format_u_time sub simply beautifies long_query_time. # The format_u_time sub simply beautifies long_query_time.
sub format_u_time # format microsecond (µ) time value sub format_u_time # format microsecond (µ) time value
{ {
# 0.000000 - 0.000999 = 0 - 999 µ # 0.000000 - 0.000999 = 0 - 999 µ
# 0.001000 - 0.999999 = 1 ms - 999.999 ms # 0.001000 - 0.999999 = 1 ms - 999.999 ms
# 1.000000 - n.nnnnnn = 1 s - n.nnnnn s # 1.000000 - n.nnnnnn = 1 s - n.nnnnn s
my $t = shift; my $t = shift;
my $f; # formatted µ time my $f; # formatted µ time
my $u = chr(($WIN ? 230 : 181)); my $u = chr(($WIN ? 230 : 181));
$t = 0 if $t < 0; $t = 0 if $t < 0;
@ -1011,7 +1012,7 @@ sub email_report # Email given report to $op{'email'}
my $report = shift; my $report = shift;
open SENDMAIL, "|/usr/sbin/sendmail -t"; open SENDMAIL, "|/usr/sbin/sendmail -t";
print SENDMAIL "From: mysqlreport\n"; print SENDMAIL "From: mariadb-report\n";
print SENDMAIL "To: $op{email}\n"; print SENDMAIL "To: $op{email}\n";
print SENDMAIL "Subject: $dbms status report on " . ($mycnf{'host'} || 'localhost') . "\n\n"; print SENDMAIL "Subject: $dbms status report on " . ($mycnf{'host'} || 'localhost') . "\n\n";
print SENDMAIL `cat $report`; print SENDMAIL `cat $report`;

2
debian/control vendored
View File

@ -411,7 +411,7 @@ Description: MariaDB database client binaries
ease of use. ease of use.
. .
This package includes the client binaries and the additional tools This package includes the client binaries and the additional tools
innotop and mysqlreport. innotop and mariadb-report (mysqlreport).
Package: mariadb-server-core-10.5 Package: mariadb-server-core-10.5
Architecture: any Architecture: any

View File

@ -1,5 +1,5 @@
debian/additions/innotop/innotop usr/bin/ debian/additions/innotop/innotop usr/bin/
debian/additions/mysqlreport usr/bin/ debian/additions/mariadb-report usr/bin/
usr/bin/mariadb-access usr/bin/mariadb-access
usr/bin/mariadb-admin usr/bin/mariadb-admin
usr/bin/mariadb-conv usr/bin/mariadb-conv

View File

@ -24,3 +24,4 @@ usr/share/man/man1/mariadb-check.1.gz usr/share/man/man1/mariadbcheck.1.gz
usr/share/man/man1/mariadb-check.1.gz usr/share/man/man1/mysqlanalyze.1.gz usr/share/man/man1/mariadb-check.1.gz usr/share/man/man1/mysqlanalyze.1.gz
usr/share/man/man1/mariadb-check.1.gz usr/share/man/man1/mysqloptimize.1.gz usr/share/man/man1/mariadb-check.1.gz usr/share/man/man1/mysqloptimize.1.gz
usr/share/man/man1/mariadb-check.1.gz usr/share/man/man1/mysqlrepair.1.gz usr/share/man/man1/mariadb-check.1.gz usr/share/man/man1/mysqlrepair.1.gz
usr/share/man/man1/mariadb-report.1.gz usr/share/man/man1/mysqlreport.1.gz

View File

@ -1,2 +1,2 @@
debian/additions/innotop/innotop.1 debian/additions/innotop/innotop.1
debian/additions/mysqlreport.1 debian/additions/mariadb-report.1