MDEV-22410 Change the error when table schema mismatch happens

- InnoDB gives "table is marked as crashed and should be repaired" when
table schema mismatch.
parent d002ec2c
...@@ -6084,7 +6084,6 @@ ha_innobase::open(const char* name, int, uint) ...@@ -6084,7 +6084,6 @@ ha_innobase::open(const char* name, int, uint)
sql_print_error("Failed to open table %s.\n", sql_print_error("Failed to open table %s.\n",
norm_name); norm_name);
} }
no_such_table:
set_my_errno(ENOENT); set_my_errno(ENOENT);
DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); DBUG_RETURN(HA_ERR_NO_SUCH_TABLE);
...@@ -6110,7 +6109,8 @@ ha_innobase::open(const char* name, int, uint) ...@@ -6110,7 +6109,8 @@ ha_innobase::open(const char* name, int, uint)
ib_table->file_unreadable = true; ib_table->file_unreadable = true;
ib_table->corrupted = true; ib_table->corrupted = true;
dict_table_close(ib_table, FALSE, FALSE); 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); innobase_copy_frm_flags_from_table_share(ib_table, table->s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment