mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
MDEV-9918: [ERROR] mysqld got signal 11 during ALTER TABLE name COLUMN ADD
Problem was that in-place online alter table was used on a table that had mismatch between MySQL frm file and InnoDB data dictionary. Fixed so that traditional "Copy" method is used if the MySQL frm and InnoDB data dictionary is not consistent.
This commit is contained in:
parent
e5410da190
commit
628bc576b3
10 changed files with 393 additions and 82 deletions
|
|
@ -435,6 +435,20 @@ ha_innobase::check_if_supported_inplace_alter(
|
|||
}
|
||||
}
|
||||
|
||||
ulint n_indexes = UT_LIST_GET_LEN((prebuilt->table)->indexes);
|
||||
|
||||
/* If InnoDB dictionary and MySQL frm file are not consistent
|
||||
use "Copy" method. */
|
||||
if (prebuilt->table->dict_frm_mismatch) {
|
||||
|
||||
ha_alter_info->unsupported_reason = innobase_get_err_msg(
|
||||
ER_NO_SUCH_INDEX);
|
||||
ib_push_frm_error(user_thd, prebuilt->table, altered_table,
|
||||
n_indexes, true);
|
||||
|
||||
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
/* We should be able to do the operation in-place.
|
||||
See if we can do it online (LOCK=NONE). */
|
||||
bool online = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue