Commit 8d14a86f authored by Marko Mäkelä's avatar Marko Mäkelä

innobase_add_instant_try(): Work also with partitioned tables

parent 5389d2fc
...@@ -4140,6 +4140,7 @@ innobase_add_virtual_try( ...@@ -4140,6 +4140,7 @@ innobase_add_virtual_try(
/** Insert into SYS_COLUMNS and insert/update the 'default row' /** Insert into SYS_COLUMNS and insert/update the 'default row'
for instant ADD COLUMN. for instant ADD COLUMN.
@param[in,out] ha_alter_info Data used during in-place alter @param[in,out] ha_alter_info Data used during in-place alter
@param[in,out] ctx ALTER TABLE context for the current partition
@param[in] altered_table MySQL table that is being altered @param[in] altered_table MySQL table that is being altered
@param[in] table MySQL table as it is before the ALTER operation @param[in] table MySQL table as it is before the ALTER operation
@param[in,out] trx dictionary transaction @param[in,out] trx dictionary transaction
...@@ -4149,13 +4150,11 @@ static ...@@ -4149,13 +4150,11 @@ static
bool bool
innobase_add_instant_try( innobase_add_instant_try(
Alter_inplace_info* ha_alter_info, Alter_inplace_info* ha_alter_info,
ha_innobase_inplace_ctx*ctx,
const TABLE* altered_table, const TABLE* altered_table,
const TABLE* table, const TABLE* table,
trx_t* trx) trx_t* trx)
{ {
ha_innobase_inplace_ctx* ctx = static_cast<ha_innobase_inplace_ctx*>(
ha_alter_info->handler_ctx);
DBUG_ASSERT(!ctx->need_rebuild()); DBUG_ASSERT(!ctx->need_rebuild());
if (!ctx->is_instant()) return false; if (!ctx->is_instant()) return false;
...@@ -8541,7 +8540,7 @@ commit_try_norebuild( ...@@ -8541,7 +8540,7 @@ commit_try_norebuild(
DBUG_RETURN(true); DBUG_RETURN(true);
} }
if (innobase_add_instant_try(ha_alter_info, altered_table, if (innobase_add_instant_try(ha_alter_info, ctx, altered_table,
old_table, trx)) { old_table, trx)) {
DBUG_RETURN(true); DBUG_RETURN(true);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment