summaryrefslogtreecommitdiff
path: root/include/my_bitmap.h
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2011-02-16 16:33:02 +0100
committerJon Olav Hauglid <jon.hauglid@oracle.com>2011-02-16 16:33:02 +0100
commitf65f016aeeba1e7cee6cd3f4f07599cfb92d3001 (patch)
tree73727eac8d3bcd4f7827ae75e5040dce9818c5b4 /include/my_bitmap.h
parente24f16a6cd7786b0900be12484f45f8bcbd8006b (diff)
parent6ad0c9b16daccb64ec34dffc8a21e73ca9c6073d (diff)
downloadmariadb-git-f65f016aeeba1e7cee6cd3f4f07599cfb92d3001.tar.gz
Merge from mysql-5.1 to mysql-5.5
Text conflict in include/my_bit.h Text conflict in include/my_bitmap.h Text conflict in mysys/my_bitmap.c
Diffstat (limited to 'include/my_bitmap.h')
-rw-r--r--include/my_bitmap.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index 78b33b09a51..80a7fce1155 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB, 2009 Sun Microsystems, Inc
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -125,9 +125,10 @@ bitmap_is_set(const MY_BITMAP *map,uint bit)
static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
- *(map1)->last_word_ptr|= (map1)->last_word_mask;
- *(map2)->last_word_ptr|= (map2)->last_word_mask;
- return memcmp((map1)->bitmap, (map2)->bitmap, 4*no_words_in_map((map1)))==0;
+ if (memcmp(map1->bitmap, map2->bitmap, 4*(no_words_in_map(map1)-1)) != 0)
+ return FALSE;
+ return ((*map1->last_word_ptr | map1->last_word_mask) ==
+ (*map2->last_word_ptr | map2->last_word_mask));
}
#define bitmap_clear_all(MAP) \