summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-02-06 13:28:06 +0300
committerKonstantin Osipov <kostja@sun.com>2010-02-06 13:28:06 +0300
commit9c030fe5081163babdc8ef24395d108a394107fe (patch)
tree16fe2efa0a3d5e40e00972a1dc3bc4e13f71170c /sql/field.h
parent0b2f51664d38ed24f3f8b237877520e45bfe83f6 (diff)
parent19df110369d4cef5303176a8aedca34cd0e2d271 (diff)
downloadmariadb-git-9c030fe5081163babdc8ef24395d108a394107fe.tar.gz
Merge next-mr -> next-4284.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h
index ce874706bc5..7903e8daa0b 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1887,7 +1887,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);