~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/md5/md5.cc

  • Committer: Mark Atwood
  • Date: 2011-09-16 17:16:41 UTC
  • mfrom: (2409.3.4 rf)
  • Revision ID: me@mark.atwood.name-20110916171641-ri5n2bd1xsqi5jfb
mergeĀ lp:~olafvdspek/drizzle/refactor7

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
class Md5Function : public Item_str_func
33
33
{
34
34
public:
35
 
  Md5Function() : Item_str_func() {}
36
35
  String *val_str(String*);
37
36
 
38
37
  void fix_length_and_dec() 
39
38
  {
40
39
    max_length= 32;
41
 
    args[0]->collation.set(
42
 
      get_charset_by_csname(args[0]->collation.collation->csname,
43
 
                            MY_CS_BINSORT), DERIVATION_COERCIBLE);
 
40
    args[0]->collation.set(get_charset_by_csname(args[0]->collation.collation->csname, MY_CS_BINSORT), DERIVATION_COERCIBLE);
44
41
  }
45
42
 
46
43
  const char *func_name() const 
89
86
  return str;
90
87
}
91
88
 
92
 
 
93
 
plugin::Create_function<Md5Function> *md5udf= NULL;
94
 
 
95
89
static int initialize(module::Context &context)
96
90
{
97
91
  /* Initialize libgcrypt */
106
100
  /* Tell Libgcrypt that initialization has completed. */
107
101
  gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
108
102
 
109
 
  md5udf= new plugin::Create_function<Md5Function>("md5");
110
 
  context.add(md5udf);
 
103
  context.add(new plugin::Create_function<Md5Function>("md5"));
111
104
  return 0;
112
105
}
113
106