diff options
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h index ca85a7c276f..e554f92031c 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1636,6 +1636,8 @@ public: bool eq_def(const Field *field) const; Copy_func *get_copy_func(const Field *from) const { + if (unsigned_flag && from->cmp_type() == DECIMAL_RESULT) + return do_field_decimal; return do_field_int; } int save_in_field(Field *to) @@ -3661,6 +3663,8 @@ public: } Copy_func *get_copy_func(const Field *from) const { + if (from->cmp_type() == DECIMAL_RESULT) + return do_field_decimal; return do_field_int; } int save_in_field(Field *to) { return to->store(val_int(), true); } |