Skip to content
Permalink
Browse files
MDEV-28855 SEGV around dict_free_vc_templ during DROP INDEX
protect shared dict_table_t::vc_templ with a mutex,
same as in ha_innobase::open
  • Loading branch information
vuvova committed Dec 2, 2022
1 parent 4fb8f7d commit d08f2ab
Showing 1 changed file with 1 addition and 1 deletion.
@@ -20988,7 +20988,6 @@ TABLE* innobase_init_vc_templ(dict_table_t* table)
DBUG_ENTER("innobase_init_vc_templ");

ut_ad(table->vc_templ == NULL);
table->vc_templ = UT_NEW_NOKEY(dict_vcol_templ_t());

TABLE *mysql_table= innodb_find_table_for_vc(current_thd, table);

@@ -20998,6 +20997,7 @@ TABLE* innobase_init_vc_templ(dict_table_t* table)
}

mutex_enter(&dict_sys->mutex);
table->vc_templ = UT_NEW_NOKEY(dict_vcol_templ_t());
innobase_build_v_templ(mysql_table, table, table->vc_templ, NULL, true);
mutex_exit(&dict_sys->mutex);
DBUG_RETURN(mysql_table);

0 comments on commit d08f2ab

Please sign in to comment.