~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/compression/compressionudf.cc

  • Committer: Brian Aker
  • Date: 2009-12-03 01:17:53 UTC
  • mto: (1237.3.2 push)
  • mto: This revision was merged to the branch mainline in revision 1238.
  • Revision ID: brian@gaz-20091203011753-159h2no5m5c5dt9b
Small cleanups, did in MERGE table only engine flag.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 */
15
15
 
16
 
#include "config.h"
 
16
#include "drizzled/server_includes.h"
17
17
#include "drizzled/plugin/function.h"
18
18
 
19
19
#include "plugin/compression/compress.h"
28
28
plugin::Create_function<Item_func_uncompressed_length>
29
29
  *uncompressed_lengthudf= NULL;
30
30
 
31
 
static int compressionudf_plugin_init(plugin::Context &context)
 
31
static int compressionudf_plugin_init(plugin::Registry &registry)
32
32
{
33
33
  compressudf= new plugin::Create_function<Item_func_compress>("compress");
34
34
  uncompressudf=
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);
41
 
  return 0;
42
 
}
43
 
 
44
 
DRIZZLE_DECLARE_PLUGIN
45
 
{
46
 
  DRIZZLE_VERSION_ID,
 
38
  registry.add(compressudf);
 
39
  registry.add(uncompressudf);
 
40
  registry.add(uncompressed_lengthudf);
 
41
  return 0;
 
42
}
 
43
 
 
44
static int compressionudf_plugin_deinit(plugin::Registry &registry)
 
45
{
 
46
  registry.remove(compressudf);
 
47
  registry.remove(uncompressudf);
 
48
  registry.remove(uncompressed_lengthudf);
 
49
  delete compressudf;
 
50
  delete uncompressudf;
 
51
  delete uncompressed_lengthudf;
 
52
  return 0;
 
53
}
 
54
 
 
55
drizzle_declare_plugin
 
56
{
47
57
  "compression",
48
58
  "1.1",
49
59
  "Stewart Smith",
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 */
55
67
}
56
 
DRIZZLE_DECLARE_PLUGIN_END;
 
68
drizzle_declare_plugin_end;