This section describes the general and type-specific parts of
the plugin API. It also provides a step-by-step guide to
creating a plugin library. For example plugin source code, see
the plugin/fulltext
directory of a MySQL
source distribution.
You can write plugins in C or C++. Plugins are loaded and
unloaded dynamically, so your operating system must support
dynamic loading and you must have compiled
mysqld dynamically (not statically).
A plugin contains code that becomes part of the running server,
so when you write a plugin, you are bound by any and all
constraints that otherwise apply to writing server code. For
example, you may have problems if you attempt to use functions
from the libstdc++
library. Note that these
constraints may change in future versions of the server, so it
is possible that server upgrades will require revisions to
plugins that were originally written for older servers. For
information about these constraints, see
Section 2.8.2, “Typical configure Options”, and
Section 2.8.4, “Dealing with Problems Compiling MySQL”.