mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
9bc874a594
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.
44 lines
1.3 KiB
Text
44 lines
1.3 KiB
Text
#***********************************************************
|
|
# WL#7703:
|
|
# Check boundary value of max key length 3073
|
|
#***********************************************************
|
|
-- source include/have_innodb.inc
|
|
-- source include/have_innodb_16k.inc
|
|
|
|
call mtr.add_suppression("InnoDB: Cannot add field `c1` in table `test`\\.`tab0`");
|
|
|
|
# Check some default settings
|
|
SELECT @@innodb_strict_mode;
|
|
|
|
SELECT @@innodb_file_per_table;
|
|
|
|
SET SQL_MODE=strict_all_tables;
|
|
|
|
--disable_query_log
|
|
SET @save_innodb_read_only_compressed=@@GLOBAL.innodb_read_only_compressed;
|
|
SET GLOBAL innodb_read_only_compressed=OFF;
|
|
--enable_query_log
|
|
|
|
CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
|
SHOW CREATE TABLE tab0;
|
|
DROP TABLE tab0;
|
|
|
|
--error ER_TOO_BIG_ROWSIZE
|
|
CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB KEY_BLOCK_SIZE=2;
|
|
|
|
CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
|
|
DROP TABLE tab0;
|
|
|
|
SET GLOBAL innodb_strict_mode=OFF;
|
|
|
|
# Check with default value
|
|
SET GLOBAL innodb_strict_mode=Default;
|
|
|
|
SELECT @@innodb_strict_mode;
|
|
|
|
CREATE TABLE tab1(c1 int ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
|
DROP TABLE tab1;
|
|
|
|
--disable_query_log
|
|
SET GLOBAL innodb_read_only_compressed=@save_innodb_read_only_compressed;
|
|
--enable_query_log
|