Commit 4fb8f7d0 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: clarify innobase_init_vc_templ usage

parent 12661904
......@@ -20981,16 +20981,13 @@ static TABLE* innodb_find_table_for_vc(THD* thd, dict_table_t* table)
return mysql_table;
}
/** Get the computed value by supplying the base column values.
@param[in,out] table table whose virtual column
template to be built */
/** Only used by the purge thread
@param[in,out] table table whose virtual column template to be built */
TABLE* innobase_init_vc_templ(dict_table_t* table)
{
if (table->vc_templ != NULL) {
return NULL;
}
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);
......
......@@ -899,11 +899,7 @@ row_ins_foreign_fill_virtual(
&ext, update->heap);
n_diff = update->n_fields;
if (index->table->vc_templ == NULL) {
/** This can occur when there is a cascading
delete or update after restart. */
innobase_init_vc_templ(index->table);
}
ut_ad(index->table->vc_templ != NULL);
ib_vcol_row vc(NULL);
uchar *record = vc.record(thd, index, &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