summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/field.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h
index be3a648617b..1344774c189 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1762,7 +1762,7 @@ public:
uchar null_bit_arg, utype unireg_check_arg,
const LEX_CSTRING *field_name_arg,
const DTCollation &collation);
- uint decimals() const { return NOT_FIXED_DEC; }
+ uint decimals() const { return is_created_from_null_item ? 0 : NOT_FIXED_DEC; }
int save_in_field(Field *to) { return save_in_field_str(to); }
bool memcpy_field_possible(const Field *from) const
{