1#ifndef MYSQL_CLIENT_PLUGIN_INCLUDED
34#define MYSQL_CLIENT_PLUGIN_INCLUDED
36#ifndef MYSQL_ABI_CHECK
48#undef MYSQL_PLUGIN_EXPORT
51#if defined(MYSQL_DYNAMIC_PLUGIN)
53#define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
55#define MYSQL_PLUGIN_EXPORT __declspec(dllexport)
59#define MYSQL_PLUGIN_EXPORT extern "C"
61#define MYSQL_PLUGIN_EXPORT
66#if defined(MYSQL_DYNAMIC_PLUGIN)
67#define MYSQL_PLUGIN_EXPORT MY_ATTRIBUTE((visibility("default")))
69#define MYSQL_PLUGIN_EXPORT
79#define MYSQL_CLIENT_reserved1 0
80#define MYSQL_CLIENT_reserved2 1
81#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2
82#define MYSQL_CLIENT_TRACE_PLUGIN 3
84#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0200
85#define MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION 0x0200
87#define MYSQL_CLIENT_MAX_PLUGINS 4
89#define MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE "Oracle Corporation"
91#define mysql_declare_client_plugin(X) \
92 MYSQL_PLUGIN_EXPORT st_mysql_client_plugin_##X \
93 _mysql_client_plugin_declaration_ = { \
94 MYSQL_CLIENT_##X##_PLUGIN, \
95 MYSQL_CLIENT_##X##_PLUGIN_INTERFACE_VERSION,
96#define mysql_end_client_plugin }
99#define MYSQL_CLIENT_PLUGIN_HEADER \
101 unsigned int interface_version; \
103 const char *author; \
105 unsigned int version[3]; \
106 const char *license; \
108 int (*init)(char *, size_t, int, va_list); \
109 int (*deinit)(void); \
110 int (*options)(const char *option, const void *); \
111 int (*get_options)(const char *option, void *);
170 int argc, va_list args);
216 const char *option,
const void *value);
231 const char *option,
void *value);
struct st_mysql_client_plugin * mysql_load_plugin(struct MYSQL *mysql, const char *name, int type, int argc,...)
loads a plugin and initializes it
Definition: client_plugin.cc:542
struct st_mysql_client_plugin * mysql_load_plugin_v(struct MYSQL *mysql, const char *name, int type, int argc, va_list args)
loads a plugin and initializes it, taking va_list as an argument
Definition: client_plugin.cc:401
int mysql_plugin_get_option(struct st_mysql_client_plugin *plugin, const char *option, void *value)
get plugin options
Definition: client_plugin.cc:589
struct st_mysql_client_plugin * mysql_client_register_plugin(struct MYSQL *mysql, struct st_mysql_client_plugin *plugin)
adds a plugin structure to the list of loaded plugins
Definition: client_plugin.cc:380
int mysql_plugin_options(struct st_mysql_client_plugin *plugin, const char *option, const void *value)
set plugin options
Definition: client_plugin.cc:580
struct st_mysql_client_plugin * mysql_client_find_plugin(struct MYSQL *mysql, const char *name, int type)
finds an already loaded plugin by name, or loads it, if necessary
Definition: client_plugin.cc:553
#define MYSQL_CLIENT_PLUGIN_HEADER
Definition: client_plugin.h:99
static MYSQL mysql
Definition: mysql.cc:153
struct result result
Definition: result.h:33
This file defines constants and data structures that are the same for both client- and server-side au...
net_async_status
Definition: plugin_auth_common.h:135
required string type
Definition: replication_group_member_actions.proto:33
case opt name
Definition: sslopt-case.h:32
Provides plugin access to communication channel.
Definition: plugin_auth_common.h:145
Definition: client_plugin.h:122
enum net_async_status(* authenticate_user_nonblocking)(MYSQL_PLUGIN_VIO *vio, struct MYSQL *mysql, int *result)
Definition: client_plugin.h:125
MYSQL_CLIENT_PLUGIN_HEADER int(* authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct MYSQL *mysql)
Definition: client_plugin.h:124
Definition: client_plugin.h:113