~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/md5/md5udf.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

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 <drizzled/server_includes.h>
17
 
#include <drizzled/sql_udf.h>
18
 
#include <drizzled/item/func.h>
19
 
#include <drizzled/function/str/strfunc.h>
 
16
#include <drizzled/common_includes.h>
 
17
#include <drizzled/item_func.h>
 
18
#include <drizzled/item_strfunc.h>
20
19
 
21
20
#include <openssl/md5.h>
22
21
 
23
 
#include <stdio.h>
24
 
 
25
 
using namespace std;
26
 
 
27
22
class Item_func_md5 : public Item_str_func
28
23
{
29
24
public:
33
28
    max_length=32;
34
29
    args[0]->collation.set(
35
30
      get_charset_by_csname(args[0]->collation.collation->csname,
36
 
                            MY_CS_BINSORT), DERIVATION_COERCIBLE);
 
31
                            MY_CS_BINSORT,MYF(0)), DERIVATION_COERCIBLE);
37
32
  }
38
33
 
39
34
};
98
93
  return 0;
99
94
}
100
95
 
101
 
drizzle_declare_plugin(md5)
 
96
mysql_declare_plugin(md5)
102
97
{
103
98
  DRIZZLE_UDF_PLUGIN,
104
99
  "md5",
112
107
  NULL,   /* system variables */
113
108
  NULL    /* config options */
114
109
}
115
 
drizzle_declare_plugin_end;
 
110
mysql_declare_plugin_end;