Bug #91538 In sql/events.h the header guard should be _EVENTS_H_
Submitted: 3 Jul 2018 13:46 Modified: 5 Dec 2019 13:40
Reporter: Peter Edwards Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Compiling Severity:S4 (Feature request)
Version:All since 2006 OS:Any
Assigned to: CPU Architecture:Any

[3 Jul 2018 13:46] Peter Edwards
Description:
The include guard `_EVENT_H_` is used in 2 different header files.
https://github.com/mysql/mysql-server/commit/1d1e9d10b6fa27c433e71c5270818ea81e8f72ea 
in 2006 renamed `sql/event.h` to `sql/events.h` but kept the same header guard `_EVENT_H_`.

`extra/libevent/event.h` (previously `libevent/event.h`, previously `plugin/innodb_memcached/libevent/event.h`) also uses `_EVENT_H_`.

I think `sql/events.h` could use `_EVENTS_H_` to be consistent with convention to match the filename, and to avoid any confusion or potential clashes when building with the bundled `libevent`.
 
As reported on https://lgtm.com/projects/g/mysql/mysql-server/alerts/?mode=list&lang=cpp&severity=error 

How to repeat:
Search code base for _EVENT_H_ , check it is only found in one file.

Suggested fix:
I think `sql/events.h` could use `_EVENTS_H_` to be consistent with convention to match the filename, and to avoid any confusion or potential clashes when building with the bundled `libevent`.
[5 Dec 2019 13:40] MySQL Verification Team
Hi Mr. Edwards.

I am verifying your feature request.