Bug #78855 -V fails vs --version
Submitted: 16 Oct 2015 1:28 Modified: 16 Oct 2015 4:48
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.6,5.7 OS:Any
Assigned to: CPU Architecture:Any

[16 Oct 2015 1:28] Roel Van de Paar
Description:
[roel@localhost mysql-5.6.23-linux-x86_64]$ ./bin/mysqld --help --verbose 2>&1 | grep "\-V"
  -V, --version       Output version information and exit.

-V should be equal to --version, yet...

[roel@localhost mysql-5.6.23-linux-x86_64]$ ./bin/mysqld --version
./bin/mysqld  Ver 5.6.23-debug for Linux on x86_64 (MySQL Community Server (GPL))
[roel@localhost mysql-5.6.23-linux-x86_64]$ ./bin/mysqld --V
2015-10-16 12:18:22 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-10-16 12:18:22 32557 [ERROR] Can't find messagefile '/usr/local/mysql/share/errmsg.sys'
2015-10-16 12:18:22 32557 [Warning] Can't create test file /usr/local/mysql/data/localhost.lower-test
2015-10-16 12:18:22 32557 [Warning] Can't create test file /usr/local/mysql/data/localhost.lower-test
./bin/mysqld: Can't change dir to '/usr/local/mysql/data/' (Errcode: 2 - No such file or directory)
2015-10-16 12:18:22 32557 [ERROR] Aborting

2015-10-16 12:18:22 32557 [Note] Binlog end
2015-10-16 12:18:22 32557 [Note]

How to repeat:
Use -V on mysqld
[16 Oct 2015 4:33] Umesh Shastry
Hello Roel,

Thank you for the report.
There is a typo in your command(extra '-' prefixed with -V) which is causing the issue.

// confirmed that -V and --version works as expected

// 5.6

[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.6.27: bin/mysqld --help --verbose 2>&1 | grep "\-V"
  -V, --version       Output version information and exit.
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.6.27: bin/mysqld --version
bin/mysqld  Ver 5.6.27-enterprise-commercial-advanced for linux-glibc2.5 on x86_64 (MySQL Enterprise Server - Advanced Edition (Commercial))
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.6.27:
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.6.27: bin/mysqld -V
bin/mysqld  Ver 5.6.27-enterprise-commercial-advanced for linux-glibc2.5 on x86_64 (MySQL Enterprise Server - Advanced Edition (Commercial))
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.6.27:

// 5.7

[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10: bin/mysqld --help --verbose 2>&1 | grep "\-V"
  -V, --version       Output version information and exit.
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10: bin/mysqld --version
bin/mysqld  Ver 5.7.10-enterprise-commercial-advanced for Linux on x86_64 (MySQL Enterprise Server - Advanced Edition (Commercial))
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10:
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10: bin/mysqld -V
bin/mysqld  Ver 5.7.10-enterprise-commercial-advanced for Linux on x86_64 (MySQL Enterprise Server - Advanced Edition (Commercial))
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10:

Thanks,
Umesh
[16 Oct 2015 4:48] Roel Van de Paar
Looser bug of the year :) 

Thanks Umesh !
[16 Oct 2015 4:48] Roel Van de Paar
Looser bug of the year :) 

Thanks Umesh !