~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/compress/compressudf.cc

  • Committer: Monty Taylor
  • Date: 2009-03-20 06:30:59 UTC
  • mfrom: (942.1.17 plugin-registration)
  • mto: This revision was merged to the branch mainline in revision 958.
  • Revision ID: mordred@inaugust.com-20090320063059-lr9hqvw15stxxgn3
Merged plugin registration branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <drizzled/sql_error.h>
22
22
#include <drizzled/current_session.h>
23
23
#include <zlib.h>
 
24
#include <string>
 
25
 
 
26
using namespace std;
24
27
 
25
28
class Item_func_compress: public Item_str_func
26
29
{
97
100
}
98
101
 
99
102
 
100
 
Item_func* create_compressudf_item(MEM_ROOT* m)
101
 
{
102
 
  return  new (m) Item_func_compress();
103
 
}
104
 
 
105
 
static struct udf_func compressudf = {
106
 
  { C_STRING_WITH_LEN("compress") },
107
 
  create_compressudf_item
108
 
};
 
103
Create_function<Item_func_compress> compressudf(string("compress"));
109
104
 
110
105
static int compressudf_plugin_init(void *p)
111
106
{
112
 
  udf_func **f = (udf_func**) p;
 
107
  Function_builder **f = (Function_builder**) p;
113
108
 
114
109
  *f= &compressudf;
115
110
 
118
113
 
119
114
static int compressudf_plugin_deinit(void *p)
120
115
{
121
 
  udf_func *udff = (udf_func *) p;
 
116
  Function_builder *udff = (Function_builder *) p;
122
117
  (void)udff;
123
118
  return 0;
124
119
}