summaryrefslogtreecommitdiff
path: root/storage/innobase/handler/handler0alter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/handler/handler0alter.cc')
-rw-r--r--storage/innobase/handler/handler0alter.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 1e11265b5ce..1b05add4a0c 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -2239,6 +2239,12 @@ ha_innobase::check_if_supported_inplace_alter(
update_thd();
+ if (!m_prebuilt->table->space) {
+ ib_senderrf(m_user_thd, IB_LOG_LEVEL_WARN,
+ ER_TABLESPACE_DISCARDED,
+ table->s->table_name.str);
+ }
+
if (is_read_only(!high_level_read_only
&& (ha_alter_info->handler_flags & ALTER_OPTIONS)
&& ha_alter_info->create_info->key_block_size == 0
@@ -5847,7 +5853,16 @@ static bool innobase_instant_try(
const dict_col_t* old_cols = user_table->cols;
DBUG_ASSERT(user_table->n_cols == ctx->old_n_cols);
+#ifdef BTR_CUR_HASH_ADAPT
+ /* Acquire the ahi latch to avoid a race condition
+ between ahi access and instant alter table */
+ srw_spin_lock* ahi_latch = btr_search_sys.get_latch(*index);
+ ahi_latch->wr_lock(SRW_LOCK_CALL);
+#endif /* BTR_CUR_HASH_ADAPT */
const bool metadata_changed = ctx->instant_column();
+#ifdef BTR_CUR_HASH_ADAPT
+ ahi_latch->wr_unlock();
+#endif /* BTR_CUR_HASH_ADAPT */
DBUG_ASSERT(index->n_fields >= n_old_fields);
/* The table may have been emptied and may have lost its