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.