diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-07-17 08:57:29 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-08-26 23:39:52 +0200 |
commit | 0299ec29d4af3230741a62d5443c0562269b05b2 (patch) | |
tree | ab7faa1a142651632acaaa7b224fc51a8644b52a /unittest | |
parent | 05e29e177df243b700392b797e26cae43fd3181e (diff) | |
download | mariadb-git-0299ec29d4af3230741a62d5443c0562269b05b2.tar.gz |
cleanup: MY_BITMAP mutex
in about a hundred of users of MY_BITMAP, only two were using its
built-in mutex, and only one of those two was actually needing it.
Remove the mutex from MY_BITMAP, remove all associated conditions
and checks in bitmap functions. Use an external LOCK_temp_pool
mutex and temp_pool_set_next/temp_pool_clear_bit acccessors.
Remove bitmap_init/bitmap_free, always use my_* versions.
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/mysys/bitmap-t.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/unittest/mysys/bitmap-t.c b/unittest/mysys/bitmap-t.c index e8f41b32d2c..22466355191 100644 --- a/unittest/mysys/bitmap-t.c +++ b/unittest/mysys/bitmap-t.c @@ -129,8 +129,8 @@ my_bool test_compare_operators(MY_BITMAP *map, uint bitsize) MY_BITMAP *map2= &map2_obj, *map3= &map3_obj; my_bitmap_map map2buf[MAX_TESTED_BITMAP_SIZE]; my_bitmap_map map3buf[MAX_TESTED_BITMAP_SIZE]; - my_bitmap_init(&map2_obj, map2buf, bitsize, FALSE); - my_bitmap_init(&map3_obj, map3buf, bitsize, FALSE); + my_bitmap_init(&map2_obj, map2buf, bitsize); + my_bitmap_init(&map3_obj, map3buf, bitsize); bitmap_clear_all(map2); bitmap_clear_all(map3); for (i=0; i < no_loops; i++) @@ -374,7 +374,7 @@ my_bool test_compare(MY_BITMAP *map, uint bitsize) uint32 map2buf[MAX_TESTED_BITMAP_SIZE]; uint i, test_bit; uint no_loops= bitsize > 128 ? 128 : bitsize; - if (my_bitmap_init(&map2, map2buf, bitsize, FALSE)) + if (my_bitmap_init(&map2, map2buf, bitsize)) { diag("init error for bitsize %d", bitsize); return TRUE; @@ -433,7 +433,7 @@ my_bool test_intersect(MY_BITMAP *map, uint bitsize) MY_BITMAP map2; uint32 map2buf[MAX_TESTED_BITMAP_SIZE]; uint i, test_bit1, test_bit2, test_bit3; - if (my_bitmap_init(&map2, map2buf, bitsize2, FALSE)) + if (my_bitmap_init(&map2, map2buf, bitsize2)) { diag("init error for bitsize %d", bitsize2); return TRUE; @@ -481,7 +481,7 @@ my_bool do_test(uint bitsize) { MY_BITMAP map; my_bitmap_map buf[MAX_TESTED_BITMAP_SIZE]; - if (my_bitmap_init(&map, buf, bitsize, FALSE)) + if (my_bitmap_init(&map, buf, bitsize)) { diag("init error for bitsize %d", bitsize); goto error; |