1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1
/* Copyright (C) 2005 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
21
17
* @TODO There is plugin.h and also sql_plugin.h. Ostensibly,
93
89
struct st_mysql_plugin *plugin;
94
90
struct st_plugin_dl *plugin_dl;
96
uint32_t ref_count; /* number of threads using the plugin */
92
uint ref_count; /* number of threads using the plugin */
97
93
void *data; /* plugin type specific, e.g. handlerton */
98
94
MEM_ROOT mem_root; /* memory for dynamic plugin structures */
99
95
sys_var *system_vars; /* server variables for this plugin */
122
118
extern int plugin_init(int *argc, char **argv, int init_flags);
123
119
extern void plugin_shutdown(void);
124
extern void my_print_help_inc_plugins(struct my_option *options, uint32_t size);
120
extern void my_print_help_inc_plugins(struct my_option *options, uint size);
125
121
extern bool plugin_is_ready(const LEX_STRING *name, int type);
126
122
#define my_plugin_lock_by_name(A,B,C) plugin_lock_by_name(A,B,C CALLER_INFO)
127
123
#define my_plugin_lock_by_name_ci(A,B,C) plugin_lock_by_name(A,B,C ORIG_CALLER_INFO)
131
127
extern plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name,
132
128
int type CALLER_INFO_PROTO);
133
129
extern void plugin_unlock(THD *thd, plugin_ref plugin);
134
extern void plugin_unlock_list(THD *thd, plugin_ref *list, uint32_t count);
130
extern void plugin_unlock_list(THD *thd, plugin_ref *list, uint count);
135
131
extern bool mysql_install_plugin(THD *thd, const LEX_STRING *name,
136
132
const LEX_STRING *dl);
137
133
extern bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name);
145
141
#define plugin_foreach(A,B,C,D) plugin_foreach_with_mask(A,B,C,PLUGIN_IS_READY,D)
146
142
extern bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func,
147
int type, uint32_t state_mask, void *arg);
143
int type, uint state_mask, void *arg);
148
144
#endif /* DRIZZLE_SERVER_PLUGIN_H */