~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/compression/compressionudf.cc

  • Committer: Brian Aker
  • Date: 2009-04-13 16:22:40 UTC
  • mfrom: (971.1.78 mordred)
  • Revision ID: brian@gaz-20090413162240-ugi3gvhofmcuglzl
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2006 MySQL AB
 
2
 
 
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.
 
6
 
 
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.
 
11
 
 
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 */
 
15
 
 
16
#include <drizzled/server_includes.h>
 
17
#include <drizzled/sql_udf.h>
 
18
 
 
19
#include "plugin/compression/compress.h"
 
20
#include "plugin/compression/uncompress.h"
 
21
#include "plugin/compression/uncompressed_length.h"
 
22
#include <string>
 
23
 
 
24
 
 
25
Create_function<Item_func_compress> compressudf("compress");
 
26
Create_function<Item_func_uncompress> uncompressudf("uncompress");
 
27
Create_function<Item_func_uncompressed_length>
 
28
  uncompressed_lengthudf("uncompressed_length");
 
29
 
 
30
static int compressionudf_plugin_init(PluginRegistry &registry)
 
31
{
 
32
  registry.add(&compressudf);
 
33
  registry.add(&uncompressudf);
 
34
  registry.add(&uncompressed_lengthudf);
 
35
  return 0;
 
36
}
 
37
 
 
38
static int compressionudf_plugin_deinit(PluginRegistry &registry)
 
39
{
 
40
  registry.remove(&compressudf);
 
41
  registry.remove(&uncompressudf);
 
42
  registry.remove(&uncompressed_lengthudf);
 
43
  return 0;
 
44
}
 
45
 
 
46
drizzle_declare_plugin(compression)
 
47
{
 
48
  "compression",
 
49
  "1.1",
 
50
  "Stewart Smith",
 
51
  "UDFs for compression functions",
 
52
  PLUGIN_LICENSE_GPL,
 
53
  compressionudf_plugin_init, /* Plugin Init */
 
54
  compressionudf_plugin_deinit, /* Plugin Deinit */
 
55
  NULL,   /* status variables */
 
56
  NULL,   /* system variables */
 
57
  NULL    /* config options */
 
58
}
 
59
drizzle_declare_plugin_end;