[MDEV-6873] On startup please make MariaDB report it's version number Created: 2014-10-15  Updated: 2020-07-23  Resolved: 2015-10-29

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 5.5.43, 10.0.19, 10.1.5

Type: Task Priority: Trivial
Reporter: Simon J Mudd Assignee: Sergei Golubchik
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Relates
relates to MDEV-9593 Print the real version in the error log Closed
relates to MDEV-10967 Print the real version in the error l... Closed
relates to MDEV-17093 Print version_source_revision in the ... Closed
relates to MDEV-21046 Print server version to error log ins... Open
relates to MDEV-10648 mysqld --log-error prints on stdout a... Confirmed
relates to MDEV-20287 Have the server process print a "star... Open
relates to MDEV-20344 startup messages belong in stderr/err... Closed
relates to MDEV-21711 Log: "Server Version xx.xx.xx startin... Open

 Description   

This may seem really silly but MySQL starts up but doesn't as the first thing that it does report it's version number. If starting up normally the startup time is pretty short so you'll later see this reported once it's listening for connections.

If the startup takes time, for example on recovery from a crash, you can not be sure which version is actually running.

A recently lockup triggered me to kill -9 <mysqld_pid> and then upgrade the binaries. I couldn't check from logging for the first 20 minutes if the new binary was the one I expected to be running.

It's trivial to do this so please make MariaDB report its version number as one of the very first things that it does. Then there's never any confusion.

[root@myhost ~]# /etc/init.d/mysql  start
Starting MySQL.141015 10:03:57 mysqld_safe Starting mysqld_wrapper daemon with databases from /path/to/datadir
...........................141015 10:04:25 [Note] InnoDB: Using mutexes to ref count buffer pool pages
141015 10:04:25 [Note] InnoDB: The InnoDB memory heap is disabled
141015 10:04:25 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
141015 10:04:25 [Note] InnoDB: Memory barrier is not used
141015 10:04:25 [Note] InnoDB: Compressed tables use zlib 1.2.3
141015 10:04:25 [Note] InnoDB: Using Linux native AIO
141015 10:04:25 [Note] InnoDB: Using CPU crc32 instructions
141015 10:04:25 [Note] InnoDB: Initializing buffer pool, size = 225.0G
...........141015 10:04:36 [Note] InnoDB: Completed initialization of buffer pool
...141015 10:04:39 [Note] InnoDB: Highest supported file format is Barracuda.
141015 10:04:39 [Note] InnoDB: Log scan progressed past the checkpoint lsn 250094936720745
141015 10:04:39 [Note] InnoDB: Database was not shutdown normally!
141015 10:04:39 [Note] InnoDB: Starting crash recovery.
141015 10:04:39 [Note] InnoDB: Reading tablespace information from the .ibd files...
.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Recovery is still ongoing and I still can't be sure from logging which version is actually running now.



 Comments   
Comment by Simon J Mudd [ 2014-10-15 ]

... skip some more logging ...
141015 10:24:46 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.0.14-MariaDB-log'  socket: 'mysql.sock'  port: 3306  MariaDB Server

So it took me 20 minutes to know which version of mysql was actually running.
It would be helpful to log this information much earlier.

Generated at Thu Feb 08 07:15:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.