Rechercher dans le manuel MySQL
29.2.4 Writing Plugins
[+/-]
- 29.2.4.1 Overview of Plugin Writing
- 29.2.4.2 Plugin Data Structures
- 29.2.4.3 Compiling and Installing Plugin Libraries
- 29.2.4.4 Writing Full-Text Parser Plugins
- 29.2.4.5 Writing Daemon Plugins
- 29.2.4.6 Writing INFORMATION_SCHEMA Plugins
- 29.2.4.7 Writing Semisynchronous Replication Plugins
- 29.2.4.8 Writing Audit Plugins
- 29.2.4.9 Writing Authentication Plugins
- 29.2.4.10 Writing Password-Validation Plugins
- 29.2.4.11 Writing Protocol Trace Plugins
- 29.2.4.12 Writing Keyring Plugins
To create a plugin library, you must provide the required descriptor information that indicates what plugins the library file contains, and write the interface functions for each plugin.
Every server plugin must have a general descriptor that provides
information to the plugin API, and a type-specific descriptor
that provides information about the plugin interface for a given
type of plugin. The structure of the general descriptor is the
same for all plugin types. The structure of the type-specific
descriptor varies among plugin types and is determined by the
requirements of what the plugin needs to do. The server plugin
interface also enables plugins to expose status and system
variables. These variables become visible through the
SHOW STATUS
and
SHOW VARIABLES
statements and the
corresponding INFORMATION_SCHEMA
tables.
For client-side plugins, the architecture is a bit different. Each plugin must have a descriptor, but there is no division into separate general and type-specific descriptors. Instead, the descriptor begins with a fixed set of members common to all client plugin types, and the common members are followed by any additional members required to implement the specific plugin type.
A server plugin contains code that becomes part of the running
server, so when you write the plugin, you are bound by any and
all constraints that otherwise apply to writing server code. For
example, you may have problems if you attempt to use functions
from the libstdc++
library. These constraints
may change in future versions of the server, so it is possible
that server upgrades will require revisions to plugins
originally written for older servers. For information about
these constraints, see
Section 2.9.7, “MySQL Source-Configuration Options”, and
Section 2.9.8, “Dealing with Problems Compiling MySQL”.
Client plugin writers should avoid dependencies on what symbols the calling application has because you cannot be sure what applications will use the plugin.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-writing-plugins.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.