14
14
along with this program; if not, write to the Free Software
15
15
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
16
16
17
+ /* *
18
+ @file
19
+
20
+ Interfaces for creating server and client plugins.
21
+ */
22
+
17
23
#ifndef MYSQL_PLUGIN_INCLUDED
18
24
#define MYSQL_PLUGIN_INCLUDED
19
25
@@ -73,29 +79,33 @@ typedef struct st_mysql_xid MYSQL_XID;
73
79
Plugin API. Common for all plugin types.
74
80
*/
75
81
76
- /* MySQL plugin interface version */
82
+ /* * MySQL plugin interface version */
77
83
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0104
78
84
79
- /* MariaDB plugin interface version */
85
+ /* * MariaDB plugin interface version */
80
86
#define MARIA_PLUGIN_INTERFACE_VERSION 0x010f
81
87
82
88
/*
83
89
The allowable types of plugins
84
90
*/
85
- #define MYSQL_UDF_PLUGIN 0 /* not implemented */
91
+ #define MYSQL_UDF_PLUGIN 0 /* *< not implemented */
86
92
#define MYSQL_STORAGE_ENGINE_PLUGIN 1
87
- #define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */
93
+ #define MYSQL_FTPARSER_PLUGIN 2 /* *< Full-text parser plugin */
88
94
#define MYSQL_DAEMON_PLUGIN 3
89
95
#define MYSQL_INFORMATION_SCHEMA_PLUGIN 4
90
96
#define MYSQL_AUDIT_PLUGIN 5
91
97
#define MYSQL_REPLICATION_PLUGIN 6
92
98
#define MYSQL_AUTHENTICATION_PLUGIN 7
93
- #define MYSQL_MAX_PLUGIN_TYPE_NUM 12 /* The number of plugin types */
99
+ #define MYSQL_MAX_PLUGIN_TYPE_NUM 12 /* *< The number of plugin types */
94
100
95
101
/* MariaDB plugin types */
96
- #define MariaDB_PASSWORD_VALIDATION_PLUGIN 8
102
+ /* * Client and server password validation */
103
+ #define MariaDB_PASSWORD_VALIDATION_PLUGIN 8
104
+ /* *< Encryption and key managment plugins */
97
105
#define MariaDB_ENCRYPTION_PLUGIN 9
106
+ /* *< Plugins for SQL data storage types */
98
107
#define MariaDB_DATA_TYPE_PLUGIN 10
108
+ /* *< Plugins for new native SQL functions */
99
109
#define MariaDB_FUNCTION_PLUGIN 11
100
110
101
111
/* We use the following strings to define licenses for plugins */
@@ -220,8 +230,8 @@ struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
220
230
Constants for plugin flags.
221
231
*/
222
232
223
- #define PLUGIN_OPT_NO_INSTALL 1UL /* Not dynamically loadable */
224
- #define PLUGIN_OPT_NO_UNINSTALL 2UL /* Not dynamically unloadable */
233
+ #define PLUGIN_OPT_NO_INSTALL 1UL /* *< Not dynamically loadable */
234
+ #define PLUGIN_OPT_NO_UNINSTALL 2UL /* *< Not dynamically unloadable */
225
235
226
236
227
237
/*
@@ -238,20 +248,20 @@ struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name,
238
248
#define PLUGIN_VAR_SET 0x0007
239
249
#define PLUGIN_VAR_DOUBLE 0x0008
240
250
#define PLUGIN_VAR_UNSIGNED 0x0080
241
- #define PLUGIN_VAR_THDLOCAL 0x0100 /* Variable is per-connection */
242
- #define PLUGIN_VAR_READONLY 0x0200 /* Server variable is read only */
243
- #define PLUGIN_VAR_NOSYSVAR 0x0400 /* Not a server variable */
244
- #define PLUGIN_VAR_NOCMDOPT 0x0800 /* Not a command line option */
245
- #define PLUGIN_VAR_NOCMDARG 0x1000 /* No argument for cmd line */
246
- #define PLUGIN_VAR_RQCMDARG 0x0000 /* Argument required for cmd line */
247
- #define PLUGIN_VAR_OPCMDARG 0x2000 /* Argument optional for cmd line */
248
- #define PLUGIN_VAR_DEPRECATED 0x4000 /* Server variable is deprecated */
249
- #define PLUGIN_VAR_MEMALLOC 0x8000 /* String needs memory allocated */
251
+ #define PLUGIN_VAR_THDLOCAL 0x0100 /* *< Variable is per-connection */
252
+ #define PLUGIN_VAR_READONLY 0x0200 /* *< Server variable is read only */
253
+ #define PLUGIN_VAR_NOSYSVAR 0x0400 /* *< Not a server variable */
254
+ #define PLUGIN_VAR_NOCMDOPT 0x0800 /* *< Not a command line option */
255
+ #define PLUGIN_VAR_NOCMDARG 0x1000 /* *< No argument for cmd line */
256
+ #define PLUGIN_VAR_RQCMDARG 0x0000 /* *< Argument required for cmd line */
257
+ #define PLUGIN_VAR_OPCMDARG 0x2000 /* *< Argument optional for cmd line */
258
+ #define PLUGIN_VAR_DEPRECATED 0x4000 /* *< Server variable is deprecated */
259
+ #define PLUGIN_VAR_MEMALLOC 0x8000 /* *< String needs memory allocated */
250
260
251
261
struct st_mysql_sys_var ;
252
262
struct st_mysql_value ;
253
263
254
- /*
264
+ /* *
255
265
SYNOPSIS
256
266
(*mysql_var_check_func)()
257
267
thd thread handle
@@ -274,7 +284,7 @@ typedef int (*mysql_var_check_func)(MYSQL_THD thd,
274
284
struct st_mysql_sys_var *var,
275
285
void *save, struct st_mysql_value *value);
276
286
277
- /*
287
+ /* *
278
288
SYNOPSIS
279
289
(*mysql_var_update_func)()
280
290
thd thread handle
@@ -519,61 +529,61 @@ DECLARE_MYSQL_THDVAR_SIMPLE(name, double) = { \
519
529
(*(MYSQL_SYSVAR_NAME (name).resolve (thd, MYSQL_SYSVAR_NAME (name).offset )))
520
530
521
531
522
- /*
532
+ /* *
523
533
Plugin description structure.
524
534
*/
525
535
526
536
struct st_mysql_plugin
527
537
{
528
- int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */
529
- void *info; /* pointer to type-specific plugin descriptor */
530
- const char *name; /* plugin name */
531
- const char *author; /* plugin author (for I_S.PLUGINS) */
532
- const char *descr; /* general descriptive text (for I_S.PLUGINS) */
533
- int license; /* the plugin license (PLUGIN_LICENSE_XXX) */
534
- /*
538
+ int type; /* *< the plugin type (a MYSQL_XXX_PLUGIN value) */
539
+ void *info; /* *< pointer to type-specific plugin descriptor */
540
+ const char *name; /* *< plugin name */
541
+ const char *author; /* *< plugin author (for I_S.PLUGINS) */
542
+ const char *descr; /* *< general descriptive text (for I_S.PLUGINS) */
543
+ int license; /* *< the plugin license (PLUGIN_LICENSE_XXX) */
544
+ /* *
535
545
The function to invoke when plugin is loaded. Plugin
536
546
initialisation done here should defer any ALTER TABLE queries to
537
547
after the ddl recovery is done, in the signal_ddl_recovery_done()
538
548
callback called by ha_signal_ddl_recovery_done().
539
549
*/
540
550
int (*init)(void *);
541
- int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
542
- unsigned int version; /* plugin version (for I_S.PLUGINS) */
551
+ int (*deinit)(void *);/* *< the function to invoke when plugin is unloaded */
552
+ unsigned int version; /* *< plugin version (for I_S.PLUGINS) */
543
553
struct st_mysql_show_var *status_vars;
544
554
struct st_mysql_sys_var **system_vars;
545
- void * __reserved1; /* reserved for dependency checking */
546
- unsigned long flags; /* flags for plugin */
555
+ void * __reserved1; /* *< reserved for dependency checking */
556
+ unsigned long flags; /* *< flags for plugin */
547
557
};
548
558
549
- /*
559
+ /* *
550
560
MariaDB extension for plugins declaration structure.
551
561
552
- It also copy current MySQL plugin fields to have more independency
562
+ It also copies current MySQL plugin fields to have more independency
553
563
in plugins extension
554
564
*/
555
565
556
566
struct st_maria_plugin
557
567
{
558
- int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */
559
- void *info; /* pointer to type-specific plugin descriptor */
560
- const char *name; /* plugin name */
561
- const char *author; /* plugin author (for SHOW PLUGINS) */
562
- const char *descr; /* general descriptive text (for SHOW PLUGINS ) */
563
- int license; /* the plugin license (PLUGIN_LICENSE_XXX) */
564
- /*
568
+ int type; /* *< the plugin type (a MYSQL_XXX_PLUGIN value) */
569
+ void *info; /* *< pointer to type-specific plugin descriptor */
570
+ const char *name; /* *< plugin name */
571
+ const char *author; /* *< plugin author (for SHOW PLUGINS) */
572
+ const char *descr; /* *< general descriptive text (for SHOW PLUGINS ) */
573
+ int license; /* *< the plugin license (PLUGIN_LICENSE_XXX) */
574
+ /* *
565
575
The function to invoke when plugin is loaded. Plugin
566
576
initialisation done here should defer any ALTER TABLE queries to
567
577
after the ddl recovery is done, in the signal_ddl_recovery_done()
568
578
callback called by ha_signal_ddl_recovery_done().
569
579
*/
570
580
int (*init)(void *);
571
- int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
572
- unsigned int version; /* plugin version (for SHOW PLUGINS) */
581
+ int (*deinit)(void *);/* *< the function to invoke when plugin is unloaded */
582
+ unsigned int version; /* *< plugin version (for SHOW PLUGINS) */
573
583
struct st_mysql_show_var *status_vars;
574
584
struct st_mysql_sys_var **system_vars;
575
- const char *version_info; /* plugin version string */
576
- unsigned int maturity; /* MariaDB_PLUGIN_MATURITY_XXX */
585
+ const char *version_info; /* *< plugin version string */
586
+ unsigned int maturity; /* *< MariaDB_PLUGIN_MATURITY_XXX */
577
587
};
578
588
579
589
/* ************************************************************************
@@ -650,6 +660,10 @@ struct handlerton;
650
660
int interface_version;
651
661
};
652
662
663
+ #define MYSQL_VALUE_TYPE_STRING 0
664
+ #define MYSQL_VALUE_TYPE_REAL 1
665
+ #define MYSQL_VALUE_TYPE_INT 2
666
+
653
667
/* ************************************************************************
654
668
st_mysql_value struct for reading values from mysqld.
655
669
Used by server variables framework to parse user-provided values.
@@ -660,10 +674,6 @@ struct handlerton;
660
674
if you need it to persist.
661
675
*/
662
676
663
- #define MYSQL_VALUE_TYPE_STRING 0
664
- #define MYSQL_VALUE_TYPE_REAL 1
665
- #define MYSQL_VALUE_TYPE_INT 2
666
-
667
677
struct st_mysql_value
668
678
{
669
679
int (*value_type)(struct st_mysql_value *);
@@ -691,6 +701,7 @@ struct DDL_options_st *thd_ddl_options(const MYSQL_THD thd);
691
701
void thd_storage_lock_wait (MYSQL_THD thd, long long value);
692
702
int thd_tx_isolation (const MYSQL_THD thd);
693
703
int thd_tx_is_read_only (const MYSQL_THD thd);
704
+
694
705
/* *
695
706
Create a temporary file.
696
707
0 commit comments