Databases Reference
In-Depth Information
Beyond MySQL 5.1
In the Appendix, we will briefly look at changes in the Plugin API that you may
expect to see in MySQL versions after MySQL 5.1.
Server services
Over the years, MySQL developers have implemented a lot of functionality for the
server to use. There are wrappers over the system functions such as my_open() ,
my_sync() , and my_malloc() that add additional features such as error checking
and reporting. Compatibility wrappers such as my_snprintf() and pthread_mutex_
lock() behave identically on all platforms and add additional features too. There are
also various useful data structures such as red-black binary trees, dynamically growing
hash tables, priority queues, and so on. Useful utility functions such as connection
local memory allocator and character set support were developed specifically for the
MySQL server run-time environment.
In many cases, plugins would like to use all of this and not reinvent the wheel.
But how can they do that? Just calling any of these functions directly will create an
additional dependency on the server—a dependency not covered by the Plugin API.
Although not always possible, it is wise to avoid dependencies like that. MySQL
developers can change internal details of the server implementation anytime—it
is only the API that they promised to keep stable. If our plugin depends on such
internal details, and they are changed, the best we can hope for is that the plugin
will not load. However, it could cause a crash on load, or it may appear to work but
produce incorrect results. There is no way to know in advance.
Search WWH ::




Custom Search