13
13
along with this program; if not, write to the Free Software
14
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16
#include "drizzled/server_includes.h"
17
17
#include "drizzled/plugin/function.h"
19
19
#include "plugin/compression/compress.h"
28
28
plugin::Create_function<Item_func_uncompressed_length>
29
29
*uncompressed_lengthudf= NULL;
31
static int compressionudf_plugin_init(plugin::Context &context)
31
static int compressionudf_plugin_init(plugin::Registry ®istry)
33
33
compressudf= new plugin::Create_function<Item_func_compress>("compress");
35
35
new plugin::Create_function<Item_func_uncompress>("uncompress");
36
36
uncompressed_lengthudf=
37
37
new plugin::Create_function<Item_func_uncompressed_length>("uncompressed_length");
38
context.add(compressudf);
39
context.add(uncompressudf);
40
context.add(uncompressed_lengthudf);
44
DRIZZLE_DECLARE_PLUGIN
38
registry.add(compressudf);
39
registry.add(uncompressudf);
40
registry.add(uncompressed_lengthudf);
44
static int compressionudf_plugin_deinit(plugin::Registry ®istry)
46
registry.remove(compressudf);
47
registry.remove(uncompressudf);
48
registry.remove(uncompressed_lengthudf);
51
delete uncompressed_lengthudf;
55
drizzle_declare_plugin
50
60
"UDFs for compression functions",
51
61
PLUGIN_LICENSE_GPL,
52
62
compressionudf_plugin_init, /* Plugin Init */
63
compressionudf_plugin_deinit, /* Plugin Deinit */
64
NULL, /* status variables */
53
65
NULL, /* system variables */
54
66
NULL /* config options */
56
DRIZZLE_DECLARE_PLUGIN_END;
68
drizzle_declare_plugin_end;