diff options
author | tulin@dl145b.mysql.com <> | 2005-07-20 00:40:49 +0200 |
---|---|---|
committer | tulin@dl145b.mysql.com <> | 2005-07-20 00:40:49 +0200 |
commit | 7a37e581357c7345a1b5b2008f4b5bb3702a16f3 (patch) | |
tree | 6417c22b3952943cd8c849947df979db69f86418 | |
parent | a6c21a079163d2d09163cb4084ada38f4ddac929 (diff) | |
download | mariadb-git-7a37e581357c7345a1b5b2008f4b5bb3702a16f3.tar.gz |
merge
-rw-r--r-- | mysys/my_bitmap.c | 5 | ||||
-rw-r--r-- | sql/ha_partition.cc | 21 | ||||
-rw-r--r-- | sql/sql_bitmap.h | 2 |
3 files changed, 23 insertions, 5 deletions
diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c index ec03e345109..3c25321b715 100644 --- a/mysys/my_bitmap.c +++ b/mysys/my_bitmap.c @@ -351,11 +351,12 @@ void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2) void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit) { uchar use_byte= use_bit ? 0xff : 0; - uchar *to= map->bitmap + from_byte; - uchar *end= map->bitmap + map->bitmap_size; + uchar *to= (uchar *)map->bitmap + from_byte; + uchar *end= (uchar *)map->bitmap + (map->n_bits+7)/8; while (to < end) *to++= use_byte; + *map->last_word_ptr|= map->last_word_mask; /*Set last bits again*/ } diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 30dd79551b4..1f67637c5e5 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -67,8 +67,25 @@ static PARTITION_SHARE *get_share(const char *table_name, TABLE * table); MODULE create/delete handler object ****************************************************************************/ +static handlerton partition_hton = { + "partition", + 0, /* slot */ + 0, /* savepoint size */ + NULL /*ndbcluster_close_connection*/, + NULL, /* savepoint_set */ + NULL, /* savepoint_rollback */ + NULL, /* savepoint_release */ + NULL /*ndbcluster_commit*/, + NULL /*ndbcluster_rollback*/, + NULL, /* prepare */ + NULL, /* recover */ + NULL, /* commit_by_xid */ + NULL, /* rollback_by_xid */ + HTON_NO_FLAGS +}; + ha_partition::ha_partition(TABLE *table) - :handler(table), m_part_info(NULL), m_create_handler(FALSE), + :handler(&partition_hton, table), m_part_info(NULL), m_create_handler(FALSE), m_is_sub_partitioned(0) { DBUG_ENTER("ha_partition::ha_partition(table)"); @@ -86,7 +103,7 @@ ha_partition::ha_partition(TABLE *table) ha_partition::ha_partition(partition_info *part_info) - :handler(NULL), m_part_info(part_info), m_create_handler(TRUE), + :handler(&partition_hton, NULL), m_part_info(part_info), m_create_handler(TRUE), m_is_sub_partitioned(is_sub_partitioned(m_part_info)) { diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h index b2994da71f7..35c501ede56 100644 --- a/sql/sql_bitmap.h +++ b/sql/sql_bitmap.h @@ -55,7 +55,7 @@ public: void intersect_extended(ulonglong map2buff) { intersect(map2buff); - if (map.bitmap_size > sizeof(ulonglong)) + if (map.n_bits > sizeof(ulonglong) * 8) bitmap_set_above(&map, sizeof(ulonglong), test(map2buff & (LL(1) << (sizeof(ulonglong) * 8 - 1)))); } |