~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/compression/compressionudf.cc

  • Committer: Stewart Smith
  • Date: 2010-02-15 03:55:09 UTC
  • mto: (1273.13.96 build)
  • mto: This revision was merged to the branch mainline in revision 1308.
  • Revision ID: stewart@flamingspork.com-20100215035509-y6sry4q4yymph2by
move SUBSTR, SUBSTRING and SUBSTR_INDEX to plugins. add parser hooks for substr being a plugin now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
plugin::Create_function<Item_func_uncompressed_length>
29
29
  *uncompressed_lengthudf= NULL;
30
30
 
31
 
static int compressionudf_plugin_init(module::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);
 
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;
41
52
  return 0;
42
53
}
43
54
 
50
61
  "UDFs for compression functions",
51
62
  PLUGIN_LICENSE_GPL,
52
63
  compressionudf_plugin_init, /* Plugin Init */
 
64
  compressionudf_plugin_deinit, /* Plugin Deinit */
 
65
  NULL,   /* status variables */
53
66
  NULL,   /* system variables */
54
67
  NULL    /* config options */
55
68
}