Skip to content

Commit

Permalink
MDEV-24971 InnoDB access freed virtual column after rollback of secon…
Browse files Browse the repository at this point in the history
…dary index

- Fixing post-fix failure. In clean_new_vcol_index(), InnoDB has the wrong
offset to store the virtual column
  • Loading branch information
Thirunarayanan committed Apr 13, 2021
1 parent f776fa9 commit e262eb1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions storage/innobase/handler/handler0alter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
}
}
}
Expand Down

0 comments on commit e262eb1

Please sign in to comment.