Below is the list of changes that have just been committed into a local
5.0 repository of tsmith. When tsmith does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-08-15 04:25:14+02:00, tsmith@stripped +2 -0
Merge maint1.mysql.com:/data/localhome/tsmith/bk/50
into maint1.mysql.com:/data/localhome/tsmith/bk/b20536-50
MERGE: 1.2226.4.1
sql/item_strfunc.cc@stripped, 2006-08-15 04:25:09+02:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.275.3.1
sql/item_strfunc.h@stripped, 2006-08-15 04:25:09+02:00, tsmith@stripped +0 -0
Auto merged
MERGE: 1.110.3.1
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tsmith
# Host: maint1.mysql.com
# Root: /data/localhome/tsmith/bk/b20536-50/RESYNC
--- 1.280/sql/item_strfunc.cc 2006-08-15 04:24:03 +02:00
+++ 1.281/sql/item_strfunc.cc 2006-08-15 04:24:03 +02:00
@@ -124,6 +124,7 @@ String *Item_func_md5::val_str(String *s
{
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 *s
{
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(Strin
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(Stri
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(St
}
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
--- 1.114/sql/item_strfunc.h 2006-08-15 04:24:03 +02:00
+++ 1.115/sql/item_strfunc.h 2006-08-15 04:24:03 +02:00
@@ -43,7 +43,10 @@ class Item_func_md5 :public Item_str_fun
{
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"; }
@@ -53,7 +56,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"; }
@@ -325,9 +331,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"; }
| Thread |
|---|
| • bk commit into 5.0 tree (tsmith:1.2246) | tim | 15 Aug |