summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorigor@olga.mysql.com <>2007-02-13 01:34:36 -0800
committerigor@olga.mysql.com <>2007-02-13 01:34:36 -0800
commitfb9e0ad3be786c69ffe24a5a60fc70dc53675c8d (patch)
tree0ebadd1cbf0ccf30ae7b01d82842db102e6a9fb3 /sql/field_conv.cc
parent4aab8494e9dab70f7ccd70f3033122580c729ffe (diff)
parent30614d22c195f25d7b59fb2651cfaca15697002c (diff)
downloadmariadb-git-fb9e0ad3be786c69ffe24a5a60fc70dc53675c8d.tar.gz
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/mysql-5.1-opt
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 2670de0387b..805aba01754 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -678,7 +678,7 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*)
/* Simple quick field convert that is called on insert */
-void field_conv(Field *to,Field *from)
+int field_conv(Field *to,Field *from)
{
if (to->real_type() == from->real_type() &&
!(to->type() == MYSQL_TYPE_BLOB && to->table->copy_blobs))
@@ -706,7 +706,7 @@ void field_conv(Field *to,Field *from)
if (to->ptr != from->ptr)
#endif
memcpy(to->ptr,from->ptr,to->pack_length());
- return;
+ return 0;
}
}
if (to->type() == MYSQL_TYPE_BLOB)
@@ -722,8 +722,7 @@ void field_conv(Field *to,Field *from)
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;
+ return blob->store(blob->value.ptr(),blob->value.length(),from->charset());
}
if ((from->result_type() == STRING_RESULT &&
(to->result_type() == STRING_RESULT ||
@@ -740,15 +739,15 @@ void field_conv(Field *to,Field *from)
end with \0. Can be replaced with .ptr() when we have our own
string->double conversion.
*/
- to->store(result.c_ptr_quick(),result.length(),from->charset());
+ return to->store(result.c_ptr_quick(),result.length(),from->charset());
}
else if (from->result_type() == REAL_RESULT)
- to->store(from->val_real());
+ return to->store(from->val_real());
else if (from->result_type() == DECIMAL_RESULT)
{
my_decimal buff;
- to->store_decimal(from->val_decimal(&buff));
+ return to->store_decimal(from->val_decimal(&buff));
}
else
- to->store(from->val_int(), test(from->flags & UNSIGNED_FLAG));
+ return to->store(from->val_int(), test(from->flags & UNSIGNED_FLAG));
}