From 6fd7a79b051f8b4846217e16f524282d76e05953 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 20 Feb 2020 14:30:29 +0000 Subject: [PATCH] Bug 24696: Add completion times to updatedatabase This patch adds completion times to the print statements in updateadatabase.pl. Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- installer/data/mysql/updatedatabase.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 29affe110e..453d425ee5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21306,21 +21306,23 @@ sub NewVersion { $descriptions = [ $descriptions ]; } my $first = 1; + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); + my $time = sprintf ( "%02d:%02d:%02d", $hour,$min,$sec); for my $description ( @$descriptions ) { if ( @$descriptions > 1 ) { if ( $first ) { unless ( $bug_number ) { - say sprintf "Upgrade to %s done: %s", $DBversion, $description + say sprintf "Upgrade to %s done [%s]: %s", $DBversion, $time, $description; } else { - say sprintf "Upgrade to %s done: Bug %5s - %s", $DBversion, $bug_number, $description; + say sprintf "Upgrade to %s done [%s]: Bug %5s - %s", $DBversion, $time, $bug_number, $description; } } - say sprintf "\t\t\t\t\t- %s", $description + say sprintf "\t\t\t\t\t- %s", $description; } else { unless ( $bug_number ) { - say sprintf "Upgrade to %s done: %s", $DBversion, $description; + say sprintf "Upgrade to %s done [%s]: %s", $DBversion, $time, $description; } else { - say sprintf "Upgrade to %s done: Bug %5s - %s", $DBversion, $bug_number, $description; + say sprintf "Upgrade to %s done [%s]: Bug %5s - %s", $DBversion, $time, $bug_number, $description; } } $first = 0; -- 2.39.5