Bug #80410 typo in mysql-server/sql/sql_alter_instance.h
Submitted: 17 Feb 2016 14:02 Modified: 7 Jun 2016 19:48
Reporter: Richard Prohaska Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:5.7.11 OS:Any
Assigned to: Craig Russell CPU Architecture:Any

[17 Feb 2016 14:02] Richard Prohaska
Description:
There is a typo in the guard in sql/sql_alter_instance.h that causes a clang warning.

In file included from /home/rfp/projects/mysql.57.tsan/mysql-server/sql/sql_admin.cc:35:
/home/rfp/projects/mysql.57.tsan/mysql-server/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-guar\
d]
#ifndef SQL_ALTER_INSTANCE_INCLUDED
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rfp/projects/mysql.57.tsan/mysql-server/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
[ 81%] 1 warning generated.

How to repeat:
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Debug ......
make

Suggested fix:
diff --git a/sql/sql_alter_instance.h b/sql/sql_alter_instance.h
index 1841fbe..7eccee0 100644
--- a/sql/sql_alter_instance.h
+++ b/sql/sql_alter_instance.h
@@ -14,7 +14,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
 #ifndef SQL_ALTER_INSTANCE_INCLUDED
-#define SQL_ALTER_INSTNACE_INCLUDED
+#define SQL_ALTER_INSTANCE_INCLUDED
 
 class THD;
 /*
[18 Feb 2016 5:28] MySQL Verification Team
Hello Richard Prohaska,

Thank you for the report.

In order to submit contributions you must first sign the Oracle Contribution Agreement (OCA).
For additional information please check http://www.oracle.com/technetwor /community/oca-486395.html. If you have any questions, please contact the MySQL community team - http://www.mysql.com/about/contact/?topic=community.

Thanks,
Umesh
[26 Feb 2016 9:51] Laurynas Biveinis
It's a two-characters-swapped typo. It shouldn't require an OCA in the first place, and just fixing it should be much more productive rather than asking the reporter to sign the agreement :)
[26 Feb 2016 9:51] Laurynas Biveinis
Bug 80410 fix

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: bug80410.patch (application/octet-stream, text), 444 bytes.

[14 Mar 2016 4:07] MySQL Verification Team
Bug #80718 marked as duplicate of this one
[7 Jun 2016 19:48] Craig Russell
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[23 Jul 2016 6:56] MySQL Verification Team
Bug #82327 marked as duplicate of this