diff options
author | unknown <igor@olga.mysql.com> | 2007-02-13 01:34:36 -0800 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-02-13 01:34:36 -0800 |
commit | 21df932dbdd63e2c0128334f761f23577c74b45c (patch) | |
tree | 0ebadd1cbf0ccf30ae7b01d82842db102e6a9fb3 /sql/field_conv.cc | |
parent | 9292b57707fb0a2ccd6fb07a777a0f2089f8f6c5 (diff) | |
parent | 4c2bc81ae762072973528e306c8fa80031b076b2 (diff) | |
download | mariadb-git-21df932dbdd63e2c0128334f761f23577c74b45c.tar.gz |
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/mysql-5.1-opt
BitKeeper/etc/gone:
auto-union
mysql-test/r/insert_select.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/insert_select.test:
Auto merged
mysql-test/t/join_outer.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysys/my_getopt.c:
Auto merged
sql/field.h:
Auto merged
sql/field_conv.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
mysql-test/include/mix1.inc:
Manual merge
mysql-test/r/information_schema.result:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/t/information_schema.test:
Manual merge
mysql-test/t/view.test:
Manual merge
mysys/my_pthread.c:
Manual merge
sql/mysql_priv.h:
Manual merge
sql/opt_range.cc:
Manual merge
sql/sql_insert.cc:
Manual merge
sql/sql_update.cc:
Manual merge
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 15 |
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)); } |