summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc24
1 files changed, 17 insertions, 7 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index f50aaa578fb..acdadb61df5 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -2143,7 +2143,12 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
}
DBUG_ASSERT(m_new_file == 0);
m_new_file= new_file_array;
- if (unlikely((error= copy_partitions(copied, deleted))))
+ for (i= 0; i < part_count; i++)
+ m_added_file[i]->extra(HA_EXTRA_BEGIN_ALTER_COPY);
+ error= copy_partitions(copied, deleted);
+ for (i= 0; i < part_count; i++)
+ m_added_file[i]->extra(HA_EXTRA_END_ALTER_COPY);
+ if (unlikely(error))
{
/*
Close and unlock the new temporary partitions.
@@ -2733,6 +2738,7 @@ register_query_cache_dependant_tables(THD *thd,
2) MAX_ROWS, MIN_ROWS on partition
3) Index file name on partition
4) Data file name on partition
+ 5) Engine-defined attributes on partition
*/
int ha_partition::set_up_table_before_create(TABLE *tbl,
@@ -2770,6 +2776,10 @@ int ha_partition::set_up_table_before_create(TABLE *tbl,
if (info->connect_string.length)
info->used_fields|= HA_CREATE_USED_CONNECTION;
tbl->s->connect_string= part_elem->connect_string;
+ if (part_elem->option_list)
+ tbl->s->option_list= part_elem->option_list;
+ if (part_elem->option_struct)
+ tbl->s->option_struct= part_elem->option_struct;
DBUG_RETURN(0);
}
@@ -3625,31 +3635,31 @@ bool ha_partition::init_partition_bitmaps()
DBUG_ENTER("ha_partition::init_partition_bitmaps");
/* Initialize the bitmap we use to minimize ha_start_bulk_insert calls */
- if (my_bitmap_init(&m_bulk_insert_started, NULL, m_tot_parts + 1, FALSE))
+ if (my_bitmap_init(&m_bulk_insert_started, NULL, m_tot_parts + 1))
DBUG_RETURN(true);
/* Initialize the bitmap we use to keep track of locked partitions */
- if (my_bitmap_init(&m_locked_partitions, NULL, m_tot_parts, FALSE))
+ if (my_bitmap_init(&m_locked_partitions, NULL, m_tot_parts))
DBUG_RETURN(true);
/*
Initialize the bitmap we use to keep track of partitions which may have
something to reset in ha_reset().
*/
- if (my_bitmap_init(&m_partitions_to_reset, NULL, m_tot_parts, FALSE))
+ if (my_bitmap_init(&m_partitions_to_reset, NULL, m_tot_parts))
DBUG_RETURN(true);
/*
Initialize the bitmap we use to keep track of partitions which returned
HA_ERR_KEY_NOT_FOUND from index_read_map.
*/
- if (my_bitmap_init(&m_key_not_found_partitions, NULL, m_tot_parts, FALSE))
+ if (my_bitmap_init(&m_key_not_found_partitions, NULL, m_tot_parts))
DBUG_RETURN(true);
- if (bitmap_init(&m_mrr_used_partitions, NULL, m_tot_parts, TRUE))
+ if (my_bitmap_init(&m_mrr_used_partitions, NULL, m_tot_parts))
DBUG_RETURN(true);
- if (my_bitmap_init(&m_opened_partitions, NULL, m_tot_parts, FALSE))
+ if (my_bitmap_init(&m_opened_partitions, NULL, m_tot_parts))
DBUG_RETURN(true);
m_file_sample= NULL;