From: paul Date: December 16 2005 12:02am Subject: svn commit - mysqldoc@docsrva: r571 - in trunk: . refman-5.1 List-Archive: http://lists.mysql.com/commits/193 Message-Id: <200512160002.jBG02BLU005767@docsrva.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author: paul Date: 2005-12-16 01:02:11 +0100 (Fri, 16 Dec 2005) New Revision: 571 Log: r4806@frost: paul | 2005-12-15 16:06:57 -0600 UDFs in 5.1 must be in the plugin directory. Note some restrictions on uninstalling plugins. Modified: trunk/ trunk/refman-5.1/extending-mysql.xml Property changes on: trunk ___________________________________________________________________ Name: svk:merge - b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:4780 bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:1671 + b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:4806 bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:1671 Modified: trunk/refman-5.1/extending-mysql.xml =================================================================== --- trunk/refman-5.1/extending-mysql.xml 2005-12-16 00:01:23 UTC (rev 570) +++ trunk/refman-5.1/extending-mysql.xml 2005-12-16 00:02:11 UTC (rev 571) @@ -496,10 +496,15 @@ MySQL 5.1 and up 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. (Eventually, - the older interface will be phased out and replaced by a plugin - interface for UDFs.) + add new functions to the server. This interface is intended to be + the successor to the older user-defined function (UDF) interface. + The plugin interface eventually will include an API for creating + UDFs, and it is intended this plugin UDF API will replace the + older non-plugin UDF API. After that point, it will be possible + for UDFs to be revised for use as plugin UDFs so that they can + take advantage of the better security and versioning capabilities + of the plugin API. Eventually, support for the older UDF API will + be phased out. @@ -634,10 +639,9 @@ - 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. + When the server shuts down, it executes the deinitialization + function for each plugin that is loaded so that the plugin has a + change to perform any final cleanup. @@ -683,7 +687,8 @@ - This statement removes an installed plugin. + This statement removes an installed plugin. You cannot uninstall + a plugin if any table that uses it is open. @@ -706,6 +711,25 @@ + + Plugin removal has implications for the use of associated + tables. For example, if a full-text parser plugin is associated + with a FULLTEXT index on the table, + uninstalling the plugin makes the table unusable. The table + cannot be opened, so you cannot drop the index for which the + plugin is used. This means that uninstalling a plugin is + something to do with care unless you do not care about the table + contents. If you are uninstalling a plugin with no intention of + reinstalling it later (for example, to update it with a new + version), and you care about the table contents, you should dump + the table with mysqldump and remove the + WITH PARSER clause from the dumped + CREATE TABLE statement so that you can reload + the table later. If you do not care about the table, + DROP TABLE can be used even if plugins + associated with the table are missing. + + @@ -957,8 +981,9 @@ This directory is given by the value of the plugin_dir system variable. (Note: This a change in MySQL - 5.1. For earlier versions of MySQL, the file can be located in - any directory that is searched by your system's dynamic linker.) + 5.1. For earlier versions of MySQL, the shared object can be + located in any directory that is searched by your system's + dynamic linker.) @@ -2082,34 +2107,15 @@ from udf_example.cc produces a file named something like udf_example.so (the exact name may vary from platform to platform). Copy this file to - some directory such as /usr/lib that - searched by your system's dynamic (runtime) linker, or add the - directory in which you placed the shared object to the linker - configuration file (for example, - /etc/ld.so.conf). + the server's plugin directory. This directory is given by the + value of the plugin_dir system variable. + (Note: This a change in MySQL + 5.1. For earlier versions of MySQL, the shared object can be + located in any directory that is searched by your system's + dynamic linker.) - The dynamic linker name is system-specific (for example, - ld-elf.so.1 on FreeBSD, - ld.so on Linux, or dyld - on Mac OS X). Consult your system documentation for - information about the linker name and how to configure it. - - - - On many systems, you can also set the - LD_LIBRARY or - LD_LIBRARY_PATH environment variable to - point at the directory where you have the files for your UDF. - The dlopen manual page tells you which - variable you should use on your system. You should set this in - mysql.server or - mysqld_safe startup scripts and restart - mysqld. - - - On some systems, the ldconfig program that configures the dynamic linker does not recognize a shared object unless its name begins with lib. In @@ -2272,18 +2278,13 @@ UDF object files cannot be placed in arbitrary directories. - They must be located in some system directory that the dynamic - linker is configured to search. To enforce this restriction - and prevent attempts at specifying pathnames outside of - directories searched by the dynamic linker, MySQL checks the - shared object file name specified in CREATE - FUNCTION as well as for pathname delimiters in - filenames stored in the mysql.func table - when it loads functions. This prevents attempts at specifying - illegitimate pathnames through direct manipulation of the - mysql.func table. For information about - UDFs and the runtime linker, see - . + They must be located in the server's plugin directory. This + directory is given by the value of the + plugin_dir system variable. + (Note: This a change in MySQL + 5.1. For earlier versions of MySQL, the shared object can be + located in any directory that is searched by your system's + dynamic linker.)