diff options
author | unknown <sergefp@mysql.com> | 2004-05-29 02:04:01 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-05-29 02:04:01 +0400 |
commit | 2da9c631e27ee83bade4bd0ee082d94c51c751aa (patch) | |
tree | 4df748977d76ebdb15b772574de0ba3d74ff2a78 /mysys | |
parent | e15678681c96b13937ffe7a0df04b17e1e564f70 (diff) | |
download | mariadb-git-2da9c631e27ee83bade4bd0ee082d94c51c751aa.tar.gz |
* New index_merge EXPLAIN output format
* Fixed a problem with wrong query results for partially covering keys in ROR-index_merge
* ROR-intersection retrieval plan choice algorithm now uses less disk IO
- and properly processes clustered PK range scans
* Fixed several minor range optimizer problems
* Added more comments
* Code cleanup
mysql-test/r/index_merge.result:
New index_merge EXPLAIN output format changes
mysql-test/r/index_merge_innodb.result:
New index_merge EXPLAIN output format changes
mysql-test/r/index_merge_ror.result:
New index_merge EXPLAIN output format changes
Added test for scans on keys that cover fields partially
Fixed a minor ROR optimizer problem
mysql-test/r/index_merge_ror_cpk.result:
More tests added
mysql-test/t/index_merge_ror.test:
New index_merge EXPLAIN output format changes
Added test for scans on keys that cover fields partially
Fixed a minor ROR optimizer problem
mysql-test/t/index_merge_ror_cpk.test:
More tests added
mysys/my_bitmap.c:
Comments added, code cleanup
sql/opt_range.cc:
Comments added, code cleanup
Numerous fixes, see changeset description
sql/opt_range.h:
Comments added, code cleanup
New index_merge EXPLAIN output format related changes
sql/sql_select.cc:
Comments added, code cleanup
New index_merge EXPLAIN output
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_bitmap.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c index 3c4caa413a9..a6a37fd5441 100644 --- a/mysys/my_bitmap.c +++ b/mysys/my_bitmap.c @@ -28,6 +28,9 @@ * when both arguments are bitmaps, they must be of the same size * bitmap_intersect() is an exception :) (for for Bitmap::intersect(ulonglong map2buff)) + + If THREAD is defined all bitmap operations except bitmap_init/bitmap_free + are thread-safe. TODO: Make assembler THREAD safe versions of these using test-and-set instructions @@ -332,29 +335,36 @@ void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2) /* - Get number of set bits in the bitmap + SYNOPSIS + bitmap_bits_set() + map + RETURN + Number of set bits in the bitmap. */ + uint bitmap_bits_set(const MY_BITMAP *map) { - uchar *m= map->bitmap, - *end= map->bitmap+map->bitmap_size; + uchar *m= map->bitmap; + uchar *end= m + map->bitmap_size; uint res= 0; DBUG_ASSERT(map->bitmap); - bitmap_lock((MY_BITMAP *)map); while (m < end) { res+= my_count_bits_ushort(*m++); } - bitmap_unlock((MY_BITMAP *)map); return res; } /* - Return number of first zero bit or MY_BIT_NONE if all bits are set. + SYNOPSIS + bitmap_get_first() + map + RETURN + Number of first unset bit in the bitmap or MY_BIT_NONE if all bits are set. */ uint bitmap_get_first(const MY_BITMAP *map) |