summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-09-21 14:32:19 +0500
committerunknown <ramil@mysql.com>2005-09-21 14:32:19 +0500
commitecbc0dcb9086c4dd6581f8418002548d9fbc90e6 (patch)
treef824a5e5b4454dcc84597a2412aedd6c130ccc61 /sql/field_conv.cc
parent12a960fae0d31877f8a494c14685001ebc612e66 (diff)
downloadmariadb-git-ecbc0dcb9086c4dd6581f8418002548d9fbc90e6.tar.gz
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.
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc3
1 files changed, 3 insertions, 0 deletions
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