From ddd275bde7a8edb64449761989d4d472739b3d2a Mon Sep 17 00:00:00 2001 From: "Praveenkumar.Hulakund" Date: Fri, 6 Feb 2015 11:09:08 +0530 Subject: [PATCH] Bug#20052694 - FAILED RESTARTS CONTAIN NO VERSION DETAILS. In versions 5.5 and 5.6 the MySQL version is not logged until server is started and ready to accept connections. Exiting server before this point will not have server version information in the log. But in 5.7 code, we log a server version information just after we prepare server_version string and logging is initialized. For 5.5 and 5.6 code also adding this code to print server version information. Test results: ================ 5.5 ----- Server version will be logged as below on server startup: 141218 8:45:48 [Note] /home/praveen/WorkDir/mysql_local/bug20052694/mysql/sql/mysqld (mysqld 5.5.42-debug-log) starting as process 19697 ... 5.6 ---- Server version will be logged as below on server startup: 2014-12-18 09:08:43 0 [Note] /home/praveen/WorkDir/mysql_local/bug20052694/mysql-5.6/sql/mysqld (mysqld 5.6.23-debug-log) starting as process 18474 ... --- sql/mysqld.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f8f50313dad..c999e0c5a0f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify @@ -3281,6 +3281,9 @@ static int init_common_variables() return 1; set_server_version(); + sql_print_information("%s (mysqld %s) starting as process %lu ...", + my_progname, server_version, (ulong) getpid()); + #ifndef EMBEDDED_LIBRARY if (opt_help && !opt_verbose) unireg_abort(0);