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.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index e812bfc4928..e79d9d67dbf 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -1795,8 +1795,13 @@ set_max_size:
Field** af = altered_table->field;
Field** const end = altered_table->field
+ altered_table->s->fields;
+ List_iterator_fast<Create_field> cf_it(
+ ha_alter_info->alter_info->create_list);
for (unsigned c = 0; af < end; af++) {
- if (!(*af)->stored_in_db()) {
+ const Create_field* cf = cf_it++;
+ if (!cf->field || !(*af)->stored_in_db()) {
+ /* Ignore virtual or newly created
+ column */
continue;
}