Bug #58048 building plugins against binary tarball releases does not work as documented
Submitted: 8 Nov 2010 12:13 Modified: 8 Nov 2010 12:13
Reporter: Hartmut Holzgraefe Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1 OS:Linux
Assigned to: CPU Architecture:Any

[8 Nov 2010 12:13] Hartmut Holzgraefe
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 ...)
[8 Nov 2010 12:56] Hartmut Holzgraefe
overlaps with bug #51925, not sure whether it's a full duplicate