A review of MySQL 5.1 Plugin Development by Golubchik and Hutchings
MySQL 5.1 Plugin Development, by Sergei Golubchik and Andrew Hutchings, Packt 2010. About 250 pages. (Here’s a link to the publisher’s site.)
This book is well worth reading for anyone interested in MySQL internals. I learned a lot from it. It is well-written and understandable. I cannot say that I’m planning to write storage engines or more advanced plugins, but I have a great many ideas how to improve MySQL, and I now understand more clearly which of those are suitable to write as plugins, and of what type of plugin is appropriate. I also think I have a better idea how much work these various ideas might involve.
The book begins with an orientation to building plugins on various platforms. Next it covers user-defined functions (UDFs). I have written UDFs, but that’s as far as I have gone with MySQL plugins. The rest of the book covers Daemon plugins, INFORMATION_SCHEMA plugins, full-text parser plugins, and storage engine plugins from basic to advanced. The last example is a nearly complete storage engine built on Tokyo Cabinet, with some pretty advanced functionality. It finishes with a quick overview of the types of plugins available in development and future versions of MySQL, and what’s possible in MariaDB.
The examples are full code listings, with paragraphs of text alternating with a few lines of code. It’s like reading a really well-commented C program, like reading InnoDB source, but with even more explanations. You can download everything you need to build and run the examples yourself — even the sample images used for demonstrating full-text search of EXIF data.
I enjoyed reading about what’s possible in MariaDB. I had not kept up-to-date with the work that’s being done there. If I were a storage engine developer, I’m sure I would appreciate what MariaDB has done. I would speculate that many of the people who’ve written in-house custom storage engines for their own businesses might find MariaDB interesting.
I think that anyone who is planning to modify the MySQL source code should read this book. It could save a lot of work and show easier ways to do things. I learned a lot about the MySQL source code that I have not gotten from other places. This one will go onto my list of essential books for MySQL users.




Hi!
Is there any MariaDB specific chapters or information in the book? I thought it was only MySQL.
Since Andrew works on Drizzle, I am hoping that in the next release they will get to cover us as well :)
Cheers,
–Brian
Brian Aker
11 Oct 10 at 2:02 pm
There is not a great deal, but in the last chapter or so, it discusses authentication and audit plugins, with working code examples.
Xaprb
11 Oct 10 at 2:37 pm
@Xaprb: Thanks for the excellent review :)
@Brian: Unfortunately no Drizzle in it, it actually never occured to me for some reason (my bad!). Although a few of the themes are still relevent to Drizzle plugins.
I’m not sure a second edition would have the same title if we covered MariaDB and Drizzle in depth but it is a good idea.
LinuxJedi
12 Oct 10 at 2:37 am
Thanks, Baron!
I’m glad you found it useful.
Brian, I’ve covered differences between MariaDB and MySQL in the book – but most of the book applies equally to both. We try to keep MariaDB compatible, as you know :)
Sergei Golubchik
12 Oct 10 at 2:43 pm