mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -181,12 +181,12 @@ eval $check_no_innodb;
|
||||
--let $restart_parameters=
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
create temporary table t (
|
||||
i int)
|
||||
engine = innodb row_format = compressed;
|
||||
#
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
create temporary table t (
|
||||
i int)
|
||||
engine = innodb row_format = compressed key_block_size = 8;
|
||||
@ -211,7 +211,7 @@ show warnings;
|
||||
set innodb_strict_mode = default;
|
||||
#
|
||||
drop table t;
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
create temporary table t (
|
||||
i int)
|
||||
engine = innodb row_format = compressed;
|
||||
@ -344,7 +344,7 @@ DROP TABLE t1;
|
||||
# Set innodb_strict_mode=ON and test compressed temporary tables again.
|
||||
set innodb_strict_mode = ON;
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
CREATE TEMPORARY TABLE t1 (
|
||||
i INT NOT NULL PRIMARY KEY,
|
||||
c CHAR(10) NOT NULL
|
||||
@ -352,7 +352,7 @@ CREATE TEMPORARY TABLE t1 (
|
||||
SHOW WARNINGS;
|
||||
#
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
CREATE TEMPORARY TABLE t1 (
|
||||
i INT NOT NULL PRIMARY KEY,
|
||||
c CHAR(10) NOT NULL
|
||||
@ -369,7 +369,7 @@ SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
CREATE TEMPORARY TABLE t1 (
|
||||
i INT NOT NULL PRIMARY KEY,
|
||||
c CHAR(10) NOT NULL
|
||||
@ -377,7 +377,7 @@ CREATE TEMPORARY TABLE t1 (
|
||||
SHOW WARNINGS;
|
||||
#
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
CREATE TEMPORARY TABLE t1 (
|
||||
i INT NOT NULL PRIMARY KEY,
|
||||
c CHAR(10) NOT NULL
|
||||
@ -385,7 +385,7 @@ CREATE TEMPORARY TABLE t1 (
|
||||
SHOW WARNINGS;
|
||||
#
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
CREATE TEMPORARY TABLE t1 (
|
||||
i INT NOT NULL PRIMARY KEY,
|
||||
c CHAR(10) NOT NULL
|
||||
@ -393,7 +393,7 @@ CREATE TEMPORARY TABLE t1 (
|
||||
SHOW WARNINGS;
|
||||
#
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
CREATE TEMPORARY TABLE t1 (
|
||||
i INT NOT NULL PRIMARY KEY,
|
||||
c CHAR(10) NOT NULL
|
||||
@ -414,15 +414,15 @@ CREATE TEMPORARY TABLE t1 (
|
||||
i INT NOT NULL PRIMARY KEY
|
||||
) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT = COMPRESSED;
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE = 4;
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 4;
|
||||
SHOW WARNINGS;
|
||||
|
||||
@ -450,7 +450,7 @@ SHOW WARNINGS;
|
||||
|
||||
set innodb_strict_mode = ON;
|
||||
|
||||
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
|
||||
--error ER_UNSUPPORTED_COMPRESSED_TABLE
|
||||
ALTER TABLE t1 ADD COLUMN j INT;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
Reference in New Issue
Block a user