MDEV-28060 Online DDL fails while checking for instant alter condition
- InnoDB fails to skip newly created column while checking for change column when table is in redundant row format. This issue is caused the MDEV-18035 (ccb1acbd3c15f0d99d1ea3cd1b206da38fa1c17f)
This commit is contained in:
parent
8afabca6fd
commit
1c43660aea
@ -448,4 +448,13 @@ ALTER TABLE t ADD d INT;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-28060 Online DDL fails while checking for instant
|
||||
# alter condition
|
||||
#
|
||||
CREATE TABLE t1(f1 CHAR(10) NOT NULL)ROW_FORMAT=REDUNDANT,ENGINE=InnoDB;
|
||||
ALTER TABLE t1 ADD COLUMN(f2 INT NOT NULL, f3 INT NOT NULL,
|
||||
f4 INT NOT NULL, f5 INT NOT NULL),
|
||||
CHANGE COLUMN f1 f1 CHAR(10) DEFAULT NULL;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
|
||||
|
@ -466,4 +466,13 @@ ALTER TABLE t ADD d INT;
|
||||
--disable_info
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28060 Online DDL fails while checking for instant
|
||||
--echo # alter condition
|
||||
--echo #
|
||||
CREATE TABLE t1(f1 CHAR(10) NOT NULL)ROW_FORMAT=REDUNDANT,ENGINE=InnoDB;
|
||||
ALTER TABLE t1 ADD COLUMN(f2 INT NOT NULL, f3 INT NOT NULL,
|
||||
f4 INT NOT NULL, f5 INT NOT NULL),
|
||||
CHANGE COLUMN f1 f1 CHAR(10) DEFAULT NULL;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
|
||||
|
@ -1795,8 +1795,13 @@ set_max_size:
|
||||
Field** af = altered_table->field;
|
||||
Field** const end = altered_table->field
|
||||
+ altered_table->s->fields;
|
||||
List_iterator_fast<Create_field> cf_it(
|
||||
ha_alter_info->alter_info->create_list);
|
||||
for (unsigned c = 0; af < end; af++) {
|
||||
if (!(*af)->stored_in_db()) {
|
||||
const Create_field* cf = cf_it++;
|
||||
if (!cf->field || !(*af)->stored_in_db()) {
|
||||
/* Ignore virtual or newly created
|
||||
column */
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user