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>
25
gman_servers_set(string("gman_servers_set"));
26
Create_function<Item_func_gman_do> gman_do(string("gman_do"));
27
Create_function<Item_func_gman_do_high> gman_do_high(string("gman_do_high"));
28
Create_function<Item_func_gman_do_low> gman_do_low(string("gman_do_low"));
29
Create_function<Item_func_gman_do_background>
30
gman_do_background(string("gman_do_background"));
31
Create_function<Item_func_gman_do_high_background>
32
gman_do_high_background(string("gman_do_high_background"));
33
Create_function<Item_func_gman_do_low_background>
34
gman_do_low_background(string("gman_do_low_background"));
36
static int gearman_udf_plugin_init(PluginRegistry ®istry)
38
registry.add(&gman_servers_set);
39
registry.add(&gman_do);
40
registry.add(&gman_do_high);
41
registry.add(&gman_do_low);
42
registry.add(&gman_do_background);
43
registry.add(&gman_do_high_background);
44
registry.add(&gman_do_low_background);
48
static int gearman_udf_plugin_deinit(PluginRegistry ®istry)
50
registry.remove(&gman_do_low_background);
51
registry.remove(&gman_do_high_background);
52
registry.remove(&gman_do_background);
53
registry.remove(&gman_do_low);
54
registry.remove(&gman_do_high);
55
registry.remove(&gman_do);
56
registry.remove(&gman_servers_set);
60
drizzle_declare_plugin(gearman_udf)
65
"Gearman Client UDFs",
67
gearman_udf_plugin_init, /* Plugin Init */
68
gearman_udf_plugin_deinit, /* Plugin Deinit */
69
NULL, /* status variables */
70
NULL, /* system variables */
71
NULL /* config options */
73
drizzle_declare_plugin_end;