Bug #80718 Broken header guard in sql_alter_instance.h
Submitted: 13 Mar 2016 21:22 Modified: 14 Mar 2016 4:06
Reporter: Gwynne Raskind Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7.11 OS:Any
Assigned to: CPU Architecture:Any
Tags: sourcecode

[13 Mar 2016 21:22] Gwynne Raskind
Description:
When building MySQL 5.7.11 from source, Clang provides the following warning caused by a transposition typo in the header guard.

In file included from ./mysql-5.7.11/sql/sql_alter_instance.cc:16:
./mysql-5.7.11/sql/sql_alter_instance.h:16:9: warning: 'SQL_ALTER_INSTANCE_INCLUDED' is used as a header guard here, followed by
      #define of a different macro [-Wheader-guard]
#ifndef SQL_ALTER_INSTANCE_INCLUDED
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./mysql-5.7.11/sql/sql_alter_instance.h:17:9: note: 'SQL_ALTER_INSTNACE_INCLUDED' is defined here; did you mean
      'SQL_ALTER_INSTANCE_INCLUDED'?
#define SQL_ALTER_INSTNACE_INCLUDED
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
        SQL_ALTER_INSTANCE_INCLUDED
1 warning generated.

This has no ill effect at present, but future changes to header ordering or inclusion could cause it to produce build errors (or, though extremely unlikely, silently provide incorrect definitions in the compiled code).

How to repeat:
Build MySQL 5.7.11 from source with the default build settings using Clang 3.6 or later.

Suggested fix:
Fix the transposed characters in the #define statement.
[13 Mar 2016 21:24] Gwynne Raskind
-
[13 Mar 2016 21:24] Gwynne Raskind
Fixing my own transposition typo in the bug synopsis!
[14 Mar 2016 4:06] Umesh Shastry
Hello!

Thank you for the report.
This is duplicate of Bug #80410, please see Bug #80410

Thanks,
Umesh