1
/* Copyright (C) 2009 Sun Microsystems
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16
#include <drizzled/server_includes.h>
17
#include <drizzled/sql_udf.h>
19
#include "gman_servers_set.h"
24
Create_function<Item_func_gman_servers_set> gman_servers_set(string("gman_servers_set"));
25
Create_function<Item_func_gman_do> gman_do(string("gman_do"));
26
Create_function<Item_func_gman_do_high> gman_do_high(string("gman_do_high"));
27
Create_function<Item_func_gman_do_low> gman_do_low(string("gman_do_low"));
28
Create_function<Item_func_gman_do_background> gman_do_background(string("gman_do_background"));
29
Create_function<Item_func_gman_do_high_background> gman_do_high_background(string("gman_do_high_background"));
30
Create_function<Item_func_gman_do_low_background> gman_do_low_background(string("gman_do_low_background"));
32
static int gearman_udf_plugin_init(PluginRegistry ®istry)
34
registry.add(&gman_servers_set);
35
registry.add(&gman_do);
36
registry.add(&gman_do_high);
37
registry.add(&gman_do_low);
38
registry.add(&gman_do_background);
39
registry.add(&gman_do_high_background);
40
registry.add(&gman_do_low_background);
44
static int gearman_udf_plugin_deinit(PluginRegistry ®istry)
46
registry.remove(&gman_do_low_background);
47
registry.remove(&gman_do_high_background);
48
registry.remove(&gman_do_background);
49
registry.remove(&gman_do_low);
50
registry.remove(&gman_do_high);
51
registry.remove(&gman_do);
52
registry.remove(&gman_servers_set);
56
drizzle_declare_plugin(gearman_udf)
61
"Gearman Client UDFs",
63
gearman_udf_plugin_init, /* Plugin Init */
64
gearman_udf_plugin_deinit, /* Plugin Deinit */
65
NULL, /* status variables */
66
NULL, /* system variables */
67
NULL /* config options */
69
drizzle_declare_plugin_end;