Bug #31736 Default Plugin dir changed??
Submitted: 21 Oct 2007 14:08 Modified: 16 Apr 2008 19:00
Reporter: Roland Bouman
Status: Closed
Category:Server: Packaging Severity:S2 (Serious)
Version:5.1.22 RC OS:Linux (kubuntu feisty)
Assigned to: Jonathan Perkin Target Version:
Triage: D5 (Feature request)

[21 Oct 2007 14:08] Roland Bouman
Description:
The default plugin dir on 5.1.20 was 

<mysqlhome>/lib/mysql

this directory was not present by default and had to be created by the user.

Now, in 5.1.22, the default seems to be:

<mysqlhome>/lib

Although it is nice that we are not required to create a dir ourselves, I think that
putting user supplied libries in that location is not good practice. Users would have to
mix libs supplied by mysql with libs from their own

How to repeat:
SHOW VARIABLES LIKE '%plugin%';

Suggested fix:
Please, 

if possible my proposal is to change the default for *all* distributions to:

<mysqlhome>/plugins

or otherwise

<mysqlhome>/lib/plugins

at least, don't use 

<mysqlhome>/lib (what it seems to be in 5.1.22)

and certainly not:

<mysqlhome>/lib/mysql 

("mysql" is an extremely undescriptive name in this context)
[22 Oct 2007 11:02] Hartmut Holzgraefe
Looks like a packaging issue?

When doing a regular source compile the plugin_dir is in $prefix/lib/mysql
just as it was in 5.1.20

Which exact packages have you been using for 5.1.20 and .22?
[22 Oct 2007 12:49] Roland Bouman
Hi Hartmut,

using:

mysql-5.1.22-rc-linux-i686-glibc23
[22 Oct 2007 13:26] Miguel Solorzano
Thank you for the bug report.

mysql> SHOW VARIABLES LIKE '%plugin%';
+---------------+----------------------------------------------+
| Variable_name | Value                                        |
+---------------+----------------------------------------------+
| plugin_dir    | C:\Program Files\MySQL\MySQL Server 5.1\lib/ |
+---------------+----------------------------------------------+
1 row in set (0.00 sec)

mysql> select version();
+---------------------+
| version()           |
+---------------------+
| 5.1.22-rc-community |
+---------------------+
1 row in set (0.00 sec)

mysql>
[29 Oct 2007 15:27] Timour Katchaounov
Not a feature request, so changed to P3.
[19 Dec 2007 14:25] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/40206

ChangeSet@1.2645, 2007-12-19 13:24:43+00:00, jperkin@chorlton.adsl.perkin.org.uk +14 -0
  Add new pkgplugindir handling to seperate plugins from libraries,
  and allow override for binary distributions.  Extend mysql_config
  to print compiled-in plugin location for third-party plugins to
  use.  Resolves bug#31736.
[2 Jan 2008 14:00] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/40484

ChangeSet@1.2646, 2008-01-02 13:00:46+00:00, jperkin@chorlton.adsl.perkin.org.uk +11 -0
  Use pkglibdir to simplify pkgplugindir, and fix the path in a
  couple of Makefiles.  Continuation of the fix for bug#31736.
[4 Jan 2008 23:11] Roland Bouman
Please check if this patch would solve http://bugs.mysql.com/bug.php?id=31172

otherwise, maybe this issue should stay open and extended to fix #31172.

Thank you, 

Roland
[5 Mar 2008 1:42] Timothy Smith
A minor mechanical comment:  it's good to use 'bk collapse' when updating a patch, so that
the reviewer can see the complete set of changes in one diff.  And it makes it much easier
to see what's going on when looking through the revision history later.

bk collapse -e -a@SOME-CHANGESET-ID; bk citool&
# Verify that all comments are still there and that things look correct, then commit it
[27 Mar 2008 23:03] Bugs System
Pushed into 5.1.24-rc
[28 Mar 2008 12:10] Bugs System
Pushed into 6.0.5-alpha
[16 Apr 2008 16:30] Paul DuBois
I believe you mean that the default is now lib/mysql/plugin, not lib/plugin?
[16 Apr 2008 16:35] Paul DuBois
Noted in 5.1.24, 6.0.5 changelogs.

The location of the plugin directory for some distributions was lib
under the installation directory rather than the usual location of 
lib/mysql. The location is uniformly lib/mysql/plugin now. 

The current plugin directory location is available as the value of
the plugin_dir system variable as before, but the mysql_config script
now has a --plugindir option that can be used externally to the
server to obtain the default plugin directory pathname.
[16 Apr 2008 18:24] Jonathan Perkin
Ok, to clarify, for packages which are built within their own prefix (e.g.
/usr/local/mysql) the plugin directory will be 'lib/plugin', and for packages which are
built to be installed into a system-wide prefix (such as RPMs with a prefix of /usr), the
plugin directory will be 'lib/mysql/plugin' to ensure a clean /usr/lib hierarchy.  In both
cases, $pkglibdir is used at build time to set the plugin directory, and mysql_config can
be used to find $pkglibdir at runtime for third party plugin writers to configure their
install directory appropriately.
[16 Apr 2008 19:00] Paul DuBois
Updated the changelog entry with jperkin's comment.