merge
This commit is contained in:
parent
8707870dd9
commit
ee7e3e710f
@ -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)
|
void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit)
|
||||||
{
|
{
|
||||||
uchar use_byte= use_bit ? 0xff : 0;
|
uchar use_byte= use_bit ? 0xff : 0;
|
||||||
uchar *to= map->bitmap + from_byte;
|
uchar *to= (uchar *)map->bitmap + from_byte;
|
||||||
uchar *end= map->bitmap + map->bitmap_size;
|
uchar *end= (uchar *)map->bitmap + (map->n_bits+7)/8;
|
||||||
|
|
||||||
while (to < end)
|
while (to < end)
|
||||||
*to++= use_byte;
|
*to++= use_byte;
|
||||||
|
*map->last_word_ptr|= map->last_word_mask; /*Set last bits again*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,8 +67,25 @@ static PARTITION_SHARE *get_share(const char *table_name, TABLE * table);
|
|||||||
MODULE create/delete handler object
|
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)
|
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)
|
m_is_sub_partitioned(0)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("ha_partition::ha_partition(table)");
|
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)
|
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))
|
m_is_sub_partitioned(is_sub_partitioned(m_part_info))
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
void intersect_extended(ulonglong map2buff)
|
void intersect_extended(ulonglong map2buff)
|
||||||
{
|
{
|
||||||
intersect(map2buff);
|
intersect(map2buff);
|
||||||
if (map.bitmap_size > sizeof(ulonglong))
|
if (map.n_bits > sizeof(ulonglong) * 8)
|
||||||
bitmap_set_above(&map, sizeof(ulonglong),
|
bitmap_set_above(&map, sizeof(ulonglong),
|
||||||
test(map2buff & (LL(1) << (sizeof(ulonglong) * 8 - 1))));
|
test(map2buff & (LL(1) << (sizeof(ulonglong) * 8 - 1))));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user