summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-01-30 22:13:36 +0300
committerAlexander Nozdrin <alik@sun.com>2010-01-30 22:13:36 +0300
commit85c54dddc7f6303b0e48f6d9fb9c0c7561292e4b (patch)
treefa297f7fa59f84c3c05e83388795c51d18dd89a7 /sql/field.h
parenta59e381efabf9733a300ed3be322aefaede88d44 (diff)
parent788c28aceb023702282bfbf372016da79f9ab49f (diff)
downloadmariadb-git-85c54dddc7f6303b0e48f6d9fb9c0c7561292e4b.tar.gz
Manual merge from mysql-5.1-bugteam.
Conflicts: - mysql-test/collections/default.experimental - mysql-test/suite/rpl/r/rpl_binlog_grant.result - mysql-test/suite/rpl/r/rpl_sp.result - mysql-test/suite/rpl/t/rpl_binlog_grant.test - 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 159e4bf707c..8cfed9647f7 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1929,7 +1929,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);