1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-14219 Allow online table rebuild when encryption or compression parameters change

When MariaDB 10.1.0 introduced table options for encryption and
compression, it unnecessarily changed
ha_innobase::check_if_supported_inplace_alter() so that ALGORITHM=COPY
is forced when these parameters differ.

A better solution is to move the check to innobase_need_rebuild().
In that way, the ALGORITHM=INPLACE interface (yes, the syntax is
very misleading) can be used for rebuilding the table much more
efficiently, with merge sort, with no undo logging, and allowing
concurrent DML operations.
This commit is contained in:
Marko Mäkelä
2017-10-30 18:47:43 +02:00
parent 38e12db478
commit 88edb1b3ed
13 changed files with 116 additions and 109 deletions

View File

@ -32,10 +32,8 @@ create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row
show warnings;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant;
show create table innodb_redundant;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
--error ER_ILLEGAL_HA_CREATE_OPTION
alter table innodb_redundant page_compressed=1;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
show create table innodb_redundant;
alter table innodb_redundant row_format=compact page_compressed=1;