diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-03-15 12:51:23 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-03-15 12:51:23 +0100 |
commit | f09ca00e088b316441bb76e97ba097bc9f3da7d3 (patch) | |
tree | 1a557d74018ed9cd073b5aa960bd62421962e73d /sql/sql_plugin.h | |
parent | 2ceaffc4672c62a772890da7761d11f13d3f5ee4 (diff) | |
parent | 71b3e46b0160936596195682a731703900fb4fff (diff) | |
download | mariadb-git-f09ca00e088b316441bb76e97ba097bc9f3da7d3.tar.gz |
merged
Diffstat (limited to 'sql/sql_plugin.h')
-rw-r--r-- | sql/sql_plugin.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index 3c7da673184..95553e1d3a7 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -53,7 +53,8 @@ struct st_plugin_dl LEX_STRING dl; void *handle; struct st_mysql_plugin *plugins; - int version; + int version; + bool allocated; uint ref_count; /* number of plugins loaded from the library */ }; @@ -79,6 +80,8 @@ struct st_plugin_int */ #ifdef DBUG_OFF typedef struct st_plugin_int *plugin_ref; +#define plugin_ref_to_int(A) A +#define plugin_int_to_ref(A) A #define plugin_decl(pi) ((pi)->plugin) #define plugin_dlib(pi) ((pi)->plugin_dl) #define plugin_data(pi,cast) ((cast)((pi)->data)) @@ -87,6 +90,8 @@ typedef struct st_plugin_int *plugin_ref; #define plugin_equals(p1,p2) ((p1) == (p2)) #else typedef struct st_plugin_int **plugin_ref; +#define plugin_ref_to_int(A) (A ? A[0] : NULL) +#define plugin_int_to_ref(A) &(A) #define plugin_decl(pi) ((pi)[0]->plugin) #define plugin_dlib(pi) ((pi)[0]->plugin_dl) #define plugin_data(pi,cast) ((cast)((pi)[0]->data)) @@ -110,7 +115,7 @@ extern bool plugin_is_ready(const LEX_STRING *name, int type); #define my_plugin_lock_by_name_ci(A,B,C) plugin_lock_by_name(A,B,C ORIG_CALLER_INFO) #define my_plugin_lock(A,B) plugin_lock(A,B CALLER_INFO) #define my_plugin_lock_ci(A,B) plugin_lock(A,B ORIG_CALLER_INFO) -extern plugin_ref plugin_lock(THD *thd, plugin_ref *ptr CALLER_INFO_PROTO); +extern plugin_ref plugin_lock(THD *thd, plugin_ref ptr CALLER_INFO_PROTO); extern plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name, int type CALLER_INFO_PROTO); extern void plugin_unlock(THD *thd, plugin_ref plugin); |