diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-08-23 16:30:05 -0600 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-08-23 16:30:05 -0600 |
commit | a9eebc998631280be56f5668cf6f182b61b9e78c (patch) | |
tree | da8fe892d7c3fd0a7d4cf30367cea809abaa4864 /sql/item_strfunc.h | |
parent | 4934231545c994b90517b2c1b4c9b85b4fbe2018 (diff) | |
parent | 216f20ad0067a2f3f8349cff3f10355f7ea7677e (diff) | |
download | mariadb-git-a9eebc998631280be56f5668cf6f182b61b9e78c.tar.gz |
Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-41
into siva.hindu.god:/usr/home/tim/m/bk/41
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
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 880a19242ca..b7cecad9516 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -41,7 +41,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"; } @@ -51,7 +54,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"; } @@ -310,9 +316,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 "ecrypt"; } |