Merge bodhi.local:/opt/local/work/tmp_merge

into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0
This commit is contained in:
kostja@bodhi.local 2006-07-15 01:04:51 +04:00
commit f536f361d9
12 changed files with 126 additions and 39 deletions

View file

@ -674,9 +674,14 @@ void field_conv(Field *to,Field *from)
{ // Be sure the value is stored
Field_blob *blob=(Field_blob*) to;
from->val_str(&blob->value);
if (!blob->value.is_alloced() &&
from->real_type() != MYSQL_TYPE_STRING &&
from->real_type() != MYSQL_TYPE_VARCHAR)
/*
Copy value if copy_blobs is set, or source is not a string and
we have a pointer to its internal string conversion buffer.
*/
if (to->table->copy_blobs ||
(!blob->value.is_alloced() &&
from->real_type() != MYSQL_TYPE_STRING &&
from->real_type() != MYSQL_TYPE_VARCHAR))
blob->value.copy();
blob->store(blob->value.ptr(),blob->value.length(),from->charset());
return;