From: paul
Date: December 7 2005 3:40pm
Subject: svn commit - mysqldoc@docsrva: r513 - in trunk: . refman-5.1 refman-common
List-Archive: http://lists.mysql.com/commits/17
Message-Id: <200512071540.jB7Fe3YM032401@docsrva.mysql.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: paul
Date: 2005-12-07 16:40:02 +0100 (Wed, 07 Dec 2005)
New Revision: 513
Log:
r4568@frost: paul | 2005-12-07 09:16:58 -0600
Preliminary plugin stuff.
Modified:
trunk/
trunk/refman-5.1/extending-mysql.xml
trunk/refman-common/titles.en.ent
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:4567
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:1505
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:4568
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:1505
Modified: trunk/refman-5.1/extending-mysql.xml
===================================================================
--- trunk/refman-5.1/extending-mysql.xml 2005-12-07 15:39:50 UTC (rev 512)
+++ trunk/refman-5.1/extending-mysql.xml 2005-12-07 15:40:02 UTC (rev 513)
@@ -475,6 +475,226 @@
+
+
+ &title-plugin-api;
+
+
+ plugin API
+
+
+
+ plugins
+ adding
+
+
+
+ Also to mention: Note the API in the 5.1 upgrading section. Point
+ out that if you're upgrading, you must upgrade the grant tables by
+ running mysql_fix_privilege_tables to make sure the mysql.plugin
+ table exists. Describe the interface functions. Add change note
+ for I.P./U.P. in 5.1.3 changelog.
+
+
+
+
+
+ MySQL 5.1 provides a plugin interface that can be used to add new
+ functions to the server. This interface is the successor to the
+ older user-defined function (UDF) interface. It is intended that
+ the UDF interface will be phased out.
+
+
+
+
+ &title-install-plugin;
+
+
+ INSTALL PLUGIN
+
+
+
+ installing plugins
+
+
+
+ plugins
+ installing
+
+
+
+
+
+ INSTALL PLUGIN
+
+
+
+
+
+INSTALL PLUGIN plugin_name SONAME 'plugin_library'
+
+
+
+
+
+
+
+ This statement installs a plugin.
+
+
+
+ plugin_name is the name of the plugin
+ as defined in the plugin declaration structure contained in the
+ library file.
+
+
+
+ Is plugin_name case sensitive? Or is case sensitivity a function
+ of the host system filename semanitics?
+
+
+
+ plugin_library is the name of the
+ shared library that contains the plugin code. The name includes
+ the filename extension (for example,
+ libmyplugin.so or
+ libmyplugin.dylib).
+
+
+
+ What is the library name on Windows? libmyplugin.dll?
+
+
+
+ The shared library must be located in the plugin directory (that
+ is, the directory named by the plugin_dir
+ system variable). The library must be in the plugin directory
+ itself, not in a subdirectory. By default,
+ plugin_dir is the directory named by the
+ pkglibdir configuration variable, but it can
+ be changed by setting the value of plugin_dir
+ at server startup. For example, set its value in a
+ my.cnf file:
+
+
+
+[mysqld]
+plugin_dir=/path/to/plugin/directory
+
+
+
+ If the value of plugin_dir is a relative
+ pathname, it is taken to be relative to the MySQL base directory
+ (the value of the basedir system variable).
+
+
+
+ INSTALL PLUGIN adds a line to the
+ mysql.plugin table that describes the
+ plugin. Currently, this table contains only
+ the plugin name and library filename.
+
+
+
+ INSTALL PLUGIN also loads and initializes the
+ plugin code to make the plugin available for use. A plugin is
+ initialized by executing its initialization function, which
+ handles any setup that the plugin must perform before it can be
+ used.
+
+
+
+ To use INSTALL PLUGIN, you must have the
+ INSERT privilege for the
+ mysql.plugin table.
+
+
+
+ At server startup, the server loads and initializes any plugin
+ that is listed in the mysql.plugin table.
+ This means that a plugin is installed with INSTALL
+ PLUGIN only once, not every time the server starts.
+ Plugin loading at startup does not occur if the server is
+ started with the option.
+
+
+
+ When the server shuts down, it executes the termination
+ (deinit()) function for each plugin that is
+ loaded so that the plugin has a change to perform any final
+ cleanup.
+
+
+
+ To remove a plugin entirely, use the UNINSTALL
+ PLUGIN statement:
+
+
+
+
+
+
+
+
+ &title-uninstall-plugin;
+
+
+ UNINSTALL PLUGIN
+
+
+
+ uninstalling plugins
+
+
+
+ plugins
+ uninstalling
+
+
+
+
+
+ UNINSTALL PLUGIN
+
+
+
+
+
+UNINSTALL PLUGIN plugin_name
+
+
+
+
+
+
+
+ This statement removes an installed plugin.
+
+
+
+ plugin_name must be the name of some
+ plugin that is listed in the
+ mysql.plugin table. The server
+ executes the plugin's termination (deinit())
+ function. It also removes the row for the plugin from the
+ mysql.plugin table, so that subsequent server
+ restarts will not load and initialize the plugin.
+ UNINSTALL PLUGIN does not remove the plugin's
+ shared library file.
+
+
+
+ To use UNINSTALL PLUGIN, you must have the
+ DELETE privilege for the
+ mysql.plugin table.
+
+
+
+
+
+
+
+
&title-adding-functions;
@@ -504,6 +724,8 @@
user-defined
+
+
There are two ways to add new functions to MySQL:
@@ -675,8 +897,6 @@
user-defined
-
-
Modified: trunk/refman-common/titles.en.ent
===================================================================
--- trunk/refman-common/titles.en.ent 2005-12-07 15:39:50 UTC (rev 512)
+++ trunk/refman-common/titles.en.ent 2005-12-07 15:40:02 UTC (rev 513)
@@ -556,6 +556,7 @@
INSERT DELAYED Syntax">
INSERT ... SELECT Syntax">
INSERT Statements">
+INSTALL PLUGIN Syntax">
@@ -1327,6 +1328,7 @@
+
@@ -1609,6 +1611,7 @@
+UNINSTALL PLUGIN Syntax">
UNION Syntax">
FROM clause">