diff options
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h index e1f7b8c6a29..c30bbfae879 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1888,7 +1888,12 @@ public: uint32 max_display_length() { return field_length; } uint size_of() const { return sizeof(*this); } Item_result result_type () const { return INT_RESULT; } - int reset(void) { bzero(ptr, bytes_in_rec); return 0; } + int reset(void) { + bzero(ptr, bytes_in_rec); + if (bit_ptr && (bit_len > 0)) // reset odd bits among null bits + clr_rec_bits(bit_ptr, bit_ofs, bit_len); + return 0; + } int store(const char *to, uint length, CHARSET_INFO *charset); int store(double nr); int store(longlong nr, bool unsigned_val); |