From 24922a3092eb4d89e6b0f8c52ba7a0b29162758e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Sep 2005 14:32:19 +0500 Subject: a fix (bug #7589: Decimal types are ignored when updating data from another column). mysql-test/r/union.result: a fix (bug #7589: Decimal types are ignored when updating data from another column). removed wrong test result (see #13372) mysql-test/t/union.test: a fix (bug #7589: Decimal types are ignored when updating data from another column). removed wrong test result (see #13372) sql/field_conv.cc: a fix (bug #7589: Decimal types are ignored when updating data from another column). use memcpy() only for identical decimals. --- sql/field_conv.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/field_conv.cc') diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 7998dd6d5f8..d61b3735c91 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -599,6 +599,9 @@ void field_conv(Field *to,Field *from) !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) && to->real_type() != FIELD_TYPE_ENUM && to->real_type() != FIELD_TYPE_SET && + (to->real_type() != FIELD_TYPE_DECIMAL || + (to->field_length == from->field_length && + (((Field_num*) to)->dec == ((Field_num*) from)->dec))) && from->charset() == to->charset() && to->table->db_low_byte_first == from->table->db_low_byte_first) { // Identical fields -- cgit v1.2.1