mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '11.4' into 11.5
This commit is contained in:
@@ -1079,7 +1079,7 @@ void check_range_capable_PF(TABLE *table)
|
||||
|
||||
static bool set_up_partition_bitmaps(THD *thd, partition_info *part_info)
|
||||
{
|
||||
uint32 *bitmap_buf;
|
||||
my_bitmap_map *bitmap_buf;
|
||||
uint bitmap_bits= part_info->num_subparts?
|
||||
(part_info->num_subparts* part_info->num_parts):
|
||||
part_info->num_parts;
|
||||
@@ -1090,14 +1090,15 @@ static bool set_up_partition_bitmaps(THD *thd, partition_info *part_info)
|
||||
|
||||
/* Allocate for both read and lock_partitions */
|
||||
if (unlikely(!(bitmap_buf=
|
||||
(uint32*) alloc_root(&part_info->table->mem_root,
|
||||
bitmap_bytes * 2))))
|
||||
(my_bitmap_map*) alloc_root(&part_info->table->mem_root,
|
||||
bitmap_bytes * 2))))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
my_bitmap_init(&part_info->read_partitions, bitmap_buf, bitmap_bits);
|
||||
/* Use the second half of the allocated buffer for lock_partitions */
|
||||
my_bitmap_init(&part_info->lock_partitions, bitmap_buf + (bitmap_bytes / 4),
|
||||
bitmap_bits);
|
||||
my_bitmap_init(&part_info->lock_partitions,
|
||||
(my_bitmap_map*) (((char*) bitmap_buf) + bitmap_bytes),
|
||||
bitmap_bits);
|
||||
part_info->bitmaps_are_initialized= TRUE;
|
||||
part_info->set_partition_bitmaps(NULL);
|
||||
DBUG_RETURN(FALSE);
|
||||
@@ -7758,7 +7759,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
|
||||
ERROR_INJECT("add_partition_1") ||
|
||||
mysql_write_frm(lpt, WFRM_WRITE_SHADOW) ||
|
||||
ERROR_INJECT("add_partition_2") ||
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) ||
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_RENAME) ||
|
||||
ERROR_INJECT("add_partition_3") ||
|
||||
write_log_add_change_partition(lpt) ||
|
||||
ERROR_INJECT("add_partition_4") ||
|
||||
|
Reference in New Issue
Block a user