summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authortsmith/tim@siva.hindu.god <>2006-08-14 18:59:43 -0600
committertsmith/tim@siva.hindu.god <>2006-08-14 18:59:43 -0600
commit9228972cd46e58e0083cdcbcdcb6424fcd084878 (patch)
treedbe252f60136969d5df88b8310bc1d1ba4757288 /sql/item_strfunc.h
parent951eb48a6207669b3f1946ffebf3ea91fe5f8cf4 (diff)
parent72d55f38789334e71a9c1de97c9a611e25c6bd66 (diff)
downloadmariadb-git-9228972cd46e58e0083cdcbcdcb6424fcd084878.tar.gz
Manual merge, and add --echo End of 5.0 tests to ctype_ucs
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 46b1b2fc248..1b1ca49b669 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"; }
@@ -53,7 +56,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"; }
@@ -321,9 +327,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"; }