1#ifndef MYSQL_CLIENT_PLUGIN_INCLUDED
35#define MYSQL_CLIENT_PLUGIN_INCLUDED
37#ifndef MYSQL_ABI_CHECK
50#if defined(MYSQL_DYNAMIC_CLIENT_PLUGIN)
52#define MYSQL_CLIENT_PLUGIN_EXPORT extern "C" __declspec(dllexport)
54#define MYSQL_CLIENT_PLUGIN_EXPORT __declspec(dllexport)
58#define MYSQL_CLIENT_PLUGIN_EXPORT extern "C"
60#define MYSQL_CLIENT_PLUGIN_EXPORT
65#if defined(MYSQL_DYNAMIC_CLIENT_PLUGIN)
66#define MYSQL_CLIENT_PLUGIN_EXPORT MY_ATTRIBUTE((visibility("default")))
68#define MYSQL_CLIENT_PLUGIN_EXPORT
78#define MYSQL_CLIENT_reserved1 0
79#define MYSQL_CLIENT_reserved2 1
80#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2
81#define MYSQL_CLIENT_TRACE_PLUGIN 3
83#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0200
84#define MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION 0x0200
86#define MYSQL_CLIENT_MAX_PLUGINS 4
88#define MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE "Oracle Corporation"
90#define mysql_declare_client_plugin(X) \
91 MYSQL_CLIENT_PLUGIN_EXPORT st_mysql_client_plugin_##X \
92 _mysql_client_plugin_declaration_ = { \
93 MYSQL_CLIENT_##X##_PLUGIN, \
94 MYSQL_CLIENT_##X##_PLUGIN_INTERFACE_VERSION,
95#define mysql_end_client_plugin }
98#define MYSQL_CLIENT_PLUGIN_HEADER \
100 unsigned int interface_version; \
102 const char *author; \
104 unsigned int version[3]; \
105 const char *license; \
107 int (*init)(char *, size_t, int, va_list); \
108 int (*deinit)(void); \
109 int (*options)(const char *option, const void *); \
110 int (*get_options)(const char *option, void *);
169 int argc, va_list args);
215 const char *option,
const void *value);
230 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:543
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:402
int mysql_plugin_get_option(struct st_mysql_client_plugin *plugin, const char *option, void *value)
get plugin options
Definition: client_plugin.cc:590
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:381
int mysql_plugin_options(struct st_mysql_client_plugin *plugin, const char *option, const void *value)
set plugin options
Definition: client_plugin.cc:581
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:554
#define MYSQL_CLIENT_PLUGIN_HEADER
Definition: client_plugin.h:98
static MYSQL mysql
Definition: mysql.cc:154
Definition: instrumented_condition_variable.h:32
struct result result
Definition: result.h:34
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:136
required string type
Definition: replication_group_member_actions.proto:34
case opt name
Definition: sslopt-case.h:33
Provides plugin access to communication channel.
Definition: plugin_auth_common.h:146
Definition: client_plugin.h:121
enum net_async_status(* authenticate_user_nonblocking)(MYSQL_PLUGIN_VIO *vio, struct MYSQL *mysql, int *result)
Definition: client_plugin.h:124
MYSQL_CLIENT_PLUGIN_HEADER int(* authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct MYSQL *mysql)
Definition: client_plugin.h:123
Definition: client_plugin.h:112