Skip to content
Permalink
Browse files
MDEV-22939: Restore an AUTO_INCREMENT check
It turns out that we must check for DISCARD TABLESPACE both
when the table is being rebuilt and when the AUTO_INCREMENT
value of the table is being added.

This was caught by the test innodb.alter_missing_tablespace.
Somehow I failed to run all tests. Sorry!
  • Loading branch information
dr-m committed Sep 22, 2020
1 parent 3eb8113 commit 78efa10
Showing 1 changed file with 6 additions and 0 deletions.
@@ -7209,6 +7209,12 @@ commit_set_autoinc(
&& (ha_alter_info->create_info->used_fields
& HA_CREATE_USED_AUTO)) {

if (dict_table_is_discarded(ctx->old_table)) {
my_error(ER_TABLESPACE_DISCARDED, MYF(0),
old_table->s->table_name.str);
DBUG_RETURN(true);
}

/* An AUTO_INCREMENT value was supplied by the user.
It must be persisted to the data file. */
const Field* ai = old_table->found_next_number_field;

0 comments on commit 78efa10

Please sign in to comment.