mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-26577 InnoDB: Failing assertion: dict_tf2_is_valid(flags, flags2) during ADD COLUMN
prepare_inplace_alter_table_dict(): If the table will not be rebuilt, preserve all of the original ROW_FORMAT, including the compressed page size flags related to ROW_FORMAT=COMPRESSED.
This commit is contained in:
parent
a75ad73545
commit
f339ef3f97
3 changed files with 27 additions and 0 deletions
9
mysql-test/suite/innodb/r/instant_alter_upgrade.result
Normal file
9
mysql-test/suite/innodb/r/instant_alter_upgrade.result
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# MDEV-26577 InnoDB: Failing assertion: dict_tf2_is_valid(flags, flags2)
|
||||
# during ADD COLUMN
|
||||
#
|
||||
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
CREATE TABLE t2(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
FLUSH TABLES;
|
||||
ALTER TABLE t2 ADD COLUMN b INT;
|
||||
DROP TABLE t1,t2;
|
16
mysql-test/suite/innodb/t/instant_alter_upgrade.test
Normal file
16
mysql-test/suite/innodb/t/instant_alter_upgrade.test
Normal file
|
@ -0,0 +1,16 @@
|
|||
--source include/have_innodb.inc
|
||||
--source include/innodb_row_format.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26577 InnoDB: Failing assertion: dict_tf2_is_valid(flags, flags2)
|
||||
--echo # during ADD COLUMN
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
CREATE TABLE t2(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
FLUSH TABLES;
|
||||
--let $datadir=`select @@datadir`
|
||||
--remove_file $datadir/test/t2.frm
|
||||
--copy_file $datadir/test/t1.frm $datadir/test/t2.frm
|
||||
ALTER TABLE t2 ADD COLUMN b INT;
|
||||
DROP TABLE t1,t2;
|
|
@ -5012,8 +5012,10 @@ prepare_inplace_alter_table_dict(
|
|||
/* If we promised ALGORITHM=NOCOPY or ALGORITHM=INSTANT,
|
||||
we must retain the original ROW_FORMAT of the table. */
|
||||
flags = (user_table->flags & (DICT_TF_MASK_COMPACT
|
||||
| DICT_TF_MASK_ZIP_SSIZE
|
||||
| DICT_TF_MASK_ATOMIC_BLOBS))
|
||||
| (flags & ~(DICT_TF_MASK_COMPACT
|
||||
| DICT_TF_MASK_ZIP_SSIZE
|
||||
| DICT_TF_MASK_ATOMIC_BLOBS));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue