diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-08-14 18:59:43 -0600 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-08-14 18:59:43 -0600 |
commit | 0cb3d26d8df1c29efbaee6e1d224ee8460e7db42 (patch) | |
tree | dbe252f60136969d5df88b8310bc1d1ba4757288 /sql/item_strfunc.cc | |
parent | 75e40b161b5cbbea28eca2641e6dfadaf09267a1 (diff) | |
parent | 3212b399a85b3c985655b950443fe09133c0922c (diff) | |
download | mariadb-git-0cb3d26d8df1c29efbaee6e1d224ee8460e7db42.tar.gz |
Manual merge, and add --echo End of 5.0 tests to ctype_ucs
sql/item_strfunc.h:
Auto merged
mysql-test/r/ctype_ucs.result:
Add --echo End of 5.0 tests
mysql-test/t/ctype_ucs.test:
Add --echo End of 5.0 tests
sql/item_strfunc.cc:
Manual merge
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 5ceb462385c..948f4a3c3be 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 */ @@ -1588,7 +1590,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; @@ -2024,7 +2026,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; } } @@ -2682,8 +2684,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 |