diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-08-23 13:43:28 -0600 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-08-23 13:43:28 -0600 |
commit | 09e78089090077e77b7aba04b9f92ac83cd81c81 (patch) | |
tree | 0eb52586890a031a218fe3bcc4c006a35f5a8428 /sql/item_strfunc.cc | |
parent | df4cbda0437b572ae151331cf4a1dda1b8f85d5e (diff) | |
parent | 0cb3d26d8df1c29efbaee6e1d224ee8460e7db42 (diff) | |
download | mariadb-git-09e78089090077e77b7aba04b9f92ac83cd81c81.tar.gz |
Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-50
into siva.hindu.god:/usr/home/tim/m/bk/50
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 0cd0ffcc38b..efd01d701b6 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -124,6 +124,7 @@ String *Item_func_md5::val_str(String *str) { DBUG_ASSERT(fixed == 1); String * sptr= args[0]->val_str(str); + str->set_charset(&my_charset_bin); if (sptr) { my_MD5_CTX context; @@ -170,6 +171,7 @@ String *Item_func_sha::val_str(String *str) { DBUG_ASSERT(fixed == 1); String * sptr= args[0]->val_str(str); + str->set_charset(&my_charset_bin); if (sptr) /* If we got value different from NULL */ { SHA1_CONTEXT context; /* Context used to generate SHA1 hash */ @@ -1605,7 +1607,7 @@ String *Item_func_encrypt::val_str(String *str) null_value= 1; return 0; } - str->set(tmp,(uint) strlen(tmp),res->charset()); + str->set(tmp, (uint) strlen(tmp), &my_charset_bin); str->copy(); pthread_mutex_unlock(&LOCK_crypt); return str; @@ -2041,7 +2043,7 @@ String *Item_func_make_set::val_str(String *str) return &my_empty_string; result= &tmp_str; } - if (tmp_str.append(',') || tmp_str.append(*res)) + if (tmp_str.append(STRING_WITH_LEN(","), &my_charset_bin) || tmp_str.append(*res)) return &my_empty_string; } } @@ -2699,8 +2701,12 @@ String* Item_func_export_set::val_str(String* str) } break; case 3: - sep_buf.set(STRING_WITH_LEN(","), default_charset()); - sep = &sep_buf; + { + /* errors is not checked - assume "," can always be converted */ + uint errors; + sep_buf.copy(STRING_WITH_LEN(","), &my_charset_bin, collation.collation, &errors); + sep = &sep_buf; + } break; default: DBUG_ASSERT(0); // cannot happen |