diff options
author | unknown <monty@mysql.com> | 2006-06-04 21:05:22 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2006-06-04 21:05:22 +0300 |
commit | 555eb848f2aa3ac5eb09b251072930eb38cd8f7e (patch) | |
tree | 8e3365da0e05942d80e6e6ae092f7e0e40832fe2 /include | |
parent | 14e1d69aeaa09075fe3ec609d5ccdcf899508d7d (diff) | |
parent | 01d03e7b4b14b805a0d19c8473a495f05b34de65 (diff) | |
download | mariadb-git-555eb848f2aa3ac5eb09b251072930eb38cd8f7e.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/my/mysql-5.1
BitKeeper/etc/ignore:
auto-union
include/heap.h:
Auto merged
include/my_base.h:
Auto merged
include/mysql_com.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/ndb_index_unique.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/ha_federated.h:
Auto merged
sql/ha_heap.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_myisam.h:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/ha_partition.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/spatial.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_bitmap.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.h:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
storage/archive/ha_archive.h:
Auto merged
storage/example/ha_example.cc:
Auto merged
storage/myisam/ft_boolean_search.c:
Auto merged
unittest/mysys/base64-t.c:
Auto merged
mysql-test/r/innodb_mysql.result:
manual merge
mysql-test/t/innodb_mysql.test:
manual merge
mysql-test/valgrind.supp:
manual merge
sql/event.cc:
manual merge
sql/ha_heap.cc:
manual merge
sql/ha_myisam.cc:
manual merge
sql/ha_ndbcluster.cc:
manual merge
sql/ha_ndbcluster_binlog.cc:
manual merge
sql/ha_partition.cc:
manual merge
sql/handler.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/handler.h:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/item.h:
automatic merge
sql/item_cmpfunc.cc:
automatic merge
sql/log_event.cc:
manual merge
Trivial cleanup
sql/mysql_priv.h:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/opt_range.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/sql_delete.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/sql_insert.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/sql_load.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/sql_select.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/sql_show.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/sql_table.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/sql_update.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
sql/table.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
storage/blackhole/ha_blackhole.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
storage/csv/ha_tina.cc:
manual merge
renamed print_key_dupp_error to print_key_dup_error
mysql-test/valgrind.supp.orig:
Manual merge
Diffstat (limited to 'include')
-rw-r--r-- | include/base64.h | 2 | ||||
-rw-r--r-- | include/heap.h | 1 | ||||
-rw-r--r-- | include/my_base.h | 11 | ||||
-rw-r--r-- | include/my_bitmap.h | 53 | ||||
-rw-r--r-- | include/myisam.h | 1 | ||||
-rw-r--r-- | include/myisammrg.h | 1 | ||||
-rw-r--r-- | include/mysql_com.h | 1 |
7 files changed, 36 insertions, 34 deletions
diff --git a/include/base64.h b/include/base64.h index a2b0fc0352b..4653e824a9a 100644 --- a/include/base64.h +++ b/include/base64.h @@ -21,8 +21,6 @@ extern "C" { #endif -#include <my_global.h> - /* Calculate how much memory needed for dst of base64_encode() */ diff --git a/include/heap.h b/include/heap.h index 4c003462a45..985b20f9dc9 100644 --- a/include/heap.h +++ b/include/heap.h @@ -209,6 +209,7 @@ extern int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, extern int heap_delete_table(const char *name); extern void heap_drop_table(HP_INFO *info); extern int heap_extra(HP_INFO *info,enum ha_extra_function function); +extern int heap_reset(HP_INFO *info); extern int heap_rename(const char *old_name,const char *new_name); extern int heap_panic(enum ha_panic_function flag); extern int heap_rsame(HP_INFO *info,byte *record,int inx); diff --git a/include/my_base.h b/include/my_base.h index e77bffeaf94..728b2ab2a1b 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -102,7 +102,7 @@ enum ha_key_alg { enum ha_extra_function { HA_EXTRA_NORMAL=0, /* Optimize for space (def) */ HA_EXTRA_QUICK=1, /* Optimize for speed */ - HA_EXTRA_RESET=2, /* Reset database to after open */ + HA_EXTRA_NOT_USED=2, HA_EXTRA_CACHE=3, /* Cache record in HA_rrnd() */ HA_EXTRA_NO_CACHE=4, /* End caching of records (def) */ HA_EXTRA_NO_READCHECK=5, /* No readcheck on update */ @@ -128,15 +128,6 @@ enum ha_extra_function { HA_EXTRA_RESET_STATE, /* Reset positions */ HA_EXTRA_IGNORE_DUP_KEY, /* Dup keys don't rollback everything*/ HA_EXTRA_NO_IGNORE_DUP_KEY, - /* - Instructs InnoDB to retrieve all columns (except in key read), not just - those where field->query_id is the same as the current query id - */ - HA_EXTRA_RETRIEVE_ALL_COLS, - /* - Instructs InnoDB to retrieve at least all the primary key columns - */ - HA_EXTRA_RETRIEVE_PRIMARY_KEY, HA_EXTRA_PREPARE_FOR_DELETE, HA_EXTRA_PREPARE_FOR_UPDATE, /* Remove read cache if problems */ HA_EXTRA_PRELOAD_BUFFER_SIZE, /* Set buffer size for preloading */ diff --git a/include/my_bitmap.h b/include/my_bitmap.h index 428ca7dc702..0b16a1b4832 100644 --- a/include/my_bitmap.h +++ b/include/my_bitmap.h @@ -17,19 +17,18 @@ #ifndef _my_bitmap_h_ #define _my_bitmap_h_ -#ifdef THREAD -#include <my_pthread.h> -#endif - #define MY_BIT_NONE (~(uint) 0) +#include <m_string.h> + +typedef uint32 my_bitmap_map; typedef struct st_bitmap { - uint32 *bitmap; + my_bitmap_map *bitmap; uint n_bits; /* number of bits occupied by the above */ - uint32 last_word_mask; - uint32 *last_word_ptr; + my_bitmap_map last_word_mask; + my_bitmap_map *last_word_ptr; /* mutex will be acquired for the duration of each bitmap operation if thread_safe flag in bitmap_init was set. Otherwise, we optimize by not @@ -43,12 +42,16 @@ typedef struct st_bitmap #ifdef __cplusplus extern "C" { #endif -extern my_bool bitmap_init(MY_BITMAP *map, uint32 *buf, uint n_bits, my_bool thread_safe); +extern my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, + my_bool thread_safe); extern my_bool bitmap_is_clear_all(const MY_BITMAP *map); extern my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size); extern my_bool bitmap_is_set_all(const MY_BITMAP *map); extern my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2); +extern my_bool bitmap_is_overlapping(const MY_BITMAP *map1, + const MY_BITMAP *map2); extern my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit); +extern my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit); extern my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit); extern uint bitmap_set_next(MY_BITMAP *map); extern uint bitmap_get_first(const MY_BITMAP *map); @@ -62,6 +65,7 @@ extern void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2); extern void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2); extern void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2); extern void bitmap_invert(MY_BITMAP *map); +extern void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2); extern uint bitmap_lock_set_next(MY_BITMAP *map); extern void bitmap_lock_clear_bit(MY_BITMAP *map, uint bitmap_bit); @@ -88,7 +92,7 @@ extern void bitmap_lock_xor(MY_BITMAP *map, const MY_BITMAP *map2); extern void bitmap_lock_invert(MY_BITMAP *map); #endif /* Fast, not thread safe, bitmap functions */ -#define bitmap_buffer_size(bits) 4*(((bits)+31)/32); +#define bitmap_buffer_size(bits) (((bits)+31)/32)*4 #define no_bytes_in_map(map) (((map)->n_bits + 7)/8) #define no_words_in_map(map) (((map)->n_bits + 31)/32) #define bytes_word_aligned(bytes) (4*((bytes + 3)/4)) @@ -98,28 +102,28 @@ extern void bitmap_lock_invert(MY_BITMAP *map); ^= (1 << ((BIT) & 7))) #define _bitmap_clear_bit(MAP, BIT) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \ &= ~ (1 << ((BIT) & 7))) -#define _bitmap_is_set(MAP, BIT) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \ - & (1 << ((BIT) & 7))) +#define _bitmap_is_set(MAP, BIT) (uint) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \ + & (1 << ((BIT) & 7))) #ifndef DBUG_OFF -static inline uint32 +static inline void bitmap_set_bit(MY_BITMAP *map,uint bit) { DBUG_ASSERT(bit < (map)->n_bits); - return _bitmap_set_bit(map,bit); + _bitmap_set_bit(map,bit); } -static inline uint32 +static inline void bitmap_flip_bit(MY_BITMAP *map,uint bit) { DBUG_ASSERT(bit < (map)->n_bits); - return _bitmap_flip_bit(map,bit); + _bitmap_flip_bit(map,bit); } -static inline uint32 +static inline void bitmap_clear_bit(MY_BITMAP *map,uint bit) { DBUG_ASSERT(bit < (map)->n_bits); - return _bitmap_clear_bit(map,bit); + _bitmap_clear_bit(map,bit); } -static inline uint32 +static inline uint bitmap_is_set(const MY_BITMAP *map,uint bit) { DBUG_ASSERT(bit < (map)->n_bits); @@ -131,11 +135,16 @@ bitmap_is_set(const MY_BITMAP *map,uint bit) #define bitmap_clear_bit(MAP, BIT) _bitmap_clear_bit(MAP, BIT) #define bitmap_is_set(MAP, BIT) _bitmap_is_set(MAP, BIT) #endif -#define bitmap_cmp(MAP1, MAP2) \ - (memcmp((MAP1)->bitmap, (MAP2)->bitmap, 4*no_words_in_map((MAP1)))==0) + +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; +} + #define bitmap_clear_all(MAP) \ - { memset((MAP)->bitmap, 0, 4*no_words_in_map((MAP))); \ - *(MAP)->last_word_ptr|= (MAP)->last_word_mask; } + { memset((MAP)->bitmap, 0, 4*no_words_in_map((MAP))); } #define bitmap_set_all(MAP) \ (memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP)))) diff --git a/include/myisam.h b/include/myisam.h index db1a7bd984d..075779a6e42 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -303,6 +303,7 @@ extern int mi_rename(const char *from, const char *to); extern int mi_extra(struct st_myisam_info *file, enum ha_extra_function function, void *extra_arg); +extern int mi_reset(struct st_myisam_info *file); extern ha_rows mi_records_in_range(struct st_myisam_info *info,int inx, key_range *min_key, key_range *max_key); extern int mi_log(int activate_log); diff --git a/include/myisammrg.h b/include/myisammrg.h index de8a36c2d0a..f23759e22e1 100644 --- a/include/myisammrg.h +++ b/include/myisammrg.h @@ -99,6 +99,7 @@ extern int myrg_create(const char *name, const char **table_names, uint insert_method, my_bool fix_names); extern int myrg_extra(MYRG_INFO *file,enum ha_extra_function function, void *extra_arg); +extern int myrg_reset(MYRG_INFO *info); extern void myrg_extrafunc(MYRG_INFO *info,invalidator_by_filename inv); extern ha_rows myrg_records_in_range(MYRG_INFO *info,int inx, key_range *min_key, key_range *max_key); diff --git a/include/mysql_com.h b/include/mysql_com.h index bff5fcc47d2..623aaf43783 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -98,6 +98,7 @@ enum enum_server_command #define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */ #define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */ #define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */ +#define FIELD_IN_ADD_INDEX (1<< 20) /* Intern: Field used in ADD INDEX */ #define REFRESH_GRANT 1 /* Refresh grant tables */ #define REFRESH_LOG 2 /* Start on new log file */ |