summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-01-31 00:26:38 +0300
committerAlexander Nozdrin <alik@sun.com>2010-01-31 00:26:38 +0300
commit417e13847034db2a829c4f9809cd6f284b3652fb (patch)
tree47cd0f017d8fe7dc11238110ab3745bdc9179272 /sql/field.h
parent27b957a38fbd78db4e6b09799396284cf4a5a10e (diff)
parentb55d41cb6a960980ea6ce07a68b0745287dc1b6b (diff)
downloadmariadb-git-417e13847034db2a829c4f9809cd6f284b3652fb.tar.gz
Manual merge from mysql-trunk-merge.
Conflicts: - mysql-test/collections/default.experimental - mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result - mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
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 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);