Skip to content

Commit

Permalink
MDEV-22410 Change the error when table schema mismatch happens
Browse files Browse the repository at this point in the history
- InnoDB gives "table is marked as crashed and should be repaired" when
table schema mismatch.
  • Loading branch information
Thirunarayanan committed May 4, 2020
1 parent d002ec2 commit a1eb151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6084,7 +6084,6 @@ ha_innobase::open(const char* name, int, uint)
sql_print_error("Failed to open table %s.\n",
norm_name);
}
no_such_table:
set_my_errno(ENOENT);

DBUG_RETURN(HA_ERR_NO_SUCH_TABLE);
Expand All @@ -6110,7 +6109,8 @@ ha_innobase::open(const char* name, int, uint)
ib_table->file_unreadable = true;
ib_table->corrupted = true;
dict_table_close(ib_table, FALSE, FALSE);
goto no_such_table;
set_my_errno(ENOENT);
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
}

innobase_copy_frm_flags_from_table_share(ib_table, table->s);
Expand Down

0 comments on commit a1eb151

Please sign in to comment.