Commit d08f2ab6 authored by Sergei Golubchik's avatar Sergei Golubchik

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
parent 4fb8f7d0
......@@ -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);
......
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