diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-10-04 15:54:41 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-10-04 15:54:41 +0300 |
commit | fee2a518b46c6269f099314abff85cd13f153bfa (patch) | |
tree | c60863e20b4656b29eed7bef0606750b8d9bb9ce /include/mysql | |
parent | dd2e3db48fce43f6249e1c23b3cf0f5057b41d4e (diff) | |
download | mariadb-git-fee2a518b46c6269f099314abff85cd13f153bfa.tar.gz |
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.
Diffstat (limited to 'include/mysql')
-rw-r--r-- | include/mysql/client_plugin.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/mysql/client_plugin.h b/include/mysql/client_plugin.h index 9631b090b14..ddd3b64ca56 100644 --- a/include/mysql/client_plugin.h +++ b/include/mysql/client_plugin.h @@ -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 |