Bug #39117 "plugin_load" option not documented
Submitted: 29 Aug 2008 11:19 Modified: 11 Nov 2008 16:07
Reporter: Giuseppe Maxia Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.28 OS:Any
Assigned to: Tatiana Azundris Nuernberg CPU Architecture:Any
Tags: documentation, option, server, startup

[29 Aug 2008 11:19] Giuseppe Maxia
Description:
The MySQL server has an undocumented option ("plugin_load" or "plugin-load"), which installs one or more plugins without need to invoke "INSTALL PLUGIN" at run time.

mysqld --help --verbose

...
  --plugin_load=name  Optional colon separated list of plugins to load, where
                      each plugin is identified by name and path to library
                      seperated by an equals.
...

There is a brief mention of this option in the 5.1.18 change log.

In the documentation, the following items should be noted:

* although the help mentions "path to library", only the library *name* must
  be given. Giving the full path results in an error.
  (The help text should be changed, and s/seperated/separated/)

* The only way of passing more plugins is by means of a colon separated list. 
  Multiple instances of the option are not accepted.
  Unlike other options (e.g. replicate-do-table) only the last occurrence is
  considered.

* INSTALL PLUGIN will add an entry in mysql.plugin. Meaning that the installed
  plugins will be available after a restart. The effects of "plugin-load" are
  not permanent. After a restart, the plugin is not loaded unless "plugin_load"
  is used.

How to repeat:
search the manual for "plugin_load"
[1 Sep 2008 20:09] Sergei Golubchik
Paul, don't forget to document the rationale for this option. It's in WL, but in short - to allow one to load certain plugins when --skip-grants is specified (as skip-grants disables loading of system tables). Also - to support a setup when plugins are loaded from my.cnf and nobody, not even mysql root user, can load anything run-time.
[5 Sep 2008 16:08] Paul DuBois
I have updated the reference manual to describe the --plugin-load option. Changing the bug category to Server: General because the option structure in mysql.cc needs to be modified.  I suggest a patch below which makes these changes:

* plugin_load is an option, not a system variable. Options conventionally use dashes (not underscores) in their names, so the patch changes plugin_load to plugin-load. (This will have no operational effect, the server allows users to specify either character.
* The help text is modified not to suggest that the plugin library is a pathname

=== modified file 'sql/mysqld.cc'
--- sql/mysqld.cc	2008-08-26 09:31:17 +0000
+++ sql/mysqld.cc	2008-09-05 16:03:19 +0000
@@ -6647,9 +6647,10 @@ The minimum value for this variable is 4
    "Directory for plugins.",
    (uchar**) &opt_plugin_dir_ptr, (uchar**) &opt_plugin_dir_ptr, 0,
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-  {"plugin_load", OPT_PLUGIN_LOAD,
-   "Optional colon separated list of plugins to load, where each plugin is "
-   "identified by name and path to library seperated by an equals.",
+  {"plugin-load", OPT_PLUGIN_LOAD,
+   "Optional colon-separated list of plugins to load, where each plugin is "
+   "identified as name=library, where name is the plugin name and library "
+   "is the plugin library in plugin_dir.",
    (uchar**) &opt_plugin_load, (uchar**) &opt_plugin_load, 0,
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {"preload_buffer_size", OPT_PRELOAD_BUFFER_SIZE,
[5 Sep 2008 16:08] Paul DuBois
Unassigning myself from bug report.
[30 Sep 2008 9:46] 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/54747

2741 Tatiana A. Nurnberg	2008-09-30
      Bug#39117 "plugin_load" option not documented
      
      correct text describing the --plugin-load option to mysqld
[4 Nov 2008 10:05] 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/57757

2692 Tatiana A. Nurnberg	2008-11-04
      Bug#39117 "plugin_load" option not documented
      
      correct text describing the --plugin-load option to mysqld
[4 Nov 2008 11:34] Tatiana Azundris Nuernberg
PQ 5.1.30-bugteam, 6.0.8-bugteam
[10 Nov 2008 10:54] Bugs System
Pushed into 6.0.8-alpha  (revid:azundris@mysql.com-20081104100026-8frxh74iy0x2x0a1) (version source revid:mattias.jonsson@sun.com-20081104113554-s9cs5edr161qjg78) (pib:5)
[10 Nov 2008 11:37] Bugs System
Pushed into 5.1.30  (revid:azundris@mysql.com-20081104100026-8frxh74iy0x2x0a1) (version source revid:mattias.jonsson@sun.com-20081104113355-1xg11r9sdp0k6ovj) (pib:5)
[10 Nov 2008 19:10] Paul DuBois
Cosmetic change. No changelog entry needed.
[19 Jan 2009 11:33] Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090119095303-uwwvxiibtr38djii) (version source revid:tomas.ulin@sun.com-20090108105244-8opp3i85jw0uj5ib) (merge vers: 5.1.31-ndb-6.2.17) (pib:6)
[19 Jan 2009 13:10] Bugs System
Pushed into 5.1.31-ndb-6.3.21 (revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (version source revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (merge vers: 5.1.31-ndb-6.3.21) (pib:6)
[19 Jan 2009 16:15] Bugs System
Pushed into 5.1.31-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (version source revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (merge vers: 5.1.31-ndb-6.4.1) (pib:6)