Fixed charset problem on UPDATE in non-default-charset field
This commit is contained in:
parent
f7322a3cbd
commit
17b4e3ed96
@ -520,7 +520,9 @@ void field_conv(Field *to,Field *from)
|
|||||||
char buff[MAX_FIELD_WIDTH];
|
char buff[MAX_FIELD_WIDTH];
|
||||||
String result(buff,sizeof(buff),default_charset_info);
|
String result(buff,sizeof(buff),default_charset_info);
|
||||||
from->val_str(&result,&result);
|
from->val_str(&result,&result);
|
||||||
to->store(result.c_ptr_quick(),result.length(),default_charset_info);
|
to->store(result.c_ptr_quick(),result.length(),
|
||||||
|
to->binary()?default_charset_info:((Field_str*)to)->charset());
|
||||||
|
// QQ: what to do if "from" and "to" are of dirrent charsets?
|
||||||
}
|
}
|
||||||
else if (from->result_type() == REAL_RESULT)
|
else if (from->result_type() == REAL_RESULT)
|
||||||
to->store(from->val_real());
|
to->store(from->val_real());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user