summaryrefslogtreecommitdiffstats
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
commit347c164c35eddab388009470e6848cb361ac93f8 (patch)
tree2c0c44eac690f510bb0a35b2a13b36d606b77b6b /sql/sql_partition.cc
parentReleasing progress-linux version 1:10.11.7-4~progress7.99u1. (diff)
downloadmariadb-347c164c35eddab388009470e6848cb361ac93f8.tar.xz
mariadb-347c164c35eddab388009470e6848cb361ac93f8.zip
Merging upstream version 1:10.11.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--sql/sql_partition.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 3c1a803c..590c2a50 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -1080,7 +1080,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;
@@ -1091,14 +1091,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);
@@ -7752,7 +7753,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") ||