summaryrefslogtreecommitdiff
path: root/include/my_bitmap.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-10-06 11:45:30 +0300
committerMichael Widenius <monty@askmonty.org>2010-10-06 11:45:30 +0300
commit9f35e98a4baa518e8e0a464ebea8571f362ac641 (patch)
tree4283f36173c5a5a4d6fbc6fa3676620f405affd1 /include/my_bitmap.h
parent8b833274cad540f756039c8b730a5e692219d11c (diff)
downloadmariadb-git-9f35e98a4baa518e8e0a464ebea8571f362ac641.tar.gz
Fix for Bug#43152 "Assertion `bitmap_is_set_all(&table->s->all_set)' failed in handler::ha_reset"
The reason for this was that some bitmap test functions changed the bitmap, which caused problems when the same bitmap was used by multiple threads. include/my_bitmap.h: Changed order of elements to get better alignment. mysys/my_bitmap.c: Change bitmap test functions to not modify the bitmap. Fixed compiler errors in test_bitmap
Diffstat (limited to 'include/my_bitmap.h')
-rw-r--r--include/my_bitmap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index 994c5cb4299..39ee1d2f7fc 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -25,8 +25,6 @@ typedef uint32 my_bitmap_map;
typedef struct st_bitmap
{
my_bitmap_map *bitmap;
- uint n_bits; /* number of bits occupied by the above */
- my_bitmap_map last_word_mask;
my_bitmap_map *last_word_ptr;
/*
mutex will be acquired for the duration of each bitmap operation if
@@ -36,6 +34,8 @@ typedef struct st_bitmap
#ifdef THREAD
pthread_mutex_t *mutex;
#endif
+ my_bitmap_map last_word_mask;
+ uint32 n_bits; /* number of bits occupied by the above */
} MY_BITMAP;
#ifdef __cplusplus