Bug #36945 Improve a documentation for udf_sample.
Submitted: 26 May 2008 7:05 Modified: 30 Jul 2008 19:20
Reporter: Meiji KIMURA Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0.x OS:Windows
Assigned to: Paul DuBois CPU Architecture:Any

[26 May 2008 7:05] Meiji KIMURA
Description:
I tried to make udf_sample.dll on windows. I saw this link.

27.2.4.5. Compiling and Installing User-Defined Functions
http://dev.mysql.com/doc/refman/5.0/en/udf-compiling.html

I have some suggestion for improvement this document.

[Current] 4.Create a CMake makefile with these contents: 
[Suggest] 4.Create a CMake makefile (CMakeLists.txt) with these contents:

[Current] After the shared object file has been installed, notify mysqld about the new functions with these statements: 
[Suggest] After the shared object file has been installed, notify mysqld about the new functions with these statements:
(Modify 'udf_example.so' for your platform. For example, 'udf_example.dll' on Windows.) 

[Current] (There is no CREATE FUNCTION / DROP FUNCTION for sequence())
[Suggest] Add item for sequence() like these,

mysql> CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so';
mysql> CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so';
mysql> CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so';
mysql> CREATE FUNCTION sequence RETURNS INTEGER SONAME 'udf_example.so';
mysql> CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so';
mysql> CREATE FUNCTION reverse_lookup
    ->        RETURNS STRING SONAME 'udf_example.so';
mysql> CREATE AGGREGATE FUNCTION avgcost
    ->        RETURNS REAL SONAME 'udf_example.so';

Functions can be deleted using DROP FUNCTION:

mysql> DROP FUNCTION metaphon;
mysql> DROP FUNCTION myfunc_double;
mysql> DROP FUNCTION myfunc_int;
mysql> DROP FUNCTION sequence;
mysql> DROP FUNCTION lookup;
mysql> DROP FUNCTION reverse_lookup;
mysql> DROP FUNCTION avgcost;

How to repeat:
N/A

Suggested fix:
See description.
[30 Jul 2008 19:20] 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.