[MDEV-12597] mysqld --version prints unrelated messages Created: 2017-04-27  Updated: 2017-05-04  Resolved: 2017-05-04

Status: Closed
Project: MariaDB Server
Component/s: Configuration
Affects Version/s: 10.2.5
Fix Version/s: 10.2.6

Type: Bug Priority: Major
Reporter: Andrii Nikitin (Inactive) Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: 10.2-ga

Issue Links:
Relates
relates to MDEV-12650 option 'server_id': unsigned value 0 ... Closed

 Description   

These are way too verbose.

$ 10.2.5/bin/mysqld --version
2017-04-27  7:52:03 140501412242944 [Warning] option 'server_id': unsigned value 0 adjusted to 1
10.2.5/bin/mysqld  Ver 10.2.5-MariaDB-log for Linux on x86_64 (MariaDB Server)
2017-04-27  7:52:03 140501412242944 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set

This is rather cosmetic issue but may also lead to problems in setups which rely on parsing of --version output
10.1 and 5.7.18 doesn't show this problem in identical configuration

$ 10.1.22/bin/mysqld --version
10.1.22/bin/mysqld  Ver 10.1.22-MariaDB for Linux on x86_64 (MariaDB Server)
$ 5.7.18/bin/mysqld --version
5.7.18/bin/mysqld  Ver 5.7.18 for linux-glibc2.5 on x86_64 (MySQL Community Server (GPL))



 Comments   
Comment by Andrii Nikitin (Inactive) [ 2017-04-27 ]

It looks the problem present in 10.1 as well, just it doesn't trigger in default configuration:

$ 10.1.22/bin/mysqld --version --log-queries-not-using-indexes=1
10.1.22/bin/mysqld  Ver 10.1.22-MariaDB for Linux on x86_64 (MariaDB Server)
2017-04-27  8:04:11 139934258677312 [Warning] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set

Comment by Andrii Nikitin (Inactive) [ 2017-04-27 ]

I see three problems:
1. --version shouldn't check correctness of configuration (let it be checked with --help for example). This is change in behavior, but rather 'corrected behavior, as the only purpose of --version is to report version.

2. --no-defaults --help shouldn't give any warnings (i.e. default configuration shouldn't have conflicts)

10.2.5/bin/mysqld --no-defaults --help > 1
2017-04-27  9:08:04 140696737932800 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set

3. The warning above is meaningless if default values for these variables is ON . Thus I propose just remove that check from code.

Comment by Elena Stepanova [ 2017-05-01 ]

For points 2-3 (they are basically the same, 2 is the general rule and 3 is its violation) we had MDEV-11908, which is closed now, but apparently the "fix" was just converting a warning into a note. I don't think it's critically important whether a note appears in the error log (although it's still strange), but it most certainly shouldn't pop up upon help or version. I agree it's 10.2-ga.

Point 1 is more general, it might be better to postpone it till after GA or till the next major release.

Another somewhat related (and still open) issue is MDEV-10648.

Comment by Andrii Nikitin (Inactive) [ 2017-05-01 ]

I've created new bug MDEV-12650 related to server_id , as the problem appears to be even bigger issue

After all general Point 1 is current behavior as mysqld doesn't really verify parameters with --version (which I consider good behavior):

10.2.5/bin/mysqld --version --key-buffer-size=12800000000G --innodb-buffer-size=128000G --dsfsadf --plugin-load=xyz
2017-05-01  8:26:22 140643309708800 [Warning] option 'server_id': unsigned value 0 adjusted to 1
10.2.5/bin/mysqld  Ver 10.2.5-MariaDB-log for Linux on x86_64 (MariaDB Server)
2017-05-01  8:26:22 140643309708800 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set

This brings even stronger reasoning to why # 3. and MDEV-12650 must be fixed.

Indeed #3 is violation of #2, but it must be fixed (with new defaults) even if it wasn't (or if #2 wouldn't be accepted as common rule).

Comment by Vladislav Vaintroub [ 2017-05-04 ]

Removed warning about log_slow_statements, as it is not valid anymore for 10.2 (defaults are set such that it would always be generated).
The server_id is something else, it does not happen with default settings.

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