Description:
The manual page on "Writing Plugins" [1] says that the general plugin header file should be included as
#include <mysql/plugin.h>
(see also discussions on bug #17117 [2])
The binary tarball distributions have all header files, including plugin.h, under $prefix/include right away instead of $prefix/include/mysql, and so the <mysql/plugin.h> include won't work with these
[1] http://dev.mysql.com/doc/refman/5.1/en/plugin-writing.html
[2] http://bugs.mysql.com/bug.php?id=17117
How to repeat:
Try to write and compile a standalone plugin against a binary tarball installation and see it fail on including <mysql/plugin.h>
The same works fine with RPM or from-source installs and also with plugins directly bundled with the server code.
Suggested fix:
Put header files in $prefix/include/mysql subdirectory in binary tarballs the same way as with all(?) other install formats.
As include paths should be taken from mysql_config output anyway which would change accordingly with the changed config this should not cause any problems with user projects (unless their include paths are hard coded, which would have been a violation of best practice anyway to begin with ...)