summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-01-17 16:13:56 -0800
committerjimw@mysql.com <>2005-01-17 16:13:56 -0800
commita35c324358a82d3530632a84b54dba03564386af (patch)
treed4d9c5b300c1006f3cb125675a91727135d84dc0 /sql/field_conv.cc
parent46e444293afb4179593871646088b525dd638a33 (diff)
downloadmariadb-git-a35c324358a82d3530632a84b54dba03564386af.tar.gz
Fix over-optimization that could result in an unsigned double field being
set to a negative value. (Bug #7700)
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index db0cc71c6bf..7aaabde4f55 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -537,6 +537,7 @@ void field_conv(Field *to,Field *from)
if (to->real_type() == from->real_type())
{
if (to->pack_length() == from->pack_length() &&
+ !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) &&
to->real_type() != FIELD_TYPE_ENUM &&
to->real_type() != FIELD_TYPE_SET &&
to->table->db_low_byte_first == from->table->db_low_byte_first)