Bug #83159 mysql-binary-log-events-1.0.2-labs FindMySQL.cmake points to wrong dir
Submitted: 27 Sep 2016 5:47 Modified: 12 Oct 2016 16:29
Reporter: Emanuel Calvo (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Utilities: Binlog Events Severity:S1 (Critical)
Version:1.0.2-labs OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[27 Sep 2016 5:47] Emanuel Calvo

MyCMake/FindMySQL.cmake is pointing to MYSQL_INCLUDE_DIR, which is actually MYSQL_SOURCE_INCLUDE_DIR.

Set as S1 as it does not compile.

How to repeat:

Suggested fix:
[27 Sep 2016 9:55] MySQL Verification Team
Hello Emanuel Calvo,

Thank you for the report and feedback!
I discussed this issue internally with the developer and concluded that this is an expected behavior and it is assumed that prior to compiling user needs to set  set the  environment variable MYSQL_SOURCE_INCLUDE_DIR=<mysql-5.7.x source code>/include. If MYSQL_SOURCE_INCLUDE_DIR is not specified through command line, then it will be uninitialized.  This is mentioned in the dev article as well - http://mysqlhighavailability.com/mysql-binlog-events-reading-and-handling-information-from...

[27 Sep 2016 12:57] Emanuel Calvo
Hi Umesh,

sorry if there were a lack of info on the bug. I'm attaching the patch (event though I didn't sign yet the OCA.

I do know that you need to specify both variables to compile and that's the reason on why I submitted the bug, as MyCmake/FindMySQL.cmake instead of pointing to MYSQL_SOURCE_INCLUDE_DIR has a wrong reference to MYSQL_INCLUDE_DIR, which is not mentioned in docs (I applied the change and compiled). Actually it has sense that FindMySQL points to MYSQL_SOURCE_INCLUDE_DIR instead, as it is the current include used for compilation. 

The fix would be changing the variable _or_ add to the CMakeLists.txt an assignment like:


I'm attaching the patch right after this comment.

[27 Sep 2016 12:59] Emanuel Calvo
patch for FindMySQL.cmake

Attachment: patch_FindMySQL.cmake.diff (application/octet-stream, text), 9.78 KiB.

[28 Sep 2016 6:24] MySQL Verification Team
Thank you, Emanuel for the contribution. Please be informed that in order to submit contributions you must first sign the Oracle Contribution Agreement (OCA). For additional information please check http://www.oracle.com/technetwork/community/oca-486395.html.
If you have any questions, please contact the MySQL community team - http://www.mysql.com/about/contact/?topic=community.
[12 Oct 2016 16:29] Emanuel Calvo
Hi Umesh, I already submitted the OCA. Please let me know if any other requirements need to be addressed. Thanks!