1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-34222 Alter operation on redundant table aborts the server

- InnoDB page compression works only on COMPACT or DYNAMIC row
format tables. So InnoDB should throw error when alter table
tries to enable PAGE_COMPRESSED for redundant table.
This commit is contained in:
Thirunarayanan Balathandayuthapani
2024-05-24 13:17:27 +05:30
parent 0ffa340a49
commit 44b23bb184
3 changed files with 32 additions and 0 deletions

View File

@@ -210,3 +210,14 @@ ALTER TABLE t1 PAGE_COMPRESSED = 1;
INSERT INTO t1 VALUES(2);
# restart
DROP TABLE t1;
#
# MDEV-34222 Alter operation on redundant table aborts the server
#
SET @df_row = @@global.INNODB_DEFAULT_ROW_FORMAT;
SET GLOBAL INNODB_DEFAULT_ROW_FORMAT=REDUNDANT;
CREATE TABLE t1 (c CHAR(1)) ENGINE=InnoDB;
SET GLOBAL INNODB_DEFAULT_ROW_FORMAT=compact;
ALTER TABLE t1 PAGE_COMPRESSED=1;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'PAGE_COMPRESSED=1 ROW_FORMAT=REDUNDANT'
DROP TABLE t1;
SET @@global.INNODB_DEFAULT_ROW_FORMAT = @df_row;

View File

@@ -257,3 +257,15 @@ INSERT INTO t1 VALUES(2);
let $shutdown_timeout = 0;
--source include/restart_mysqld.inc
DROP TABLE t1;
--echo #
--echo # MDEV-34222 Alter operation on redundant table aborts the server
--echo #
SET @df_row = @@global.INNODB_DEFAULT_ROW_FORMAT;
SET GLOBAL INNODB_DEFAULT_ROW_FORMAT=REDUNDANT;
CREATE TABLE t1 (c CHAR(1)) ENGINE=InnoDB;
SET GLOBAL INNODB_DEFAULT_ROW_FORMAT=compact;
--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 PAGE_COMPRESSED=1;
DROP TABLE t1;
SET @@global.INNODB_DEFAULT_ROW_FORMAT = @df_row;