Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4(EOL), 10.5, 10.6, 10.7(EOL)
-
None
Description
InnoDB fails to skip newly created column while checking for change column. This problem
is getting only in redundant row format tables.
Field** af = altered_table->field;
|
Field** const end = altered_table->field
|
+ altered_table->s->fields;
|
for (unsigned c = 0; af < end; af++) {
|
if (!(*af)->stored_in_db()) {
|
continue;
|
}
|
|
const dict_col_t* col = dict_table_get_nth_col(
|
&ib_table, c++);
|
Test case:
--source include/have_innodb.inc
|
create table t1(f1 char(10) not null) row_format=redundant, engine=innodb;
|
|
alter table t1 ADD COLUMN ( tscol5 DATETIME NOT NULL, tcol1 TIME NOT NULL DEFAULT 0, ecol6 SET('foo','bar') DEFAULT NULL ), ADD COLUMN IF NOT EXISTS ( scol8 VARBINARY(100) DEFAULT NULL ), change column f1 f1 char(10) default null, LOCK=SHARED;
|
|
drop table t1;
|
Stack trace is
mariadbd: /home/thiru/mariarepo/10.6/10.6-test/storage/innobase/include/dict0dict.inl:370: dict_col_t* dict_table_get_nth_col(const dict_table_t*, ulint): Assertion `pos < table->n_def' failed.
|
|
include/dict0dict.inl:371(dict_table_get_nth_col(dict_table_t const*, unsigned long))[0x56543fbb129b]
|
handler/handler0alter.cc:1768(instant_alter_column_possible(dict_table_t const&, Alter_inplace_info const*, TABLE const*, TABLE const*, bool))[0x56543fbb5b9d]
|
handler/handler0alter.cc:2453(ha_innobase::check_if_supported_inplace_alter(TABLE*, Alter_inplace_info*))[0x56543fbb7c9e]
|
sql/sql_table.cc:10220(mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool, bool))[0x56543f4ea25e]
|
sql/sql_alter.cc:542(Sql_cmd_alter_table::execute(THD*))[0x56543f59d444]
|
sql/sql_parse.cc:5996(mysql_execute_command(THD*, bool))[0x56543f3e930f]
|
sql/sql_parse.cc:8029(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x56543f3ef3aa]
|
Attachments
Issue Links
- is caused by
-
MDEV-18035 InnoDB: Failing assertion: field->col->mtype == type in storage/innobase/row/row0sel.cc line 2549
- Closed
- relates to
-
MDEV-15563 Instant failure-free data type conversions
- Closed