summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-10-20 15:54:25 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-10-20 16:04:29 +0300
commitb06e8167a7b8f9ae9cf2f7c19054ecc9c0c78398 (patch)
tree54f07d5eaa42f3f715d67db8e03da4820969a56e /mysql-test/suite/innodb/t
parentcaebe151c18a3415466cca88dbdacb8ec9597a29 (diff)
downloadmariadb-git-b06e8167a7b8f9ae9cf2f7c19054ecc9c0c78398.tar.gz
MDEV-22627 Failing assertion: dict_tf2_is_valid(flags, flags2)
create_table_info_t::innobase_table_flags(): Refuse to create a PAGE_COMPRESSED table with PAGE_COMPRESSION_LEVEL=0 if also innodb_compression_level=0. The parameter value innodb_compression_level=0 was only somewhat meaningful for testing or debugging ROW_FORMAT=COMPRESSED tables. For the page_compressed format, it never made any sense, and the check in dict_tf_is_valid_not_redundant() that was added in 72378a25830184f91005be7e80cfb28381c79f23 (MDEV-12873) would cause the server to crash.
Diffstat (limited to 'mysql-test/suite/innodb/t')
-rw-r--r--mysql-test/suite/innodb/t/default_row_format_create.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/default_row_format_create.test b/mysql-test/suite/innodb/t/default_row_format_create.test
index 03a7ebd3752..a1c6ff0d588 100644
--- a/mysql-test/suite/innodb/t/default_row_format_create.test
+++ b/mysql-test/suite/innodb/t/default_row_format_create.test
@@ -44,3 +44,19 @@ TRUNCATE TABLE t1;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
DROP TABLE t1;
+
+SET @save_level=@@GLOBAL.innodb_compression_level;
+SET GLOBAL innodb_compression_level=0;
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1;
+SHOW WARNINGS;
+--disable_warnings
+--error 0,ER_CANT_CREATE_TABLE
+CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1 page_compression_level=1;
+DROP TABLE IF EXISTS t;
+SET GLOBAL innodb_compression_level=1;
+--error 0,ER_CANT_CREATE_TABLE
+CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1;
+DROP TABLE IF EXISTS t;
+--enable_warnings
+SET GLOBAL innodb_compression_level=@save_level;