MySQL Internals Manual  /  ...  /  Writing Services for Use from Within Plugins

5.7.2 Writing Services for Use from Within Plugins

Services are implemented by modifying server code in the sql directory to register the service in the plugin code, and by providing interface files in the libservices directory and under the include directory.

For complete instructions on writing a service, see the HOWTO file in the libservices directory within a MySQL source distribution. As you read the HOWTO file, you might find it useful to examine the files that implement existing services.

When you write a service, be sure to provide complete instructions on how to use it. A service named xxx will have a file named service_xxx.h in the include/mysql directory. For the benefit of plugin developers who use your service, this file should include comments that fully document the service interface:

  • Its purpose

  • Any applicable guidelines, including limitations or restrictions

  • For each function, a description of what it does, its calling sequence, and return value

The goal for documentation in this file is that plugin developers should be able to look at the file and completely understand how to use the service.

Download this Manual
EPUB - 0.8Mb
User Comments
Sign Up Login You must be logged in to post a comment.