A whole bunch of people have successfully written plugins for MySQL using the plug-in framework which first appears in MySQL 5.1. On the whole, the simple examples work great, as long as all your code is in one directory. Here is a helpful tip...
Inside the plug.in
file, you can use MYSQL_PLUGIN_DIRECTORY_<FOO>
as an alias to the directory in which your plug.in
is located within, where FOO is the upper-case name of your plug-in.
Here is an example plug.in
:
MYSQL_STORAGE_ENGINE(pdpse,,[PDP-SE Storage Engine], [Any old storage engine], [max,max-no-ndb]) MYSQL_PLUGIN_STATIC(pdpse, [libpdpse.la]) MYSQL_PLUGIN_DYNAMIC(pdpse, [ha_pdpse.la]) MYSQL_PLUGIN_ACTIONS(pdpse,[dnl AC_CONFIG_FILES(dnl MYSQL_PLUGIN_DIRECTORY_PDPSE/api/Makefile dnl MYSQL_PLUGIN_DIRECTORY_PDPSE/db/Makefile dnl MYSQL_PLUGIN_DIRECTORY_PDPSE/dbut/Makefile dnl MYSQL_PLUGIN_DIRECTORY_PDPSE/msgs/Makefile dnl MYSQL_PLUGIN_DIRECTORY_PDPSE/vst/Makefile dnl ) ])
|
No comments:
Post a Comment