You can call the mysql_client_register_plugin() function to register a plug-in and add the plug-in to the list of loaded plug-ins.
Syntax
struct st_mysql_client_plugin *
mysql_client_register_plugin(MYSQL *mysql,
struct st_mysql_client_plugin *plugin)
Arguments
mysql: a pointer to a connection structure. The plug-in API does not need to connect to the OBServer but must correctly perform initialization. This structure is used to obtain connection information.plugin: a pointer to the plug-in structure.
Return values
A pointer to the plug-in is returned for an operation success, and NULL is returned if an error occurred.
Errors
Call the mysql_error() or mysql_errno() function to check for errors.
Notes
An error occurs if the plug-in is loaded repeatedly.