summaryrefslogtreecommitdiff
path: root/mysys/my_bitmap.c
diff options
context:
space:
mode:
authorunknown <tulin@dl145b.mysql.com>2005-07-20 00:40:49 +0200
committerunknown <tulin@dl145b.mysql.com>2005-07-20 00:40:49 +0200
commitee7e3e710fb08ccb7c3ce701605fdb8e3cfba59d (patch)
tree6417c22b3952943cd8c849947df979db69f86418 /mysys/my_bitmap.c
parent8707870dd9591da198d9b9efa864d489e2f6764a (diff)
downloadmariadb-git-ee7e3e710fb08ccb7c3ce701605fdb8e3cfba59d.tar.gz
merge
Diffstat (limited to 'mysys/my_bitmap.c')
-rw-r--r--mysys/my_bitmap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c
index ec03e345109..3c25321b715 100644
--- a/mysys/my_bitmap.c
+++ b/mysys/my_bitmap.c
@@ -351,11 +351,12 @@ void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit)
{
uchar use_byte= use_bit ? 0xff : 0;
- uchar *to= map->bitmap + from_byte;
- uchar *end= map->bitmap + map->bitmap_size;
+ uchar *to= (uchar *)map->bitmap + from_byte;
+ uchar *end= (uchar *)map->bitmap + (map->n_bits+7)/8;
while (to < end)
*to++= use_byte;
+ *map->last_word_ptr|= map->last_word_mask; /*Set last bits again*/
}