summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2018-04-18 11:35:31 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2018-04-18 11:35:31 +0300
commita0817923a141650ff37d9f8358bc938556981c69 (patch)
treee5293ce937c65e5bec2843b5980ffbae9d827517 /sql/sql_table.cc
parent226ec99a3ed662bace80d70dd7fefd0db7b4af0a (diff)
downloadmariadb-git-bb-10.0-MDEV-15308.tar.gz
MDEV-15308: Assertion `ha_alter_info->alter_info->drop_list.elements > 0' failed in ha_innodb::prepare_inplace_alter_tablebb-10.0-MDEV-15308
Problem was thet when items were removed from drop_list alter_info flags were not adjusted accordingly in all cases.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 607f20d2396..c33ac784d91 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -7430,6 +7430,9 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
if (table->s->tmp_table == NO_TMP_TABLE)
(void) delete_statistics_for_column(thd, table, field);
drop_it.remove();
+ if (alter_info->drop_list.is_empty())
+ alter_info->flags&= ~(Alter_info::ALTER_DROP_INDEX |
+ Alter_info::DROP_FOREIGN_KEY);
continue;
}
/* Check if field is changed */
@@ -7654,8 +7657,11 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
TRUE);
}
}
- }
+ }
drop_it.remove();
+ if (alter_info->drop_list.is_empty())
+ alter_info->flags&= ~(Alter_info::ALTER_DROP_INDEX |
+ Alter_info::DROP_FOREIGN_KEY);
continue;
}