MySQL 5.1 Plugins Development

More Information
  • Build and install a plugin, and learn how to package it for distributing separately from MySQL
  • Add new functions to MySQL using the UDF interface
  • Declare new MySQL status and configuration variables from a plugin, and use Daemon plugins for a simple push style server monitoring
  • Add a new table to the INFORMATION_SCHEMA that shows anything you like with an INFORMATION_SCHEMA plugin
  • Use fulltext parser plugins to tolerate user errors, and search for text in binary data formats, for example, JPEG, or text that is stored outside the database
  • Store and retrieve rows and convert your custom data format to what MySQL understands using the storage engine plugin
  • Create a parser that indexes comments from JPEG files using the libexif library
  • Understand how the indexing API works, and how to work around the incompatibilities between your indexing engine and MySQL expectations
  • Learn about new features of the Plugin API, available beyond MySQL 5.1

MySQL has introduced a Plugin API with its latest version – a robust, powerful, and easy way of extending the server functionality with loadable modules on the fly. But until now anyone wishing to develop a plugin would almost certainly need to dig into the MySQL source code and search the Web for missing bits of the information.

This is the first book on the MySQL Plugin API. Written together with one of the Plugin API primary architects, it contains all the details you need to build a plugin. It shows what a plugin should contain and how to compile, install, and package it. Every chapter illustrates the material with thoroughly explained source code examples.

Starting from the basic features, common to all plugin types, and the structure of the plugin framework, this book will guide you through the different plugin types, from simple examples to advanced ones. Server monitoring, full-text search in JPEG comments, typo-tolerant searches, getting the list of all user variables, system usage statistics, or a complete storage engine with indexes – these and other plugins are developed in different chapters of this book, demonstrating the power and versatility of the MySQL Plugin API and explaining the intricate details of MySQL Plugin programming.

  • A practical guide with working examples explained line by line
  • Add new functions to MySQL with User Defined Functions
  • Export information via SQL using the INFORMATION_SCHEMA plugins
  • Search within PDFs, MP3s, and images; offset user typing errors with fulltext parser plugins
  • Access your custom data formats with a storage engine plugin
Page Count 288
Course Length 8 hours 38 minutes
ISBN 9781849510608
Date Of Publication 25 Aug 2010


Andrew Hutchings

Andrew Hutchings has been working in the IT industry almost all his life. He started his development career programming embedded microcontrollers in assembly language for environmental monitoring systems. He then went on to systems administrator for a hosting company, in which he got his first taste for modifying the MySQL source code.

Andrew created his own business in development and DBA work, which led him to be employed by Dennis Publishing, a major UK magazine publisher. In this role as Technical Architect he designed and implemented hosting setups, acting as senior developer and DBA. This was to be his first taste of MySQL clusters and led to his development of ndb_watch, a cluster monitoring daemon.

After gaining Zend Certified Engineer and Certified MySQL Database Administrator qualifications he gained a position at Sun Microsystems as a MySQL Support Engineer. This involves working daily with the MySQL source code and customer API code to help diagnose and fix issues. He is now a specialist in MySQL Cluster and C APIs.

In his spare time Andrew is a community contributor to MySQL with feature patches and bug fixes in both 5.1 and 6.0. He has also contributed to the Drizzle project, a fork of MySQL aimed at having a clean micro-kernel core, committing a significant amount of code to the project.

Sergei Golubchik

Sergei Golubchik started on modifying MySQL source code in 1998, and has continued doing it as a MySQL AB employee since 2000. Working professionally with the MySQL sources he had a chance to get to know and extend almost every part of the server code – from the SQL core to the utility functions. He was one of the primary architects of the Plugin API. After working for ten years in the ever-growing MySQL AB, and later in Sun Microsystems as a Principal Software Developer, he resigned to join a small startup company that works on MariaDB – an extended version of the MySQL server, where he continues to do what he likes the most – hack on MySQL, architecting and developing the MySQL/MariaDB Plugin API, making it even more powerful, safer, and easier to use.
He works and lives in Germany, near Cologne, with his lovely wife and two kids.