Bug #39238 | Inconsitencies in documentation for UDFs | ||
---|---|---|---|
Submitted: | 4 Sep 2008 11:03 | Modified: | 18 May 2010 13:45 |
Reporter: | Trond Norbye | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.0 | OS: | Any |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
[4 Sep 2008 11:03]
Trond Norbye
[4 Sep 2008 12:24]
Valeriy Kravchuk
Thank you for a reasonable documentation request.
[16 Dec 2009 4:13]
Paul DuBois
Trond, is this still an issue with the current 5.0 release?
[16 Dec 2009 8:33]
Trond Norbye
I don't know. I didn't see any changes to the documentation that would indicate that it has been fixed. I am currently assigned to other tasks so I haven't looked lately.
[17 Dec 2009 7:26]
Valeriy Kravchuk
Manual (http://dev.mysql.com/doc/refman/5.0/en/ha-memcached-interfaces-mysqludf.html) still says: "You may want to copy the MySQL memcached UDFs into your MySQL plugins directory: shell> cp /usr/local/lib/libmemcached_functions_mysql* /usr/local/mysql/lib/mysql/plugins/" while this may be NOT enough. Nothing fixed IMHO.
[18 May 2010 13:45]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products. To http://dev.mysql.com/doc/refman/5.0/en/ha-memcached-interfaces-mysqludf.html I added a note: The plugin directory is given by the value of the plugin_dir system variable. For more information, see Section 21.2.2.5, “Compiling and Installing User-Defined Functions”. And in the referenced section, I added the details about what do do if there is no plugin_dir. This includes discussion about setting LD_LIBRARY_PATH: After you compile a shared object containing UDFs, you must install it and tell MySQL about it. Compiling a shared object from udf_example.c using gcc directly produces a file named udf_example.so. Compiling the shared object using make produces a file named something like udf_example.so.0.0.0 in the .libs directory (the exact name may vary from platform to platform). As of MySQL 5.0.67, copy the shared object to server's plugin directory and name it udf_example.so. This directory is given by the value of the plugin_dir system variable. Prior to MySQL 5.0.67, or if the value of plugin_dir is empty, the shared object should be placed in a directory such as /usr/lib that is searched by your system's dynamic (runtime) linker, or you can add the directory in which you place the shared object to the linker configuration file (for example, /etc/ld.so.conf). 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. You should set the variable in mysql.server or mysqld_safe startup scripts and restart mysqld. You might do this if you want to place the object file in a directory accessible only to the server and not in a public directory. The dlopen manual page tells you which variable to use on your system.