diff options
Diffstat (limited to 'include/mysql')
-rw-r--r-- | include/mysql/plugin.h | 12 | ||||
-rw-r--r-- | include/mysql/plugin_audit.h.pp | 10 | ||||
-rw-r--r-- | include/mysql/plugin_auth.h.pp | 10 | ||||
-rw-r--r-- | include/mysql/plugin_data_type.h.pp | 10 | ||||
-rw-r--r-- | include/mysql/plugin_encryption.h.pp | 10 | ||||
-rw-r--r-- | include/mysql/plugin_ftparser.h.pp | 10 | ||||
-rw-r--r-- | include/mysql/plugin_function.h.pp | 10 | ||||
-rw-r--r-- | include/mysql/plugin_password_validation.h.pp | 10 |
8 files changed, 82 insertions, 0 deletions
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 6ef0afb980b..14c752511c7 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -204,6 +204,18 @@ struct system_status_var; typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type); +static inline +struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name, + mysql_show_var_func func_arg) +{ + struct st_mysql_show_var tmp; + tmp.name= name; + tmp.value= (void*) func_arg; + tmp.type= SHOW_FUNC; + return tmp; +}; + + /* Constants for plugin flags. */ diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp index d1e9580a053..a01e4ff8c17 100644 --- a/include/mysql/plugin_audit.h.pp +++ b/include/mysql/plugin_audit.h.pp @@ -517,6 +517,16 @@ struct st_mysql_show_var { }; struct system_status_var; typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type); +static inline +struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name, + mysql_show_var_func func_arg) +{ + struct st_mysql_show_var tmp; + tmp.name= name; + tmp.value= (void*) func_arg; + tmp.type= SHOW_FUNC; + return tmp; +}; struct st_mysql_sys_var; struct st_mysql_value; typedef int (*mysql_var_check_func)(THD* thd, diff --git a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp index 2c89bc47de3..1844f7b7248 100644 --- a/include/mysql/plugin_auth.h.pp +++ b/include/mysql/plugin_auth.h.pp @@ -517,6 +517,16 @@ struct st_mysql_show_var { }; struct system_status_var; typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type); +static inline +struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name, + mysql_show_var_func func_arg) +{ + struct st_mysql_show_var tmp; + tmp.name= name; + tmp.value= (void*) func_arg; + tmp.type= SHOW_FUNC; + return tmp; +}; struct st_mysql_sys_var; struct st_mysql_value; typedef int (*mysql_var_check_func)(THD* thd, diff --git a/include/mysql/plugin_data_type.h.pp b/include/mysql/plugin_data_type.h.pp index bd4ef6af15f..80b5a863fa5 100644 --- a/include/mysql/plugin_data_type.h.pp +++ b/include/mysql/plugin_data_type.h.pp @@ -517,6 +517,16 @@ struct st_mysql_show_var { }; struct system_status_var; typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type); +static inline +struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name, + mysql_show_var_func func_arg) +{ + struct st_mysql_show_var tmp; + tmp.name= name; + tmp.value= (void*) func_arg; + tmp.type= SHOW_FUNC; + return tmp; +}; struct st_mysql_sys_var; struct st_mysql_value; typedef int (*mysql_var_check_func)(THD* thd, diff --git a/include/mysql/plugin_encryption.h.pp b/include/mysql/plugin_encryption.h.pp index 96100d3791b..ac5798b1323 100644 --- a/include/mysql/plugin_encryption.h.pp +++ b/include/mysql/plugin_encryption.h.pp @@ -517,6 +517,16 @@ struct st_mysql_show_var { }; struct system_status_var; typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type); +static inline +struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name, + mysql_show_var_func func_arg) +{ + struct st_mysql_show_var tmp; + tmp.name= name; + tmp.value= (void*) func_arg; + tmp.type= SHOW_FUNC; + return tmp; +}; struct st_mysql_sys_var; struct st_mysql_value; typedef int (*mysql_var_check_func)(THD* thd, diff --git a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp index 4760e31c4bd..919c9aaef70 100644 --- a/include/mysql/plugin_ftparser.h.pp +++ b/include/mysql/plugin_ftparser.h.pp @@ -517,6 +517,16 @@ struct st_mysql_show_var { }; struct system_status_var; typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type); +static inline +struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name, + mysql_show_var_func func_arg) +{ + struct st_mysql_show_var tmp; + tmp.name= name; + tmp.value= (void*) func_arg; + tmp.type= SHOW_FUNC; + return tmp; +}; struct st_mysql_sys_var; struct st_mysql_value; typedef int (*mysql_var_check_func)(THD* thd, diff --git a/include/mysql/plugin_function.h.pp b/include/mysql/plugin_function.h.pp index 5c1f34d8184..f5b22dbd826 100644 --- a/include/mysql/plugin_function.h.pp +++ b/include/mysql/plugin_function.h.pp @@ -517,6 +517,16 @@ struct st_mysql_show_var { }; struct system_status_var; typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type); +static inline +struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name, + mysql_show_var_func func_arg) +{ + struct st_mysql_show_var tmp; + tmp.name= name; + tmp.value= (void*) func_arg; + tmp.type= SHOW_FUNC; + return tmp; +}; struct st_mysql_sys_var; struct st_mysql_value; typedef int (*mysql_var_check_func)(THD* thd, diff --git a/include/mysql/plugin_password_validation.h.pp b/include/mysql/plugin_password_validation.h.pp index a56a177b8fa..115cbf2636e 100644 --- a/include/mysql/plugin_password_validation.h.pp +++ b/include/mysql/plugin_password_validation.h.pp @@ -517,6 +517,16 @@ struct st_mysql_show_var { }; struct system_status_var; typedef int (*mysql_show_var_func)(THD*, struct st_mysql_show_var*, void *, struct system_status_var *status_var, enum enum_var_type); +static inline +struct st_mysql_show_var SHOW_FUNC_ENTRY(const char *name, + mysql_show_var_func func_arg) +{ + struct st_mysql_show_var tmp; + tmp.name= name; + tmp.value= (void*) func_arg; + tmp.type= SHOW_FUNC; + return tmp; +}; struct st_mysql_sys_var; struct st_mysql_value; typedef int (*mysql_var_check_func)(THD* thd, |