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.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 76e80711a22..bf999371ec4 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -89,7 +89,7 @@ static handler *partition_create_handler(handlerton *hton,
TABLE_SHARE *share,
MEM_ROOT *mem_root);
static uint partition_flags();
-static ulonglong alter_table_flags(ulonglong flags);
+static alter_table_operations alter_table_flags(alter_table_operations flags);
/*
If frm_error() is called then we will use this to to find out what file
@@ -214,7 +214,7 @@ static uint partition_flags()
return HA_CAN_PARTITION;
}
-static ulonglong alter_table_flags(ulonglong /* flags */)
+static alter_table_operations alter_table_flags(alter_table_operations flags __attribute__((unused)))
{
return (HA_PARTITION_FUNCTION_SUPPORTED |
HA_FAST_CHANGE_PARTITION);
@@ -1380,7 +1380,7 @@ int ha_partition::handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt,
when ALTER TABLE <CMD> PARTITION ...
it should only do named partitions, otherwise all partitions
*/
- if (!(thd->lex->alter_info.flags & Alter_info::ALTER_ADMIN_PARTITION) ||
+ if (!(thd->lex->alter_info.flags & ALTER_ADMIN_PARTITION) ||
part_elem->part_state == PART_ADMIN)
{
if (m_is_sub_partitioned)
@@ -9655,7 +9655,7 @@ void ha_partition::print_error(int error, myf errflag)
/* Should probably look for my own errors first */
if ((error == HA_ERR_NO_PARTITION_FOUND) &&
- ! (thd->lex->alter_info.flags & Alter_info::ALTER_TRUNCATE_PARTITION))
+ ! (thd->lex->alter_info.flags & ALTER_TRUNCATE_PARTITION))
{
m_part_info->print_no_partition_found(table, errflag);
DBUG_VOID_RETURN;
@@ -9770,9 +9770,10 @@ handler::Table_flags ha_partition::table_flags() const
alter_table_flags must be on handler/table level, not on hton level
due to the ha_partition hton does not know what the underlying hton is.
*/
-ulonglong ha_partition::alter_table_flags(ulonglong flags)
+
+alter_table_operations ha_partition::alter_table_flags(alter_table_operations flags)
{
- ulonglong flags_to_return;
+ alter_table_operations flags_to_return;
DBUG_ENTER("ha_partition::alter_table_flags");
flags_to_return= ht->alter_table_flags(flags);
@@ -9870,7 +9871,7 @@ ha_partition::check_if_supported_inplace_alter(TABLE *altered_table,
Any other change would set partition_changed in
prep_alter_part_table() in mysql_alter_table().
*/
- if (ha_alter_info->alter_info->flags == Alter_info::ALTER_PARTITION)
+ if (ha_alter_info->alter_info->flags == ALTER_PARTITION)
DBUG_RETURN(HA_ALTER_INPLACE_NO_LOCK);
part_inplace_ctx=
@@ -9887,7 +9888,7 @@ ha_partition::check_if_supported_inplace_alter(TABLE *altered_table,
for (index= 0; index <= m_tot_parts; index++)
part_inplace_ctx->handler_ctx_array[index]= NULL;
- ha_alter_info->handler_flags |= Alter_inplace_info::ALTER_PARTITIONED;
+ ha_alter_info->handler_flags |= ALTER_PARTITIONED;
for (index= 0; index < m_tot_parts; index++)
{
enum_alter_inplace_result p_result=
@@ -9937,7 +9938,7 @@ bool ha_partition::prepare_inplace_alter_table(TABLE *altered_table,
Changing to similar partitioning, only update metadata.
Non allowed changes would be catched in prep_alter_part_table().
*/
- if (ha_alter_info->alter_info->flags == Alter_info::ALTER_PARTITION)
+ if (ha_alter_info->alter_info->flags == ALTER_PARTITION)
DBUG_RETURN(false);
part_inplace_ctx=
@@ -9970,7 +9971,7 @@ bool ha_partition::inplace_alter_table(TABLE *altered_table,
Changing to similar partitioning, only update metadata.
Non allowed changes would be catched in prep_alter_part_table().
*/
- if (ha_alter_info->alter_info->flags == Alter_info::ALTER_PARTITION)
+ if (ha_alter_info->alter_info->flags == ALTER_PARTITION)
DBUG_RETURN(false);
part_inplace_ctx=
@@ -10010,7 +10011,7 @@ bool ha_partition::commit_inplace_alter_table(TABLE *altered_table,
Changing to similar partitioning, only update metadata.
Non allowed changes would be catched in prep_alter_part_table().
*/
- if (ha_alter_info->alter_info->flags == Alter_info::ALTER_PARTITION)
+ if (ha_alter_info->alter_info->flags == ALTER_PARTITION)
DBUG_RETURN(false);
part_inplace_ctx=