On the plugin side of the services interface, the relevant
information is provided in a set of header files. A plugin
accesses this information by including the
plugin.h file (which plugins must include
plugin.h includes the
services.h file, which acts as an
“umbrella” file that includes the service-specific headers
with names of the form
a MySQL source distribution, the header files are located in the
include/mysql directory and have an inclusion
hierarchy like this:
services.his the “umbrella” header that includes all available service-specific header files.
Service-specific headers have names like
The server side of the services interface uses the header files
just listed, but also involves other files. Within a MySQL
source distribution, these files are located in the
libservices directory contains the source
files from which the
is built. Files in this directory include:
HOWTO: Instructions for writing plugin services.
xxx_services.h: Service-specific interface files.
During the MySQL build and install process, the
libmysqlservices library is compiled and
installed in a directory where plugins can access it. All
plugins should link in this library using the
-lmysqlservices flag when they are built.
sql directory contains
sql_plugin.cc, which implements plugin
functionality. This file includes
sql_plugin_services.h, where each available
service is registered.