Skip to content

Commit e262eb1

Browse files
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
1 parent f776fa9 commit e262eb1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

storage/innobase/handler/handler0alter.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,9 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
296296
continue;
297297

298298
dict_v_col_t *drop_vcol= index->new_vcol_info->
299-
add_drop_v_col(index->heap, vcol, n_drop_new_vcol);
299+
add_drop_v_col(index->heap, vcol, --n_drop_new_vcol);
300300
/* Re-assign the index field with newly stored virtual column */
301301
index->fields[i].col= reinterpret_cast<dict_col_t*>(drop_vcol);
302-
n_drop_new_vcol--;
303302
}
304303
}
305304
}

0 commit comments

Comments
 (0)