Generally speaking, writing plugins for MariaDB is very similar to writing plugins for MySQL.
Storage engines can extend CREATE TABLE syntax with optional index, field, and table attribute clauses. See Extending CREATE TABLE for more information.
See Storage Engine Development.
Information Schema plugins can have their own FLUSH and SHOW statements. See FLUSH and SHOW for Information Schema plugins.
Encryption plugins in MariaDB are used for the data at rest encryption feature. They are responsible for both key management and for the actual encryption and decryption of data.
The MariaDB plugin declaration differs from the MySQL plugin declaration in the following ways:
MariaDB can load plugins that only have the MySQL plugin declaration but both PLUGIN_MATURITY and PLUGIN_AUTH_VERSION will show up as 'Unknown' in the INFORMATION_SCHEMA.PLUGINS table.
For compiled-in (not dynamically loaded) plugins, the presence of the MariaDB plugin declaration is mandatory.
The MariaDB plugin declaration looks like this:
/* MariaDB plugin declaration */
maria_declare_plugin(example)
{
MYSQL_STORAGE_ENGINE_PLUGIN, /* the plugin type (see include/mysql/plugin.h) */
&example_storage_engine_info, /* pointer to type-specific plugin descriptor */
"EXAMPLEDB", /* plugin name */
"John Smith", /* plugin author */
"Example of plugin interface", /* the plugin description */
PLUGIN_LICENSE_GPL, /* the plugin license (see include/mysql/plugin.h) */
example_init_func, /* Pointer to plugin initialization function */
example_deinit_func, /* Pointer to plugin deinitialization function */
0x0001 /* Numeric version 0xAABB means AA.BB version */,
example_status_variables, /* Status variables */
example_system_variables, /* System variables */
"0.1 example", /* String version representation */
MariaDB_PLUGIN_MATURITY_EXPERIMENTAL /* Maturity (see include/mysql/plugin.h)*/
}
maria_declare_plugin_end;
© 2023 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/development-writing-plugins-for-mariadb/