Commit 882f820c authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-27451 gcol.virtual_index_drop fails with LeakSanitizer errors

Because commit 24773bf3
made dict_v_col_t encapsulate v_indexes, we must invoke
dict_v_col_t::~dict_v_col_t() to destruct the container.

This basically is a fixup of the merge
commit 5008171b
of the 10.2
commit cf2c6b7f (MDEV-24971).

I did not debug why no leaks are reported for 10.2 or 10.3.
parent 49e3bd2c
......@@ -8914,6 +8914,14 @@ rollback_inplace_alter_table(
row_mysql_unlock_data_dictionary(prebuilt->trx);
}
if (ctx->add_vcol) {
for (ulint i = 0; i < ctx->num_to_add_vcol; i++) {
ctx->add_vcol[i].~dict_v_col_t();
}
ctx->num_to_add_vcol = 0;
ctx->add_vcol = nullptr;
}
}
/* Reset dict_col_t::ord_part for those columns fail to be indexed,
......
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