MDEV-24971 InnoDB access freed virtual column after rollback of secondary index

- Fixing post-fix failure. In clean_new_vcol_index(), InnoDB has the wrong
offset to store the virtual column
parent f776fa96
......@@ -296,10 +296,9 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
continue;
dict_v_col_t *drop_vcol= index->new_vcol_info->
add_drop_v_col(index->heap, vcol, n_drop_new_vcol);
add_drop_v_col(index->heap, vcol, --n_drop_new_vcol);
/* Re-assign the index field with newly stored virtual column */
index->fields[i].col= reinterpret_cast<dict_col_t*>(drop_vcol);
n_drop_new_vcol--;
}
}
}
......
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