mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #56767: Make sure client plugins in 1054 are compatible with
connectors plugins Implemented changes needed to keep the client plugin API compatible with the existing plugins : 1. Provided an options() client plugin API to let the application pass options to the plugin after loading it 2. Added "License" (const char *) to specify the client plugin's license 3. Added "mysql_api" as a placeholder that the client library can use to pass function pointers to the plugin so that the plugin can call the C lib back. 4. Updated the existing client plugins to comply with the API change. 5. Added more detailed error message generation for Windows.
This commit is contained in:
@ -50,8 +50,11 @@
|
||||
const char *author; \
|
||||
const char *desc; \
|
||||
unsigned int version[3]; \
|
||||
const char *license; \
|
||||
void *mysql_api; \
|
||||
int (*init)(char *, size_t, int, va_list); \
|
||||
int (*deinit)();
|
||||
int (*deinit)(); \
|
||||
int (*options)(const char *option, const void *);
|
||||
|
||||
struct st_mysql_client_plugin
|
||||
{
|
||||
@ -142,5 +145,20 @@ struct st_mysql_client_plugin *
|
||||
mysql_client_register_plugin(struct st_mysql *mysql,
|
||||
struct st_mysql_client_plugin *plugin);
|
||||
|
||||
/**
|
||||
set plugin options
|
||||
|
||||
Can be used to set extra options and affect behavior for a plugin.
|
||||
This function may be called multiple times to set several options
|
||||
|
||||
@param plugin an st_mysql_client_plugin structure
|
||||
@param option a string which specifies the option to set
|
||||
@param value value for the option.
|
||||
|
||||
@retval 0 on success, 1 in case of failure
|
||||
**/
|
||||
int STDCALL mysql_plugin_options(struct st_mysql_client_plugin *plugin,
|
||||
const char *option,
|
||||
const void *value);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user