MDEV-23497 Make ROW_FORMAT=COMPRESSED read-only by default
Let us introduce the parameter innodb_read_only_compressed
that is ON by default, making any ROW_FORMAT=COMPRESSED tables
read-only.
I developed the ROW_FORMAT=COMPRESSED format based on
Heikki Tuuri's rough design between 2005 and 2008. It might
have been a good idea back then, but no proper benchmarks were
ever run to validate the design or the implementation.
The format has been more or less obsolete for years.
It limits innodb_page_size to 16384 bytes (the default),
and instant ALTER TABLE is not supported.
This is the first step towards deprecating and removing
write support for ROW_FORMAT=COMPRESSED tables.
@ -8,11 +8,8 @@ insert into worklog5743 values(repeat("a", 20000));
update worklog5743 set a = (repeat("b", 16000));
SET sql_mode= '';
create index idx on worklog5743(a(900));
Warnings:
Note 1071 Specified key was too long; max key length is 768 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 768 bytes
SET sql_mode= default;
begin;
update worklog5743 set a = (repeat("x", 17000));
@ -101,7 +98,7 @@ create index idx1 on worklog5743_1(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 768 bytes
Note 1071 Specified key was too long; max key length is 1173 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_1(a2(436));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
@ -121,68 +118,41 @@ show warnings;
Level Code Message
SET sql_mode= '';
create index idx1 on worklog5743_2(a2(4000));
Warnings:
Note 1071 Specified key was too long; max key length is 768 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 768 bytes
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_2(a2(769));
Warnings:
Note 1071 Specified key was too long; max key length is 768 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 768 bytes
create index idx4 on worklog5743_2(a2(768));
Warnings:
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
show warnings;
Level Code Message
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
create index idx5 on worklog5743_2(a1, a2(765));
ERROR 42000: Specified key was too long; max key length is 768 bytes
show warnings;
Level Code Message
Error 1071 Specified key was too long; max key length is 768 bytes
create index idx6 on worklog5743_2(a1, a2(764));
show warnings;
Level Code Message
create index idx1 on worklog5743_4(a2(4000));
Warnings:
Note 1071 Specified key was too long; max key length is 768 bytes
Note 1071 Specified key was too long; max key length is 1173 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 768 bytes
Note 1071 Specified key was too long; max key length is 1173 bytes