summaryrefslogtreecommitdiff
path: root/storage/innobase/handler/handler0alter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/handler/handler0alter.cc')
-rw-r--r--storage/innobase/handler/handler0alter.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index a1622c0d13f..228e516551d 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -4904,6 +4904,15 @@ prepare_inplace_alter_table_dict(
if (ha_alter_info->handler_flags
& ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX) {
+ for (ulint i = 0; i < ctx->num_to_add_vcol; i++) {
+ /* Set mbminmax for newly added column */
+ dict_col_t& col = ctx->add_vcol[i].m_col;
+ ulint mbminlen, mbmaxlen;
+ dtype_get_mblen(col.mtype, col.prtype,
+ &mbminlen, &mbmaxlen);
+ col.mbminlen = mbminlen;
+ col.mbmaxlen = mbmaxlen;
+ }
add_v = static_cast<dict_add_v_col_t*>(
mem_heap_alloc(ctx->heap, sizeof *add_v));
add_v->n_v_col = ctx->num_to_add_vcol;