Chapter 5. Advanced Information Schema Plugins
We have seen in the previous chapter how to create a basic Information Schema plugin and then further adapt this knowledge to expose the information about the server operating system. In this chapter we will talk about advanced features of the Information Schema plugins. We will discuss how to access MySQL internal data structures and display them in Information Schema tables, and we will look at condition pushdown optimization.
Accessing MySQL internals
One of the important use cases for the Information Schema plugin is to provide more server diagnostics to the user, that is, to expose the data about the MySQL internals. To do it we need to be able to find and use the internal data structures. Of course MySQL is an open source project and we can see where the data is that we need to capture. Typically, the data we need will be declared in the sql/
directory of the source code, but sometimes they can be in mysys/
or elsewhere.
In order to access...