CodeGen_MySQL_Plugin
This PEAR package provides a command mysql-plugin-gen that takes a XML specification file with embedded C code and generates a full working MySQL User Defined Function source project from that. The generated code includes:
- the actual code and header file
- autotools files for a working standalone configure
- plug.in file for integration into the server code base (not working yet)
- a test framework
Using a code generator like this when implementing a plugin lets you focus on the additional functionality you want to implement while shielding you from all the details surrounding the task.
Currently the following plugin types are supported:
Within a single plugin project multiple actual plugins may be specified.
you can create a UDF library from this using (on a unixoid system)
Creating plugin source from the XML specs
$ mysql-plugin-gen your_plugin.xml $ cd your_plugin $ configure (--with-mysql=/install/prefix | --with-mysql-src=/path/to/mysql-src) $ make
Whether you can compile against a regular mysql installation using --with-mysql or need to compile server source using --with-mysql-src depends on the type of plugin, Information_Schema plugins need to call internal functions not yet exposed in public header files, all other suppported plugin types should not have any non-public server dependencies.
