Bug #31736 Default Plugin dir changed??
Submitted: 21 Oct 2007 12:08 Modified: 18 Jun 2010 5:24
Reporter: Roland Bouman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S2 (Serious)
Version:5.1.22 RC OS:Linux (kubuntu feisty)
Assigned to: Jonathan Perkin CPU Architecture:Any

[21 Oct 2007 12: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 9: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 10:49] Roland Bouman
Hi Hartmut,

using:

mysql-5.1.22-rc-linux-i686-glibc23
[22 Oct 2007 11:26] MySQL Verification Team
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 14:27] Timour Katchaounov
Not a feature request, so changed to P3.
[19 Dec 2007 13: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 13: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 22: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 0: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 22:03] Bugs System
Pushed into 5.1.24-rc
[28 Mar 2008 11:10] Bugs System
Pushed into 6.0.5-alpha
[16 Apr 2008 14:30] Paul DuBois
I believe you mean that the default is now lib/mysql/plugin, not lib/plugin?
[16 Apr 2008 14: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 16: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 17:00] Paul DuBois
Updated the changelog entry with jperkin's comment.
[5 May 2010 15:23] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 3:05] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[28 May 2010 5:51] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:21] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 6:49] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[30 May 2010 1:05] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[17 Jun 2010 11:52] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:30] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:17] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[18 Jun 2010 5:24] MC Brown
No additional changelog entries required.