| 1 |
# |
| 2 |
# MDEV-11757 KEY_BLOCK_SIZE strangeness when UNCOMPRESSing COMPRESSed InnoDB tables |
| 3 |
# |
| 4 |
source include/have_innodb.inc; |
| 5 |
--disable_query_log |
| 6 |
SET @save_innodb_read_only_compressed=@@GLOBAL.innodb_read_only_compressed; |
| 7 |
SET GLOBAL innodb_read_only_compressed=OFF; |
| 8 |
--enable_query_log |
| 9 |
|
| 10 |
create table t1 ( |
| 11 |
id1 bigint(20) not null, |
| 12 |
id2 bigint(20) not null, |
| 13 |
primary key (id1), |
| 14 |
unique key id2 (id2) |
| 15 |
) engine=innodb row_format=compressed key_block_size=8; |
| 16 |
show create table t1; |
| 17 |
SET innodb_strict_mode=ON; |
| 18 |
--error ER_ILLEGAL_HA_CREATE_OPTION |
| 19 |
alter table t1 row_format=dynamic; |
| 20 |
SET innodb_strict_mode=OFF; |
| 21 |
alter table t1 row_format=dynamic; |
| 22 |
show create table t1; |
| 23 |
SET innodb_strict_mode=ON; |
| 24 |
--disable_query_log |
| 25 |
SET GLOBAL innodb_read_only_compressed=@save_innodb_read_only_compressed; |
| 26 |
--enable_query_log |
| 27 |
alter table t1 key_block_size=0; |
| 28 |
show create table t1; |
| 29 |
alter table t1 drop primary key, add primary key (id1), |
| 30 |
drop key id2, add unique (id2); |
| 31 |
show create table t1; |
| 32 |
drop table t1; |