Databases Reference
In-Depth Information
The author string, is useful for providing contact information about the author
of the plugin:
"Andrew Hutchings (Andrew.Hutchings@Sun.COM)",
A Simple line of text that gives a basic description of what our plugin does:
"Daemon hello world example, outputs some static text",
This plugin is licensed under GPL so we set the license type to this:
PLUGIN_LICENSE_GPL,
This is our initialization function that has been defined earlier in the code:
hello_world_plugin_init,
As our simple plugin does not need a de-initialization function, we put NULL here:
NULL,
This plugin is given version 1.0 because it is our first GA release of the plugin. In
future versions we can increment this:
0x0100,
There are no status or system variables in this example. Hence, everything below the
version is set to NULL :
NULL,
NULL,
NULL
}
mysql_declare_plugin_end;
We can now install this plugin using the INSTALL PLUGIN syntax as described earlier
in this chapter:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.47 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current
input statement.
mysql> INSTALL PLUGIN hello_world SONAME 'hello_world.so';
Query OK, 0 rows affected (0.00 sec)
 
Search WWH ::




Custom Search