summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authortsmith/tim@siva.hindu.god <>2006-08-23 13:28:01 -0600
committertsmith/tim@siva.hindu.god <>2006-08-23 13:28:01 -0600
commitecc1e1fe7d1993405f5fd8717402305a2c234de8 (patch)
treea6eb618672d59a950bbf0050967fb09dcb1589af /sql/item_strfunc.h
parenta4c6076cbe48410987567f957f4b4afff37a643e (diff)
parentc2f4e56940f26fc6da1e5c30d044f22ed35085d8 (diff)
downloadmariadb-git-ecc1e1fe7d1993405f5fd8717402305a2c234de8.tar.gz
Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-51
into siva.hindu.god:/usr/home/tim/m/bk/51
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 1b843b27203..b06fd9294aa 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -43,7 +43,10 @@ class Item_func_md5 :public Item_str_func
{
String tmp_value;
public:
- Item_func_md5(Item *a) :Item_str_func(a) {}
+ Item_func_md5(Item *a) :Item_str_func(a)
+ {
+ collation.set(&my_charset_bin);
+ }
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "md5"; }
@@ -54,7 +57,10 @@ public:
class Item_func_sha :public Item_str_func
{
public:
- Item_func_sha(Item *a) :Item_str_func(a) {}
+ Item_func_sha(Item *a) :Item_str_func(a)
+ {
+ collation.set(&my_charset_bin);
+ }
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "sha"; }
@@ -333,9 +339,21 @@ public:
class Item_func_encrypt :public Item_str_func
{
String tmp_value;
+
+ /* Encapsulate common constructor actions */
+ void constructor_helper()
+ {
+ collation.set(&my_charset_bin);
+ }
public:
- Item_func_encrypt(Item *a) :Item_str_func(a) {}
- Item_func_encrypt(Item *a, Item *b): Item_str_func(a,b) {}
+ Item_func_encrypt(Item *a) :Item_str_func(a)
+ {
+ constructor_helper();
+ }
+ Item_func_encrypt(Item *a, Item *b): Item_str_func(a,b)
+ {
+ constructor_helper();
+ }
String *val_str(String *);
void fix_length_and_dec() { maybe_null=1; max_length = 13; }
const char *func_name() const { return "encrypt"; }