diff options
author | Alexander Barkov <alexander.barkov@oracle.com> | 2011-03-03 15:27:36 +0300 |
---|---|---|
committer | Alexander Barkov <alexander.barkov@oracle.com> | 2011-03-03 15:27:36 +0300 |
commit | cb018d83d758537694fbf1597657266e8f9cd517 (patch) | |
tree | 68f7e891d96d5fc77138c75d8e47b1c3a113e412 /sql/item_strfunc.cc | |
parent | ce5ab13578f6c26c21b60cff9efeb74961f1680e (diff) | |
parent | 1bc5e76efb18a5c69f711b4c57a4ff275b187141 (diff) | |
download | mariadb-git-cb018d83d758537694fbf1597657266e8f9cd517.tar.gz |
Merging from 5.1
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 0248c133f60..d23e5af4e29 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -699,6 +699,7 @@ String *Item_func_des_encrypt::val_str(String *str) tmp_arg[res_length-1]=tail; // save extra length tmp_value.realloc(res_length+1); tmp_value.length(res_length+1); + tmp_value.set_charset(&my_charset_bin); tmp_value[0]=(char) (128 | key_number); // Real encryption bzero((char*) &ivec,sizeof(ivec)); @@ -786,6 +787,7 @@ String *Item_func_des_decrypt::val_str(String *str) if ((tail=(uint) (uchar) tmp_value[length-2]) > 8) goto wrong_key; // Wrong key tmp_value.length(length-1-tail); + tmp_value.set_charset(&my_charset_bin); return &tmp_value; error: |