diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-08-14 22:42:07 -0600 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-08-14 22:42:07 -0600 |
commit | dc7751e181465667a57b9dc2a1e82c06ac400a65 (patch) | |
tree | 0859cd3a7a52cd7c22d583c4838773dcfbb2dd47 /sql/item_strfunc.h | |
parent | c235176ed12788a2ec292062dd33700e80fe6b0e (diff) | |
parent | 0cb3d26d8df1c29efbaee6e1d224ee8460e7db42 (diff) | |
download | mariadb-git-dc7751e181465667a57b9dc2a1e82c06ac400a65.tar.gz |
Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-50
into siva.hindu.god:/usr/home/tim/m/bk/b20536-51
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index e085c0b4d7b..970ae4d73d2 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"; } |