diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/heap.h | 7 | ||||
-rw-r--r-- | include/my_base.h | 10 | ||||
-rw-r--r-- | include/my_bitmap.h | 6 | ||||
-rw-r--r-- | include/myisam.h | 5 | ||||
-rw-r--r-- | include/myisammrg.h | 5 |
5 files changed, 20 insertions, 13 deletions
diff --git a/include/heap.h b/include/heap.h index b536937c8c0..63f2abbabc7 100644 --- a/include/heap.h +++ b/include/heap.h @@ -182,11 +182,8 @@ extern int heap_disable_indexes(HP_INFO *info); extern int heap_enable_indexes(HP_INFO *info); extern int heap_indexes_are_disabled(HP_INFO *info); extern void heap_update_auto_increment(HP_INFO *info, const byte *record); -ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, const byte *start_key, - uint start_key_len, - enum ha_rkey_function start_search_flag, - const byte *end_key, uint end_key_len, - enum ha_rkey_function end_search_flag); +ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, key_range *min_key, + key_range *max_key); int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key, uint key_len, enum ha_rkey_function find_flag); extern gptr heap_find(HP_INFO *info,int inx,const byte *key); diff --git a/include/my_base.h b/include/my_base.h index 4a2f3f85083..f912cb4278c 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -349,6 +349,16 @@ enum data_file_type { STATIC_RECORD,DYNAMIC_RECORD,COMPRESSED_RECORD }; +/* For key ranges */ + +typedef struct st_key_range +{ + const byte *key; + uint length; + enum ha_rkey_function flag; +} key_range; + + /* For number of records */ #ifdef BIG_TABLES #define rows2double(A) ulonglong2double(A) diff --git a/include/my_bitmap.h b/include/my_bitmap.h index 5b3da011f54..a4511bf3414 100644 --- a/include/my_bitmap.h +++ b/include/my_bitmap.h @@ -55,6 +55,12 @@ extern void bitmap_set_bit(MY_BITMAP *map, uint bitmap_bit); extern void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size); extern void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2); extern void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2); + +/* Fast, not thread safe, bitmap functions */ +#define bitmap_fast_set_bit(MAP, BIT) (MAP)->bitmap[(BIT) / 8] |= (1 << ((BIT) & 7)) +#define bitmap_fast_clear_bit(MAP, BIT) (MAP)->bitmap[(BIT) / 8] &= ~ (1 << ((BIT) & 7)) +#define bitmap_fast_is_set(MAP, BIT) (MAP)->bitmap[(BIT) / 8] & (1 << ((BIT) & 7)) + #ifdef __cplusplus } #endif diff --git a/include/myisam.h b/include/myisam.h index 93e2dc15574..c99e9a30b08 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -231,10 +231,7 @@ extern int mi_extra(struct st_myisam_info *file, enum ha_extra_function function, void *extra_arg); extern ha_rows mi_records_in_range(struct st_myisam_info *info,int inx, - const byte *start_key,uint start_key_len, - enum ha_rkey_function start_search_flag, - const byte *end_key,uint end_key_len, - enum ha_rkey_function end_search_flag); + key_range *min_key, key_range *max_key); extern int mi_log(int activate_log); extern int mi_is_changed(struct st_myisam_info *info); extern int mi_delete_all_rows(struct st_myisam_info *info); diff --git a/include/myisammrg.h b/include/myisammrg.h index 8b09e1a9231..de8a36c2d0a 100644 --- a/include/myisammrg.h +++ b/include/myisammrg.h @@ -101,10 +101,7 @@ extern int myrg_extra(MYRG_INFO *file,enum ha_extra_function function, void *extra_arg); extern void myrg_extrafunc(MYRG_INFO *info,invalidator_by_filename inv); extern ha_rows myrg_records_in_range(MYRG_INFO *info,int inx, - const byte *start_key,uint start_key_len, - enum ha_rkey_function start_search_flag, - const byte *end_key,uint end_key_len, - enum ha_rkey_function end_search_flag); + key_range *min_key, key_range *max_key); extern ulonglong myrg_position(MYRG_INFO *info); #ifdef __cplusplus |