Bug #82327 Bad include guard in sql_alter_instance.h
Submitted: 22 Jul 2016 21:45 Modified: 23 Jul 2016 6:56
Reporter: David Gow Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.7 git, 5.7.13 OS:Any
Assigned to: CPU Architecture:Any
Tags: include, minor

[22 Jul 2016 21:45] David Gow
Description:
The include guard in sql/sql_alter_instance.h is misspelt. In the "#ifndef" line, it is spelt correctly: SQL_ALTER_INSTANCE_INCLUDED, but in the next line it is spelt SQL_ALTER_INSTNACE_INCLUDED. This prevents it from working as a correct include guard.

Clang SVN outputs the following:

In file included from sql/sql_alter_instance.cc:16:
/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
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
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

How to repeat:
Look at 
https://github.com/mysql/mysql-server/blob/5.7/sql/sql_alter_instance.h#L17

Suggested fix:
Correct the spelling so that the second line matches the first.
[23 Jul 2016 6:56] MySQL Verification Team
Hello David Gow,

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

Thanks,
Umesh